From e1c52950314e00723f2d1b8200106b5c496a4459 Mon Sep 17 00:00:00 2001 From: "amogh.bihani@samsung.com" Date: Wed, 18 Jun 2014 08:35:43 +0000 Subject: [PATCH] Moving compositor_bindings from webkit to content - All files from webkit/renderer/compositor_bindings have been moved to content/renderer/compositor_bindings - Webkit_compositor_support is moved in content_renderer - Webkit_compositor_bindings_unittests is moved in content_unittests - A dummy target has been left for webkit_compositor_bindings_unittests so as to not break the build. TBR=nduca BUG=265753 Review URL: https://codereview.chromium.org/317163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277988 0039d316-1c4b-4281-b951-d872f2087c98 --- build/all.gyp | 3 +- .../common => child}/assert_matching_enums.cc | 14 +++ content/content_child.gypi | 1 + content/content_common.gypi | 1 - content/content_renderer.gypi | 48 ++++++++- content/content_shell.gypi | 1 - content/content_tests.gypi | 9 +- content/public/test/layouttest_support.h | 5 + content/renderer/BUILD.gn | 2 - .../child_frame_compositing_helper.cc | 4 +- .../renderer/compositor_bindings/OWNERS | 0 .../renderer/compositor_bindings/PRESUBMIT.py | 2 +- .../compositor_bindings/scrollbar_impl.cc | 24 ++--- .../compositor_bindings/scrollbar_impl.h | 13 +-- .../web_animation_curve_common.cc | 9 +- .../web_animation_curve_common.h | 21 ++++ .../compositor_bindings/web_animation_impl.cc | 45 ++++----- .../compositor_bindings/web_animation_impl.h | 25 +++-- .../web_animation_unittest.cc | 11 ++- .../compositor_bindings/web_blend_mode.h | 13 +-- .../web_compositor_support_impl.cc | 43 ++++---- .../web_compositor_support_impl.h | 17 ++-- .../web_content_layer_impl.cc | 20 ++-- .../web_content_layer_impl.h | 23 +++-- .../web_external_bitmap_impl.cc | 15 +-- .../web_external_bitmap_impl.h | 22 ++--- .../web_external_texture_layer_impl.cc | 29 +++--- .../web_external_texture_layer_impl.h | 17 ++-- .../web_filter_animation_curve_impl.cc | 31 +++--- .../web_filter_animation_curve_impl.h | 24 ++--- .../web_filter_operations_impl.cc | 15 +-- .../web_filter_operations_impl.h | 17 ++-- .../web_float_animation_curve_impl.cc | 19 ++-- .../web_float_animation_curve_impl.h | 21 ++-- .../web_float_animation_curve_unittest.cc | 9 +- .../web_image_layer_impl.cc | 20 ++-- .../web_image_layer_impl.h | 17 ++-- .../compositor_bindings/web_layer_impl.cc | 97 ++++++++++++------- .../compositor_bindings/web_layer_impl.h | 27 +++--- .../web_layer_impl_fixed_bounds.cc | 14 +-- .../web_layer_impl_fixed_bounds.h | 21 ++-- .../web_layer_impl_fixed_bounds_unittest.cc | 21 ++-- .../web_nine_patch_layer_impl.cc | 27 +++--- .../web_nine_patch_layer_impl.h | 17 ++-- .../web_scroll_offset_animation_curve_impl.cc | 15 +-- .../web_scroll_offset_animation_curve_impl.h | 15 +-- .../web_scrollbar_layer_impl.cc | 35 ++++--- .../web_scrollbar_layer_impl.h | 18 ++-- .../web_solid_color_layer_impl.cc | 18 ++-- .../web_solid_color_layer_impl.h | 16 +-- .../web_to_cc_animation_delegate_adapter.cc | 12 ++- .../web_to_cc_animation_delegate_adapter.h | 17 ++-- .../web_transform_animation_curve_impl.cc | 27 +++--- .../web_transform_animation_curve_impl.h | 21 ++-- .../web_transform_operations_impl.cc | 15 +-- .../web_transform_operations_impl.h | 17 ++-- .../renderer/gpu/render_widget_compositor.cc | 17 ++-- .../media/android/webmediaplayer_android.cc | 5 +- .../media/android/webmediaplayer_android.h | 7 +- content/renderer/media/webmediaplayer_impl.cc | 4 +- content/renderer/media/webmediaplayer_impl.h | 6 +- content/renderer/media/webmediaplayer_ms.cc | 5 +- content/renderer/media/webmediaplayer_ms.h | 6 +- content/renderer/npapi/webplugin_impl.cc | 4 +- .../pepper/pepper_plugin_instance_impl.cc | 6 +- content/renderer/render_thread_impl.cc | 9 +- .../renderer_webkitplatformsupport_impl.h | 4 +- .../shell/renderer/test_runner/TestPlugin.cpp | 2 +- .../shell/renderer/test_runner/TestPlugin.h | 6 +- content/test/layouttest_support.cc | 5 + content/test/test_webkit_platform_support.cc | 1 - content/test/test_webkit_platform_support.h | 4 +- .../web_layer_tree_view_impl_for_testing.cc | 3 +- webkit/renderer/compositor_bindings/DEPS | 3 - .../compositor_bindings.gyp | 87 ----------------- .../compositor_bindings_dummy_unittest.cc | 11 +++ .../compositor_bindings_tests.gyp | 20 +--- .../web_animation_curve_common.h | 18 ---- .../webkit_compositor_bindings_export.h | 30 ------ 79 files changed, 689 insertions(+), 634 deletions(-) rename content/{public/common => child}/assert_matching_enums.cc (74%) rename {webkit => content}/renderer/compositor_bindings/OWNERS (100%) rename {webkit => content}/renderer/compositor_bindings/PRESUBMIT.py (94%) rename {webkit => content}/renderer/compositor_bindings/scrollbar_impl.cc (85%) rename {webkit => content}/renderer/compositor_bindings/scrollbar_impl.h (82%) rename {webkit => content}/renderer/compositor_bindings/web_animation_curve_common.cc (82%) create mode 100644 content/renderer/compositor_bindings/web_animation_curve_common.h rename {webkit => content}/renderer/compositor_bindings/web_animation_impl.cc (76%) rename {webkit => content}/renderer/compositor_bindings/web_animation_impl.h (69%) rename {webkit => content}/renderer/compositor_bindings/web_animation_unittest.cc (87%) rename {webkit => content}/renderer/compositor_bindings/web_blend_mode.h (92%) rename {webkit => content}/renderer/compositor_bindings/web_compositor_support_impl.cc (73%) rename {webkit => content}/renderer/compositor_bindings/web_compositor_support_impl.h (82%) rename {webkit => content}/renderer/compositor_bindings/web_content_layer_impl.cc (86%) rename {webkit => content}/renderer/compositor_bindings/web_content_layer_impl.h (70%) rename {webkit => content}/renderer/compositor_bindings/web_external_bitmap_impl.cc (73%) rename {webkit => content}/renderer/compositor_bindings/web_external_bitmap_impl.h (58%) rename {webkit => content}/renderer/compositor_bindings/web_external_texture_layer_impl.cc (83%) rename {webkit => content}/renderer/compositor_bindings/web_external_texture_layer_impl.h (78%) rename {webkit => content}/renderer/compositor_bindings/web_filter_animation_curve_impl.cc (63%) rename {webkit => content}/renderer/compositor_bindings/web_filter_animation_curve_impl.h (61%) rename {webkit => content}/renderer/compositor_bindings/web_filter_operations_impl.cc (90%) rename {webkit => content}/renderer/compositor_bindings/web_filter_operations_impl.h (75%) rename {webkit => content}/renderer/compositor_bindings/web_float_animation_curve_impl.cc (77%) rename {webkit => content}/renderer/compositor_bindings/web_float_animation_curve_impl.h (67%) rename {webkit => content}/renderer/compositor_bindings/web_float_animation_curve_unittest.cc (97%) rename {webkit => content}/renderer/compositor_bindings/web_image_layer_impl.cc (65%) rename {webkit => content}/renderer/compositor_bindings/web_image_layer_impl.h (56%) rename {webkit => content}/renderer/compositor_bindings/web_layer_impl.cc (86%) rename {webkit => content}/renderer/compositor_bindings/web_layer_impl.h (90%) rename {webkit => content}/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc (92%) rename {webkit => content}/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h (67%) rename {webkit => content}/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc (91%) rename {webkit => content}/renderer/compositor_bindings/web_nine_patch_layer_impl.cc (67%) rename {webkit => content}/renderer/compositor_bindings/web_nine_patch_layer_impl.h (67%) rename {webkit => content}/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc (83%) rename {webkit => content}/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h (73%) rename {webkit => content}/renderer/compositor_bindings/web_scrollbar_layer_impl.cc (68%) rename {webkit => content}/renderer/compositor_bindings/web_scrollbar_layer_impl.h (67%) rename {webkit => content}/renderer/compositor_bindings/web_solid_color_layer_impl.cc (54%) rename {webkit => content}/renderer/compositor_bindings/web_solid_color_layer_impl.h (57%) rename {webkit => content}/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc (80%) rename {webkit => content}/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h (65%) rename {webkit => content}/renderer/compositor_bindings/web_transform_animation_curve_impl.cc (72%) rename {webkit => content}/renderer/compositor_bindings/web_transform_animation_curve_impl.h (67%) rename {webkit => content}/renderer/compositor_bindings/web_transform_operations_impl.cc (85%) rename {webkit => content}/renderer/compositor_bindings/web_transform_operations_impl.h (69%) delete mode 100644 webkit/renderer/compositor_bindings/DEPS delete mode 100644 webkit/renderer/compositor_bindings/compositor_bindings.gyp create mode 100644 webkit/renderer/compositor_bindings/compositor_bindings_dummy_unittest.cc delete mode 100644 webkit/renderer/compositor_bindings/web_animation_curve_common.h delete mode 100644 webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h diff --git a/build/all.gyp b/build/all.gyp index bb0923b0c51818..0d5c591d35c44f 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -778,7 +778,7 @@ '../ui/events/events.gyp:events_unittests_apk', '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk', '../ui/ui_unittests.gyp:ui_unittests_apk', - '../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests_apk' + '../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests_apk', ], }, { @@ -861,7 +861,6 @@ '../ui/gfx/gfx_tests.gyp:gfx_unittests', '../ui/ui_unittests.gyp:ui_unittests', '../url/url.gyp:url_unittests', - '../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests', ], }, { diff --git a/content/public/common/assert_matching_enums.cc b/content/child/assert_matching_enums.cc similarity index 74% rename from content/public/common/assert_matching_enums.cc rename to content/child/assert_matching_enums.cc index a21ea1b823fbe8..f52f6ad4c8f106 100644 --- a/content/public/common/assert_matching_enums.cc +++ b/content/child/assert_matching_enums.cc @@ -6,8 +6,10 @@ // from Blink are valid. #include "base/macros.h" +#include "cc/animation/animation.h" #include "content/public/common/screen_orientation_values.h" #include "net/base/mime_util.h" +#include "third_party/WebKit/public/platform/WebAnimation.h" #include "third_party/WebKit/public/platform/WebMimeRegistry.h" #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" @@ -42,4 +44,16 @@ COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsSupported, COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::MayBeSupported, net::MayBeSupported); +// TargetProperty +COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyTransform, + cc::Animation::Transform); +COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyOpacity, + cc::Animation::Opacity); +COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyFilter, + cc::Animation::Filter); +#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED +COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyScrollOffset, + cc::Animation::ScrollOffset); +#endif + } // namespace content diff --git a/content/content_child.gypi b/content/content_child.gypi index 9ef0109167b3f1..3e45b0c90998cd 100644 --- a/content/content_child.gypi +++ b/content/content_child.gypi @@ -35,6 +35,7 @@ 'child/appcache/appcache_frontend_impl.h', 'child/appcache/web_application_cache_host_impl.cc', 'child/appcache/web_application_cache_host_impl.h', + 'child/assert_matching_enums.cc', 'child/blink_glue.cc', 'child/blink_glue.h', 'child/blink_platform_impl.cc', diff --git a/content/content_common.gypi b/content/content_common.gypi index bd42e9069a1d75..2c54e773bc84c6 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -32,7 +32,6 @@ ], 'variables': { 'public_common_sources': [ - 'public/common/assert_matching_enums.cc', 'public/common/bindings_policy.h', 'public/common/child_process_host.h', 'public/common/child_process_host_delegate.cc', diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 54fb0ed2d318b9..67dd628c826bc9 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -5,7 +5,11 @@ { 'dependencies': [ 'content_common_mojo_bindings', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../cc/cc.gyp:cc', '../gin/gin.gyp:gin', + '../gpu/gpu.gyp:gpu', '../jingle/jingle.gyp:jingle_glue', '../media/media.gyp:media', '../mojo/mojo.gyp:mojo_environment_chromium', @@ -21,14 +25,14 @@ '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', '../ui/accessibility/accessibility.gyp:accessibility', '../ui/events/events.gyp:dom4_keycode_converter', + '../ui/gfx/gfx.gyp:gfx', + '../ui/gfx/gfx.gyp:gfx_geometry', '../ui/native_theme/native_theme.gyp:native_theme', '../ui/surface/surface.gyp:surface', '../v8/tools/gyp/v8.gyp:v8', '../webkit/child/webkit_child.gyp:webkit_child', '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', '../webkit/common/webkit_common.gyp:webkit_common', - '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_bindings', - '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', '../webkit/storage_common.gyp:webkit_storage_common', ], 'include_dirs': [ @@ -111,6 +115,46 @@ 'renderer/clipboard_utils.h', 'renderer/child_frame_compositing_helper.cc', 'renderer/child_frame_compositing_helper.h', + 'renderer/compositor_bindings/scrollbar_impl.cc', + 'renderer/compositor_bindings/scrollbar_impl.h', + 'renderer/compositor_bindings/web_animation_curve_common.cc', + 'renderer/compositor_bindings/web_animation_curve_common.h', + 'renderer/compositor_bindings/web_animation_impl.cc', + 'renderer/compositor_bindings/web_animation_impl.h', + 'renderer/compositor_bindings/web_compositor_support_impl.cc', + 'renderer/compositor_bindings/web_compositor_support_impl.h', + 'renderer/compositor_bindings/web_content_layer_impl.cc', + 'renderer/compositor_bindings/web_content_layer_impl.h', + 'renderer/compositor_bindings/web_external_bitmap_impl.cc', + 'renderer/compositor_bindings/web_external_bitmap_impl.h', + 'renderer/compositor_bindings/web_external_texture_layer_impl.cc', + 'renderer/compositor_bindings/web_external_texture_layer_impl.h', + 'renderer/compositor_bindings/web_filter_animation_curve_impl.cc', + 'renderer/compositor_bindings/web_filter_animation_curve_impl.h', + 'renderer/compositor_bindings/web_filter_operations_impl.cc', + 'renderer/compositor_bindings/web_filter_operations_impl.h', + 'renderer/compositor_bindings/web_float_animation_curve_impl.cc', + 'renderer/compositor_bindings/web_float_animation_curve_impl.h', + 'renderer/compositor_bindings/web_image_layer_impl.cc', + 'renderer/compositor_bindings/web_image_layer_impl.h', + 'renderer/compositor_bindings/web_layer_impl.cc', + 'renderer/compositor_bindings/web_layer_impl.h', + 'renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc', + 'renderer/compositor_bindings/web_layer_impl_fixed_bounds.h', + 'renderer/compositor_bindings/web_nine_patch_layer_impl.cc', + 'renderer/compositor_bindings/web_nine_patch_layer_impl.h', + 'renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc', + 'renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h', + 'renderer/compositor_bindings/web_scrollbar_layer_impl.cc', + 'renderer/compositor_bindings/web_scrollbar_layer_impl.h', + 'renderer/compositor_bindings/web_solid_color_layer_impl.cc', + 'renderer/compositor_bindings/web_solid_color_layer_impl.h', + 'renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc', + 'renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h', + 'renderer/compositor_bindings/web_transform_animation_curve_impl.cc', + 'renderer/compositor_bindings/web_transform_animation_curve_impl.h', + 'renderer/compositor_bindings/web_transform_operations_impl.cc', + 'renderer/compositor_bindings/web_transform_operations_impl.h', 'renderer/context_menu_params_builder.cc', 'renderer/context_menu_params_builder.h', 'renderer/cursor_utils.cc', diff --git a/content/content_shell.gypi b/content/content_shell.gypi index 03bc7e237a780b..743453b99d1373 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -61,7 +61,6 @@ '../url/url.gyp:url_lib', '../v8/tools/gyp/v8.gyp:v8', '../webkit/common/webkit_common.gyp:webkit_common', - '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_bindings', '../webkit/storage_browser.gyp:webkit_storage_browser', '../webkit/webkit_resources.gyp:webkit_resources', ], diff --git a/content/content_tests.gypi b/content/content_tests.gypi index b23b7cc3a78154..cdd0a72af48607 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -53,8 +53,6 @@ '../ui/events/events.gyp:events_base', '../ui/events/events.gyp:events_test_support', '../ui/events/events.gyp:gesture_detection', - '../ui/gfx/gfx.gyp:gfx', - '../ui/gfx/gfx.gyp:gfx_geometry', '../ui/gfx/gfx.gyp:gfx_test_support', '../ui/resources/ui_resources.gyp:ui_resources', '../url/url.gyp:url_lib', @@ -268,6 +266,7 @@ 'content.gyp:content_renderer', 'content.gyp:content_utility', 'content.gyp:content_worker', + '../cc/cc.gyp:cc', '../cc/cc_tests.gyp:cc_test_support', '../media/media.gyp:media', '../ppapi/ppapi_internal.gyp:ppapi_host', @@ -279,7 +278,6 @@ '../v8/tools/gyp/v8.gyp:v8', '../webkit/child/webkit_child.gyp:webkit_child', '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', - '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', '../webkit/storage_browser.gyp:webkit_storage_browser', '../webkit/storage_common.gyp:webkit_storage_common', ], @@ -655,6 +653,9 @@ 'renderer/android/phone_number_detector_unittest.cc', 'renderer/battery_status/battery_status_dispatcher_unittest.cc', 'renderer/bmp_image_decoder_unittest.cc', + 'renderer/compositor_bindings/web_animation_unittest.cc', + 'renderer/compositor_bindings/web_float_animation_curve_unittest.cc', + 'renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc', 'renderer/device_sensors/device_motion_event_pump_unittest.cc', 'renderer/device_sensors/device_orientation_event_pump_unittest.cc', 'renderer/disambiguation_popup_helper_unittest.cc', @@ -716,6 +717,8 @@ 'content.gyp:content_renderer', 'content_resources.gyp:content_resources', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../cc/cc.gyp:cc', + '../cc/cc_tests.gyp:cc_test_support', '../gpu/gpu.gyp:gpu', '../gpu/gpu.gyp:gpu_unittest_utils', '../ipc/ipc.gyp:test_support_ipc', diff --git a/content/public/test/layouttest_support.h b/content/public/test/layouttest_support.h index 76a4deec13747a..f374bdd8325620 100644 --- a/content/public/test/layouttest_support.h +++ b/content/public/test/layouttest_support.h @@ -9,6 +9,7 @@ #include #include "base/callback_forward.h" +#include "cc/layers/texture_layer.h" #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" namespace blink { @@ -17,6 +18,7 @@ class WebDeviceMotionData; class WebDeviceOrientationData; class WebGamepad; class WebGamepads; +class WebLayer; struct WebSize; } @@ -110,6 +112,9 @@ void DisableAutoResizeMode(RenderView* render_view, std::string DumpBackForwardList(std::vector& page_state, size_t current_index); +// Instantiates WebLayerImpl for TestPlugin. +blink::WebLayer* InstantiateWebLayer(scoped_refptr layer); + } // namespace content #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index 9179ad7bc2a5cd..d675a1e33fcc04 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn @@ -51,8 +51,6 @@ source_set("renderer") { #'../third_party/WebKit/public/blink.gyp:blink', #'../third_party/libjingle/libjingle.gyp:libjingle', #'../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', - #'../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_bindings', - #'../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', ] if (!enable_notifications) { diff --git a/content/renderer/child_frame_compositing_helper.cc b/content/renderer/child_frame_compositing_helper.cc index 0a651db5070eaa..fee5ab7ec4744f 100644 --- a/content/renderer/child_frame_compositing_helper.cc +++ b/content/renderer/child_frame_compositing_helper.cc @@ -18,6 +18,7 @@ #include "content/common/gpu/client/context_provider_command_buffer.h" #include "content/renderer/browser_plugin/browser_plugin.h" #include "content/renderer/browser_plugin/browser_plugin_manager.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_thread_impl.h" #include "skia/ext/image_operations.h" @@ -27,7 +28,6 @@ #include "third_party/khronos/GLES2/gl2.h" #include "ui/gfx/size_conversions.h" #include "ui/gfx/skia_util.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" namespace content { @@ -186,7 +186,7 @@ void ChildFrameCompositingHelper::EnableCompositing(bool enable) { background_layer_->SetMasksToBounds(true); background_layer_->SetBackgroundColor( SkColorSetARGBInline(255, 255, 255, 255)); - web_layer_.reset(new webkit::WebLayerImpl(background_layer_)); + web_layer_.reset(new WebLayerImpl(background_layer_)); } if (GetContainer()) { diff --git a/webkit/renderer/compositor_bindings/OWNERS b/content/renderer/compositor_bindings/OWNERS similarity index 100% rename from webkit/renderer/compositor_bindings/OWNERS rename to content/renderer/compositor_bindings/OWNERS diff --git a/webkit/renderer/compositor_bindings/PRESUBMIT.py b/content/renderer/compositor_bindings/PRESUBMIT.py similarity index 94% rename from webkit/renderer/compositor_bindings/PRESUBMIT.py rename to content/renderer/compositor_bindings/PRESUBMIT.py index 4c2c1f987411e8..8e4e571848315a 100644 --- a/webkit/renderer/compositor_bindings/PRESUBMIT.py +++ b/content/renderer/compositor_bindings/PRESUBMIT.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/webkit/renderer/compositor_bindings/scrollbar_impl.cc b/content/renderer/compositor_bindings/scrollbar_impl.cc similarity index 85% rename from webkit/renderer/compositor_bindings/scrollbar_impl.cc rename to content/renderer/compositor_bindings/scrollbar_impl.cc index adbb6b81a5061d..6ee82d42444c9e 100644 --- a/webkit/renderer/compositor_bindings/scrollbar_impl.cc +++ b/content/renderer/compositor_bindings/scrollbar_impl.cc @@ -1,8 +1,8 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/scrollbar_impl.h" +#include "content/renderer/compositor_bindings/scrollbar_impl.h" #include "base/logging.h" #include "third_party/WebKit/public/platform/WebScrollbar.h" @@ -10,7 +10,7 @@ using blink::WebScrollbar; -namespace webkit { +namespace content { ScrollbarImpl::ScrollbarImpl( scoped_ptr scrollbar, @@ -18,9 +18,11 @@ ScrollbarImpl::ScrollbarImpl( scoped_ptr geometry) : scrollbar_(scrollbar.Pass()), painter_(painter), - geometry_(geometry.Pass()) {} + geometry_(geometry.Pass()) { +} -ScrollbarImpl::~ScrollbarImpl() {} +ScrollbarImpl::~ScrollbarImpl() { +} cc::ScrollbarOrientation ScrollbarImpl::Orientation() const { if (scrollbar_->orientation() == WebScrollbar::Horizontal) @@ -62,9 +64,9 @@ gfx::Rect ScrollbarImpl::TrackRect() const { return geometry_->trackRect(scrollbar_.get()); } -void ScrollbarImpl::PaintPart( - SkCanvas* canvas, cc::ScrollbarPart part, - const gfx::Rect& content_rect) { +void ScrollbarImpl::PaintPart(SkCanvas* canvas, + cc::ScrollbarPart part, + const gfx::Rect& content_rect) { if (part == cc::THUMB) { painter_.paintThumb(canvas, content_rect); return; @@ -84,8 +86,7 @@ void ScrollbarImpl::PaintPart( gfx::Rect forward_button_start_paint_rect = geometry_->forwardButtonStartRect(scrollbar_.get()); - painter_.paintForwardButtonStart(canvas, - forward_button_start_paint_rect); + painter_.paintForwardButtonStart(canvas, forward_button_start_paint_rect); gfx::Rect forward_button_end_paint_rect = geometry_->forwardButtonEndRect(scrollbar_.get()); @@ -104,4 +105,5 @@ void ScrollbarImpl::PaintPart( painter_.paintTickmarks(canvas, track_paint_rect); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/scrollbar_impl.h b/content/renderer/compositor_bindings/scrollbar_impl.h similarity index 82% rename from webkit/renderer/compositor_bindings/scrollbar_impl.h rename to content/renderer/compositor_bindings/scrollbar_impl.h index 5938a7efa02f41..9159d0a92672f4 100644 --- a/webkit/renderer/compositor_bindings/scrollbar_impl.h +++ b/content/renderer/compositor_bindings/scrollbar_impl.h @@ -1,9 +1,9 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" @@ -15,7 +15,7 @@ class WebScrollbar; class WebScrollbarThemeGeometry; } -namespace webkit { +namespace content { class ScrollbarImpl : public cc::Scrollbar { public: @@ -45,6 +45,7 @@ class ScrollbarImpl : public cc::Scrollbar { DISALLOW_COPY_AND_ASSIGN(ScrollbarImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_animation_curve_common.cc b/content/renderer/compositor_bindings/web_animation_curve_common.cc similarity index 82% rename from webkit/renderer/compositor_bindings/web_animation_curve_common.cc rename to content/renderer/compositor_bindings/web_animation_curve_common.cc index 0104ea346a0c95..c5bb36dacfbe8e 100644 --- a/webkit/renderer/compositor_bindings/web_animation_curve_common.cc +++ b/content/renderer/compositor_bindings/web_animation_curve_common.cc @@ -1,12 +1,12 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_animation_curve_common.h" +#include "content/renderer/compositor_bindings/web_animation_curve_common.h" #include "cc/animation/timing_function.h" -namespace webkit { +namespace content { scoped_ptr CreateTimingFunction( blink::WebAnimationCurve::TimingFunctionType type) { @@ -25,4 +25,5 @@ scoped_ptr CreateTimingFunction( return scoped_ptr(); } -} // namespace webkit +} // namespace content + diff --git a/content/renderer/compositor_bindings/web_animation_curve_common.h b/content/renderer/compositor_bindings/web_animation_curve_common.h new file mode 100644 index 00000000000000..e0fd7c8d028042 --- /dev/null +++ b/content/renderer/compositor_bindings/web_animation_curve_common.h @@ -0,0 +1,21 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ + +#include "base/memory/scoped_ptr.h" +#include "third_party/WebKit/public/platform/WebAnimationCurve.h" + +namespace cc { +class TimingFunction; +} + +namespace content { +scoped_ptr CreateTimingFunction( + blink::WebAnimationCurve::TimingFunctionType); +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ + diff --git a/webkit/renderer/compositor_bindings/web_animation_impl.cc b/content/renderer/compositor_bindings/web_animation_impl.cc similarity index 76% rename from webkit/renderer/compositor_bindings/web_animation_impl.cc rename to content/renderer/compositor_bindings/web_animation_impl.cc index ca329ecd629f03..832aa6e3d3187c 100644 --- a/webkit/renderer/compositor_bindings/web_animation_impl.cc +++ b/content/renderer/compositor_bindings/web_animation_impl.cc @@ -1,18 +1,18 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_animation_impl.h" +#include "content/renderer/compositor_bindings/web_animation_impl.h" #include "cc/animation/animation.h" #include "cc/animation/animation_curve.h" #include "cc/animation/animation_id_provider.h" +#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h" #include "third_party/WebKit/public/platform/WebAnimation.h" #include "third_party/WebKit/public/platform/WebAnimationCurve.h" -#include "webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h" -#include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" -#include "webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" -#include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h" using cc::Animation; using cc::AnimationIdProvider; @@ -20,7 +20,7 @@ using cc::AnimationIdProvider; using blink::WebAnimation; using blink::WebAnimationCurve; -namespace webkit { +namespace content { WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& web_curve, TargetProperty target_property, @@ -68,18 +68,25 @@ WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& web_curve, static_cast(target_property)); } -WebAnimationImpl::~WebAnimationImpl() {} +WebAnimationImpl::~WebAnimationImpl() { +} -int WebAnimationImpl::id() { return animation_->id(); } +int WebAnimationImpl::id() { + return animation_->id(); +} blink::WebAnimation::TargetProperty WebAnimationImpl::targetProperty() const { return static_cast( animation_->target_property()); } -int WebAnimationImpl::iterations() const { return animation_->iterations(); } +int WebAnimationImpl::iterations() const { + return animation_->iterations(); +} -void WebAnimationImpl::setIterations(int n) { animation_->set_iterations(n); } +void WebAnimationImpl::setIterations(int n) { + animation_->set_iterations(n); +} double WebAnimationImpl::startTime() const { return (animation_->start_time() - base::TimeTicks()).InSecondsF(); @@ -149,19 +156,5 @@ scoped_ptr WebAnimationImpl::PassAnimation() { return animation_.Pass(); } -#define COMPILE_ASSERT_MATCHING_ENUMS(webkit_name, cc_name) \ - COMPILE_ASSERT(static_cast(webkit_name) == static_cast(cc_name), \ - mismatching_enums) - -COMPILE_ASSERT_MATCHING_ENUMS( - WebAnimation::TargetPropertyTransform, Animation::Transform); -COMPILE_ASSERT_MATCHING_ENUMS( - WebAnimation::TargetPropertyOpacity, Animation::Opacity); -COMPILE_ASSERT_MATCHING_ENUMS( - WebAnimation::TargetPropertyFilter, Animation::Filter); -#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED -COMPILE_ASSERT_MATCHING_ENUMS( - WebAnimation::TargetPropertyScrollOffset, Animation::ScrollOffset); -#endif +} // namespace content -} // namespace webkit diff --git a/webkit/renderer/compositor_bindings/web_animation_impl.h b/content/renderer/compositor_bindings/web_animation_impl.h similarity index 69% rename from webkit/renderer/compositor_bindings/web_animation_impl.h rename to content/renderer/compositor_bindings/web_animation_impl.h index 07d72c7860c342..a706358ae36d96 100644 --- a/webkit/renderer/compositor_bindings/web_animation_impl.h +++ b/content/renderer/compositor_bindings/web_animation_impl.h @@ -1,23 +1,27 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebAnimation.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" -namespace cc { class Animation; } +namespace cc { +class Animation; +} -namespace blink { class WebAnimationCurve; } +namespace blink { +class WebAnimationCurve; +} -namespace webkit { +namespace content { class WebAnimationImpl : public blink::WebAnimation { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebAnimationImpl( + CONTENT_EXPORT WebAnimationImpl( const blink::WebAnimationCurve& curve, TargetProperty target, int animation_id, @@ -49,6 +53,7 @@ class WebAnimationImpl : public blink::WebAnimation { DISALLOW_COPY_AND_ASSIGN(WebAnimationImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_animation_unittest.cc b/content/renderer/compositor_bindings/web_animation_unittest.cc similarity index 87% rename from webkit/renderer/compositor_bindings/web_animation_unittest.cc rename to content/renderer/compositor_bindings/web_animation_unittest.cc index 9d0f666850f749..b529c018c50899 100644 --- a/webkit/renderer/compositor_bindings/web_animation_unittest.cc +++ b/content/renderer/compositor_bindings/web_animation_unittest.cc @@ -1,17 +1,17 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/memory/scoped_ptr.h" +#include "content/renderer/compositor_bindings/web_animation_impl.h" +#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/renderer/compositor_bindings/web_animation_impl.h" -#include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" using blink::WebAnimation; using blink::WebAnimationCurve; using blink::WebFloatAnimationCurve; -namespace webkit { +namespace content { namespace { TEST(WebAnimationTest, DefaultSettings) { @@ -56,4 +56,5 @@ TEST(WebAnimationTest, ModifiedSettings) { } } // namespace -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_blend_mode.h b/content/renderer/compositor_bindings/web_blend_mode.h similarity index 92% rename from webkit/renderer/compositor_bindings/web_blend_mode.h rename to content/renderer/compositor_bindings/web_blend_mode.h index 24236ffe622563..6ab6adee98b05a 100644 --- a/webkit/renderer/compositor_bindings/web_blend_mode.h +++ b/content/renderer/compositor_bindings/web_blend_mode.h @@ -1,13 +1,13 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ #include "third_party/WebKit/public/platform/WebBlendMode.h" -namespace webkit { +namespace content { inline SkXfermode::Mode BlendModeToSkia(blink::WebBlendMode blend_mode) { switch (blend_mode) { @@ -101,6 +101,7 @@ inline blink::WebBlendMode BlendModeFromSkia(SkXfermode::Mode blend_mode) { return blink::WebBlendModeNormal; } -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ diff --git a/webkit/renderer/compositor_bindings/web_compositor_support_impl.cc b/content/renderer/compositor_bindings/web_compositor_support_impl.cc similarity index 73% rename from webkit/renderer/compositor_bindings/web_compositor_support_impl.cc rename to content/renderer/compositor_bindings/web_compositor_support_impl.cc index 15bb2a6540d6db..0e4e6fa88f5af7 100644 --- a/webkit/renderer/compositor_bindings/web_compositor_support_impl.cc +++ b/content/renderer/compositor_bindings/web_compositor_support_impl.cc @@ -1,28 +1,28 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" +#include "content/renderer/compositor_bindings/web_compositor_support_impl.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop_proxy.h" #include "cc/animation/transform_operations.h" #include "cc/output/output_surface.h" #include "cc/output/software_output_device.h" -#include "webkit/renderer/compositor_bindings/web_animation_impl.h" -#include "webkit/renderer/compositor_bindings/web_content_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h" -#include "webkit/renderer/compositor_bindings/web_filter_operations_impl.h" -#include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" -#include "webkit/renderer/compositor_bindings/web_image_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" -#include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h" -#include "webkit/renderer/compositor_bindings/web_transform_operations_impl.h" +#include "content/renderer/compositor_bindings/web_animation_impl.h" +#include "content/renderer/compositor_bindings/web_content_layer_impl.h" +#include "content/renderer/compositor_bindings/web_external_texture_layer_impl.h" +#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_filter_operations_impl.h" +#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_image_layer_impl.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" +#include "content/renderer/compositor_bindings/web_nine_patch_layer_impl.h" +#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_scrollbar_layer_impl.h" +#include "content/renderer/compositor_bindings/web_solid_color_layer_impl.h" +#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_transform_operations_impl.h" using blink::WebAnimation; using blink::WebAnimationCurve; @@ -47,11 +47,13 @@ using blink::WebSolidColorLayer; using blink::WebTransformAnimationCurve; using blink::WebTransformOperations; -namespace webkit { +namespace content { -WebCompositorSupportImpl::WebCompositorSupportImpl() {} +WebCompositorSupportImpl::WebCompositorSupportImpl() { +} -WebCompositorSupportImpl::~WebCompositorSupportImpl() {} +WebCompositorSupportImpl::~WebCompositorSupportImpl() { +} WebLayer* WebCompositorSupportImpl::createLayer() { return new WebLayerImpl(); @@ -135,4 +137,5 @@ WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() { return new WebFilterOperationsImpl(); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_compositor_support_impl.h b/content/renderer/compositor_bindings/web_compositor_support_impl.h similarity index 82% rename from webkit/renderer/compositor_bindings/web_compositor_support_impl.h rename to content/renderer/compositor_bindings/web_compositor_support_impl.h index aa7eee0b01efdc..c7d53858745b99 100644 --- a/webkit/renderer/compositor_bindings/web_compositor_support_impl.h +++ b/content/renderer/compositor_bindings/web_compositor_support_impl.h @@ -1,12 +1,13 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ #include "base/memory/ref_counted.h" #include "base/message_loop/message_loop_proxy.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebAnimationCurve.h" #include "third_party/WebKit/public/platform/WebCompositorSupport.h" #include "third_party/WebKit/public/platform/WebLayer.h" @@ -16,9 +17,10 @@ namespace blink { class WebGraphicsContext3D; } -namespace webkit { +namespace content { -class WebCompositorSupportImpl : public blink::WebCompositorSupport { +class CONTENT_EXPORT WebCompositorSupportImpl + : public NON_EXPORTED_BASE(blink::WebCompositorSupport) { public: WebCompositorSupportImpl(); virtual ~WebCompositorSupportImpl(); @@ -60,6 +62,7 @@ class WebCompositorSupportImpl : public blink::WebCompositorSupport { DISALLOW_COPY_AND_ASSIGN(WebCompositorSupportImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_content_layer_impl.cc b/content/renderer/compositor_bindings/web_content_layer_impl.cc similarity index 86% rename from webkit/renderer/compositor_bindings/web_content_layer_impl.cc rename to content/renderer/compositor_bindings/web_content_layer_impl.cc index 96799e689f38ea..1a1eb4331fd786 100644 --- a/webkit/renderer/compositor_bindings/web_content_layer_impl.cc +++ b/content/renderer/compositor_bindings/web_content_layer_impl.cc @@ -1,8 +1,8 @@ -// Copyright 2011 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_content_layer_impl.h" +#include "content/renderer/compositor_bindings/web_content_layer_impl.h" #include "cc/layers/content_layer.h" #include "cc/layers/picture_layer.h" @@ -16,11 +16,10 @@ using cc::ContentLayer; using cc::PictureLayer; -namespace webkit { +namespace content { WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client) - : client_(client), - ignore_lcd_text_change_(false) { + : client_(client), ignore_lcd_text_change_(false) { if (WebLayerImpl::UsingPictureLayer()) layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this))); else @@ -36,7 +35,9 @@ WebContentLayerImpl::~WebContentLayerImpl() { static_cast(layer_->layer())->ClearClient(); } -blink::WebLayer* WebContentLayerImpl::layer() { return layer_.get(); } +blink::WebLayer* WebContentLayerImpl::layer() { + return layer_.get(); +} void WebContentLayerImpl::setDoubleSided(bool double_sided) { layer_->layer()->SetDoubleSided(double_sided); @@ -81,6 +82,9 @@ void WebContentLayerImpl::DidChangeLayerCanUseLCDText() { layer_->invalidate(); } -bool WebContentLayerImpl::FillsBoundsCompletely() const { return false; } +bool WebContentLayerImpl::FillsBoundsCompletely() const { + return false; +} + +} // namespace content -} // namespace webkit diff --git a/webkit/renderer/compositor_bindings/web_content_layer_impl.h b/content/renderer/compositor_bindings/web_content_layer_impl.h similarity index 70% rename from webkit/renderer/compositor_bindings/web_content_layer_impl.h rename to content/renderer/compositor_bindings/web_content_layer_impl.h index e58f332e68240a..435acfd57ab132 100644 --- a/webkit/renderer/compositor_bindings/web_content_layer_impl.h +++ b/content/renderer/compositor_bindings/web_content_layer_impl.h @@ -1,29 +1,31 @@ -// Copyright 2011 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" #include "cc/layers/content_layer_client.h" +#include "content/common/content_export.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "third_party/WebKit/public/platform/WebContentLayer.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" namespace cc { class IntRect; class FloatRect; } -namespace blink { class WebContentLayerClient; } +namespace blink { +class WebContentLayerClient; +} -namespace webkit { +namespace content { class WebContentLayerImpl : public blink::WebContentLayer, public cc::ContentLayerClient { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebContentLayerImpl( + CONTENT_EXPORT explicit WebContentLayerImpl( blink::WebContentLayerClient*); // WebContentLayer implementation. @@ -54,6 +56,7 @@ class WebContentLayerImpl : public blink::WebContentLayer, DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_external_bitmap_impl.cc b/content/renderer/compositor_bindings/web_external_bitmap_impl.cc similarity index 73% rename from webkit/renderer/compositor_bindings/web_external_bitmap_impl.cc rename to content/renderer/compositor_bindings/web_external_bitmap_impl.cc index 5e97b57980613b..bf3d853f6067c3 100644 --- a/webkit/renderer/compositor_bindings/web_external_bitmap_impl.cc +++ b/content/renderer/compositor_bindings/web_external_bitmap_impl.cc @@ -1,12 +1,12 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h" +#include "content/renderer/compositor_bindings/web_external_bitmap_impl.h" #include "base/memory/shared_memory.h" -namespace webkit { +namespace content { namespace { @@ -19,9 +19,11 @@ void SetSharedMemoryAllocationFunction( g_memory_allocator = allocator; } -WebExternalBitmapImpl::WebExternalBitmapImpl() {} +WebExternalBitmapImpl::WebExternalBitmapImpl() { +} -WebExternalBitmapImpl::~WebExternalBitmapImpl() {} +WebExternalBitmapImpl::~WebExternalBitmapImpl() { +} void WebExternalBitmapImpl::setSize(blink::WebSize size) { if (size != size_) { @@ -41,4 +43,5 @@ uint8* WebExternalBitmapImpl::pixels() { return static_cast(shared_memory_->memory()); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_external_bitmap_impl.h b/content/renderer/compositor_bindings/web_external_bitmap_impl.h similarity index 58% rename from webkit/renderer/compositor_bindings/web_external_bitmap_impl.h rename to content/renderer/compositor_bindings/web_external_bitmap_impl.h index b113d6453d6295..4d7769e3e4dfd4 100644 --- a/webkit/renderer/compositor_bindings/web_external_bitmap_impl.h +++ b/content/renderer/compositor_bindings/web_external_bitmap_impl.h @@ -1,31 +1,30 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ #include "base/bind.h" #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebExternalBitmap.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" namespace base { class SharedMemory; } -namespace webkit { +namespace content { -typedef scoped_ptr (*SharedMemoryAllocationFunction)( - size_t); +typedef scoped_ptr(*SharedMemoryAllocationFunction)(size_t); // Sets the function that this will use to allocate shared memory. -WEBKIT_COMPOSITOR_BINDINGS_EXPORT void SetSharedMemoryAllocationFunction( +CONTENT_EXPORT void SetSharedMemoryAllocationFunction( SharedMemoryAllocationFunction); class WebExternalBitmapImpl : public blink::WebExternalBitmap { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebExternalBitmapImpl(); + CONTENT_EXPORT explicit WebExternalBitmapImpl(); virtual ~WebExternalBitmapImpl(); // blink::WebExternalBitmap implementation. @@ -42,6 +41,7 @@ class WebExternalBitmapImpl : public blink::WebExternalBitmap { DISALLOW_COPY_AND_ASSIGN(WebExternalBitmapImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc b/content/renderer/compositor_bindings/web_external_texture_layer_impl.cc similarity index 83% rename from webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc rename to content/renderer/compositor_bindings/web_external_texture_layer_impl.cc index 320aa2297f2fa7..9709d5951a942c 100644 --- a/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc +++ b/content/renderer/compositor_bindings/web_external_texture_layer_impl.cc @@ -1,26 +1,26 @@ -// Copyright 2011 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" +#include "content/renderer/compositor_bindings/web_external_texture_layer_impl.h" #include "cc/layers/texture_layer.h" #include "cc/resources/resource_update_queue.h" #include "cc/resources/single_release_callback.h" #include "cc/resources/texture_mailbox.h" +#include "content/renderer/compositor_bindings/web_external_bitmap_impl.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" #include "third_party/WebKit/public/platform/WebFloatRect.h" #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" #include "third_party/WebKit/public/platform/WebSize.h" #include "third_party/khronos/GLES2/gl2.h" -#include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" using cc::TextureLayer; using cc::ResourceUpdateQueue; -namespace webkit { +namespace content { WebExternalTextureLayerImpl::WebExternalTextureLayerImpl( blink::WebExternalTextureLayerClient* client) @@ -35,10 +35,12 @@ WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl() { static_cast(layer_->layer())->ClearClient(); } -blink::WebLayer* WebExternalTextureLayerImpl::layer() { return layer_.get(); } +blink::WebLayer* WebExternalTextureLayerImpl::layer() { + return layer_.get(); +} void WebExternalTextureLayerImpl::clearTexture() { - TextureLayer *layer = static_cast(layer_->layer()); + TextureLayer* layer = static_cast(layer_->layer()); layer->ClearTexture(); } @@ -85,11 +87,11 @@ bool WebExternalTextureLayerImpl::PrepareTextureMailbox( mailbox->set_allow_overlay(client_mailbox.allowOverlay); if (mailbox->IsValid()) { - *release_callback = cc::SingleReleaseCallback::Create(base::Bind( - &WebExternalTextureLayerImpl::DidReleaseMailbox, - this->AsWeakPtr(), - client_mailbox, - bitmap)); + *release_callback = cc::SingleReleaseCallback::Create( + base::Bind(&WebExternalTextureLayerImpl::DidReleaseMailbox, + this->AsWeakPtr(), + client_mailbox, + bitmap)); } return true; @@ -124,4 +126,5 @@ void WebExternalTextureLayerImpl::DidReleaseMailbox( layer->client_->mailboxReleased(available_mailbox); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h b/content/renderer/compositor_bindings/web_external_texture_layer_impl.h similarity index 78% rename from webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h rename to content/renderer/compositor_bindings/web_external_texture_layer_impl.h index c51b0a2131329c..bc46b937e8e5b7 100644 --- a/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h +++ b/content/renderer/compositor_bindings/web_external_texture_layer_impl.h @@ -1,16 +1,16 @@ -// Copyright 2011 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ #include "base/bind.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "cc/layers/texture_layer_client.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" namespace cc { class SingleReleaseCallback; @@ -22,7 +22,7 @@ struct WebFloatRect; struct WebExternalTextureMailbox; } -namespace webkit { +namespace content { class WebLayerImpl; class WebExternalBitmapImpl; @@ -32,7 +32,7 @@ class WebExternalTextureLayerImpl public cc::TextureLayerClient, public base::SupportsWeakPtr { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebExternalTextureLayerImpl( + CONTENT_EXPORT explicit WebExternalTextureLayerImpl( blink::WebExternalTextureLayerClient*); virtual ~WebExternalTextureLayerImpl(); @@ -67,6 +67,7 @@ class WebExternalTextureLayerImpl DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.cc b/content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc similarity index 63% rename from webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.cc rename to content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc index 6663267011a4e3..944726ecccbb04 100644 --- a/webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.cc +++ b/content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc @@ -1,34 +1,36 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h" #include "cc/animation/keyframed_animation_curve.h" #include "cc/animation/timing_function.h" #include "cc/output/filter_operations.h" -#include "webkit/renderer/compositor_bindings/web_animation_curve_common.h" -#include "webkit/renderer/compositor_bindings/web_filter_operations_impl.h" +#include "content/renderer/compositor_bindings/web_animation_curve_common.h" +#include "content/renderer/compositor_bindings/web_filter_operations_impl.h" using blink::WebFilterKeyframe; -namespace webkit { +namespace content { WebFilterAnimationCurveImpl::WebFilterAnimationCurveImpl() - : curve_(cc::KeyframedFilterAnimationCurve::Create()) {} + : curve_(cc::KeyframedFilterAnimationCurve::Create()) { +} -WebFilterAnimationCurveImpl::~WebFilterAnimationCurveImpl() {} +WebFilterAnimationCurveImpl::~WebFilterAnimationCurveImpl() { +} -blink::WebAnimationCurve::AnimationCurveType -WebFilterAnimationCurveImpl::type() const { +blink::WebAnimationCurve::AnimationCurveType WebFilterAnimationCurveImpl::type() + const { return WebAnimationCurve::AnimationCurveTypeFilter; } void WebFilterAnimationCurveImpl::add(const WebFilterKeyframe& keyframe, TimingFunctionType type) { const cc::FilterOperations& filter_operations = - static_cast(keyframe.value()) - .AsFilterOperations(); + static_cast(keyframe.value()) + .AsFilterOperations(); curve_->AddKeyframe(cc::FilterKeyframe::Create( keyframe.time(), filter_operations, CreateTimingFunction(type))); } @@ -39,8 +41,8 @@ void WebFilterAnimationCurveImpl::add(const WebFilterKeyframe& keyframe, double x2, double y2) { const cc::FilterOperations& filter_operations = - static_cast(keyframe.value()) - .AsFilterOperations(); + static_cast(keyframe.value()) + .AsFilterOperations(); curve_->AddKeyframe(cc::FilterKeyframe::Create( keyframe.time(), filter_operations, @@ -53,4 +55,5 @@ WebFilterAnimationCurveImpl::CloneToAnimationCurve() const { return curve_->Clone(); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h b/content/renderer/compositor_bindings/web_filter_animation_curve_impl.h similarity index 61% rename from webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h rename to content/renderer/compositor_bindings/web_filter_animation_curve_impl.h index 64f8f11800b585..82e82956e1308d 100644 --- a/webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h +++ b/content/renderer/compositor_bindings/web_filter_animation_curve_impl.h @@ -1,27 +1,28 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebFilterAnimationCurve.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" namespace cc { class AnimationCurve; class KeyframedFilterAnimationCurve; } -namespace blink { class WebFilterKeyframe; } +namespace blink { +class WebFilterKeyframe; +} -namespace webkit { +namespace content { -class WebFilterAnimationCurveImpl - : public blink::WebFilterAnimationCurve { +class WebFilterAnimationCurveImpl : public blink::WebFilterAnimationCurve { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebFilterAnimationCurveImpl(); + CONTENT_EXPORT WebFilterAnimationCurveImpl(); virtual ~WebFilterAnimationCurveImpl(); // blink::WebAnimationCurve implementation. @@ -44,6 +45,7 @@ class WebFilterAnimationCurveImpl DISALLOW_COPY_AND_ASSIGN(WebFilterAnimationCurveImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_filter_operations_impl.cc b/content/renderer/compositor_bindings/web_filter_operations_impl.cc similarity index 90% rename from webkit/renderer/compositor_bindings/web_filter_operations_impl.cc rename to content/renderer/compositor_bindings/web_filter_operations_impl.cc index 6fb35e656ca90a..2a11ea8a79df1b 100644 --- a/webkit/renderer/compositor_bindings/web_filter_operations_impl.cc +++ b/content/renderer/compositor_bindings/web_filter_operations_impl.cc @@ -1,8 +1,8 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_filter_operations_impl.h" +#include "content/renderer/compositor_bindings/web_filter_operations_impl.h" #include "base/basictypes.h" #include "skia/ext/refptr.h" @@ -10,11 +10,13 @@ #include "third_party/WebKit/public/platform/WebPoint.h" #include "third_party/skia/include/core/SkScalar.h" -namespace webkit { +namespace content { -WebFilterOperationsImpl::WebFilterOperationsImpl() {} +WebFilterOperationsImpl::WebFilterOperationsImpl() { +} -WebFilterOperationsImpl::~WebFilterOperationsImpl() {} +WebFilterOperationsImpl::~WebFilterOperationsImpl() { +} const cc::FilterOperations& WebFilterOperationsImpl::AsFilterOperations() const { @@ -90,4 +92,5 @@ void WebFilterOperationsImpl::clear() { filter_operations_.Clear(); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_filter_operations_impl.h b/content/renderer/compositor_bindings/web_filter_operations_impl.h similarity index 75% rename from webkit/renderer/compositor_bindings/web_filter_operations_impl.h rename to content/renderer/compositor_bindings/web_filter_operations_impl.h index a60366c22ab91c..d3020e6cfcdf86 100644 --- a/webkit/renderer/compositor_bindings/web_filter_operations_impl.h +++ b/content/renderer/compositor_bindings/web_filter_operations_impl.h @@ -1,19 +1,19 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ #include "cc/output/filter_operations.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebFilterOperations.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" -namespace webkit { +namespace content { class WebFilterOperationsImpl : public blink::WebFilterOperations { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebFilterOperationsImpl(); + CONTENT_EXPORT WebFilterOperationsImpl(); virtual ~WebFilterOperationsImpl(); const cc::FilterOperations& AsFilterOperations() const; @@ -44,6 +44,7 @@ class WebFilterOperationsImpl : public blink::WebFilterOperations { DISALLOW_COPY_AND_ASSIGN(WebFilterOperationsImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_float_animation_curve_impl.cc b/content/renderer/compositor_bindings/web_float_animation_curve_impl.cc similarity index 77% rename from webkit/renderer/compositor_bindings/web_float_animation_curve_impl.cc rename to content/renderer/compositor_bindings/web_float_animation_curve_impl.cc index fe2ae81d44018e..caa1f9ba8495e2 100644 --- a/webkit/renderer/compositor_bindings/web_float_animation_curve_impl.cc +++ b/content/renderer/compositor_bindings/web_float_animation_curve_impl.cc @@ -1,25 +1,27 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" #include "cc/animation/animation_curve.h" #include "cc/animation/keyframed_animation_curve.h" #include "cc/animation/timing_function.h" -#include "webkit/renderer/compositor_bindings/web_animation_curve_common.h" +#include "content/renderer/compositor_bindings/web_animation_curve_common.h" using blink::WebFloatKeyframe; -namespace webkit { +namespace content { WebFloatAnimationCurveImpl::WebFloatAnimationCurveImpl() - : curve_(cc::KeyframedFloatAnimationCurve::Create()) {} + : curve_(cc::KeyframedFloatAnimationCurve::Create()) { +} -WebFloatAnimationCurveImpl::~WebFloatAnimationCurveImpl() {} +WebFloatAnimationCurveImpl::~WebFloatAnimationCurveImpl() { +} blink::WebAnimationCurve::AnimationCurveType -WebFloatAnimationCurveImpl::type() const { + WebFloatAnimationCurveImpl::type() const { return blink::WebAnimationCurve::AnimationCurveTypeFloat; } @@ -54,4 +56,5 @@ WebFloatAnimationCurveImpl::CloneToAnimationCurve() const { return curve_->Clone(); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h b/content/renderer/compositor_bindings/web_float_animation_curve_impl.h similarity index 67% rename from webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h rename to content/renderer/compositor_bindings/web_float_animation_curve_impl.h index 99e186ddfcec7e..4c67b41a81b24f 100644 --- a/webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h +++ b/content/renderer/compositor_bindings/web_float_animation_curve_impl.h @@ -1,26 +1,28 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebFloatAnimationCurve.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" namespace cc { class AnimationCurve; class KeyframedFloatAnimationCurve; } -namespace blink { struct WebFloatKeyframe; } +namespace blink { +struct WebFloatKeyframe; +} -namespace webkit { +namespace content { class WebFloatAnimationCurveImpl : public blink::WebFloatAnimationCurve { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebFloatAnimationCurveImpl(); + CONTENT_EXPORT WebFloatAnimationCurveImpl(); virtual ~WebFloatAnimationCurveImpl(); // WebAnimationCurve implementation. @@ -46,6 +48,7 @@ class WebFloatAnimationCurveImpl : public blink::WebFloatAnimationCurve { DISALLOW_COPY_AND_ASSIGN(WebFloatAnimationCurveImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_float_animation_curve_unittest.cc b/content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc similarity index 97% rename from webkit/renderer/compositor_bindings/web_float_animation_curve_unittest.cc rename to content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc index 04605fbd80ea32..bc7c410642660a 100644 --- a/webkit/renderer/compositor_bindings/web_float_animation_curve_unittest.cc +++ b/content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc @@ -1,17 +1,17 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/memory/scoped_ptr.h" #include "cc/animation/timing_function.h" +#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" using blink::WebAnimationCurve; using blink::WebFloatAnimationCurve; using blink::WebFloatKeyframe; -namespace webkit { +namespace content { namespace { // Tests that a float animation with one keyframe works as expected. @@ -230,4 +230,5 @@ TEST(WebFloatAnimationCurveTest, DefaultTimingFunction) { } } // namespace -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_image_layer_impl.cc b/content/renderer/compositor_bindings/web_image_layer_impl.cc similarity index 65% rename from webkit/renderer/compositor_bindings/web_image_layer_impl.cc rename to content/renderer/compositor_bindings/web_image_layer_impl.cc index c3ae4aad4559a2..ecbfbd06bf20dd 100644 --- a/webkit/renderer/compositor_bindings/web_image_layer_impl.cc +++ b/content/renderer/compositor_bindings/web_image_layer_impl.cc @@ -1,15 +1,15 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_image_layer_impl.h" +#include "content/renderer/compositor_bindings/web_image_layer_impl.h" #include "cc/layers/image_layer.h" #include "cc/layers/picture_image_layer.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" +#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" -namespace webkit { +namespace content { WebImageLayerImpl::WebImageLayerImpl() { if (WebLayerImpl::UsingPictureLayer()) @@ -18,9 +18,12 @@ WebImageLayerImpl::WebImageLayerImpl() { layer_.reset(new WebLayerImpl(cc::ImageLayer::Create())); } -WebImageLayerImpl::~WebImageLayerImpl() {} +WebImageLayerImpl::~WebImageLayerImpl() { +} -blink::WebLayer* WebImageLayerImpl::layer() { return layer_.get(); } +blink::WebLayer* WebImageLayerImpl::layer() { + return layer_.get(); +} void WebImageLayerImpl::setBitmap(SkBitmap bitmap) { if (WebLayerImpl::UsingPictureLayer()) { @@ -32,4 +35,5 @@ void WebImageLayerImpl::setBitmap(SkBitmap bitmap) { } } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_image_layer_impl.h b/content/renderer/compositor_bindings/web_image_layer_impl.h similarity index 56% rename from webkit/renderer/compositor_bindings/web_image_layer_impl.h rename to content/renderer/compositor_bindings/web_image_layer_impl.h index 73ad4b096f52c5..359cfa5819d337 100644 --- a/webkit/renderer/compositor_bindings/web_image_layer_impl.h +++ b/content/renderer/compositor_bindings/web_image_layer_impl.h @@ -1,22 +1,22 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebImageLayer.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" -namespace webkit { +namespace content { class WebLayerImpl; class WebImageLayerImpl : public blink::WebImageLayer { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebImageLayerImpl(); + CONTENT_EXPORT WebImageLayerImpl(); virtual ~WebImageLayerImpl(); // blink::WebImageLayer implementation. @@ -29,6 +29,7 @@ class WebImageLayerImpl : public blink::WebImageLayer { DISALLOW_COPY_AND_ASSIGN(WebImageLayerImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/content/renderer/compositor_bindings/web_layer_impl.cc similarity index 86% rename from webkit/renderer/compositor_bindings/web_layer_impl.cc rename to content/renderer/compositor_bindings/web_layer_impl.cc index 7a39fe0b2e86b5..a575412f565bb1 100644 --- a/webkit/renderer/compositor_bindings/web_layer_impl.cc +++ b/content/renderer/compositor_bindings/web_layer_impl.cc @@ -1,8 +1,8 @@ -// Copyright 2011 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "base/bind.h" #include "base/debug/trace_event_impl.h" @@ -15,6 +15,10 @@ #include "cc/layers/layer.h" #include "cc/layers/layer_position_constraint.h" #include "cc/trees/layer_tree_host.h" +#include "content/renderer/compositor_bindings/web_animation_impl.h" +#include "content/renderer/compositor_bindings/web_blend_mode.h" +#include "content/renderer/compositor_bindings/web_filter_operations_impl.h" +#include "content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h" #include "third_party/WebKit/public/platform/WebFloatPoint.h" #include "third_party/WebKit/public/platform/WebFloatRect.h" #include "third_party/WebKit/public/platform/WebGraphicsLayerDebugInfo.h" @@ -23,10 +27,6 @@ #include "third_party/WebKit/public/platform/WebLayerScrollClient.h" #include "third_party/WebKit/public/platform/WebSize.h" #include "third_party/skia/include/utils/SkMatrix44.h" -#include "webkit/renderer/compositor_bindings/web_animation_impl.h" -#include "webkit/renderer/compositor_bindings/web_blend_mode.h" -#include "webkit/renderer/compositor_bindings/web_filter_operations_impl.h" -#include "webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h" using cc::Animation; using cc::Layer; @@ -38,7 +38,7 @@ using blink::WebSize; using blink::WebColor; using blink::WebFilterOperations; -namespace webkit { +namespace content { namespace { bool g_impl_side_painting_enabled = false; @@ -71,13 +71,17 @@ void WebLayerImpl::SetImplSidePaintingEnabled(bool enabled) { g_impl_side_painting_enabled = enabled; } -int WebLayerImpl::id() const { return layer_->id(); } +int WebLayerImpl::id() const { + return layer_->id(); +} void WebLayerImpl::invalidateRect(const blink::WebFloatRect& rect) { layer_->SetNeedsDisplayRect(rect); } -void WebLayerImpl::invalidate() { layer_->SetNeedsDisplay(); } +void WebLayerImpl::invalidate() { + layer_->SetNeedsDisplay(); +} void WebLayerImpl::addChild(WebLayer* child) { layer_->AddChild(static_cast(child)->layer()); @@ -92,19 +96,27 @@ void WebLayerImpl::replaceChild(WebLayer* reference, WebLayer* new_layer) { static_cast(new_layer)->layer()); } -void WebLayerImpl::removeFromParent() { layer_->RemoveFromParent(); } +void WebLayerImpl::removeFromParent() { + layer_->RemoveFromParent(); +} -void WebLayerImpl::removeAllChildren() { layer_->RemoveAllChildren(); } +void WebLayerImpl::removeAllChildren() { + layer_->RemoveAllChildren(); +} void WebLayerImpl::setBounds(const WebSize& size) { layer_->SetBounds(size); } -WebSize WebLayerImpl::bounds() const { return layer_->bounds(); } +WebSize WebLayerImpl::bounds() const { + return layer_->bounds(); +} void WebLayerImpl::setMasksToBounds(bool masks_to_bounds) { layer_->SetMasksToBounds(masks_to_bounds); } -bool WebLayerImpl::masksToBounds() const { return layer_->masks_to_bounds(); } +bool WebLayerImpl::masksToBounds() const { + return layer_->masks_to_bounds(); +} void WebLayerImpl::setMaskLayer(WebLayer* maskLayer) { layer_->SetMaskLayer( @@ -116,9 +128,13 @@ void WebLayerImpl::setReplicaLayer(WebLayer* replica_layer) { replica_layer ? static_cast(replica_layer)->layer() : 0); } -void WebLayerImpl::setOpacity(float opacity) { layer_->SetOpacity(opacity); } +void WebLayerImpl::setOpacity(float opacity) { + layer_->SetOpacity(opacity); +} -float WebLayerImpl::opacity() const { return layer_->opacity(); } +float WebLayerImpl::opacity() const { + return layer_->opacity(); +} void WebLayerImpl::setBlendMode(blink::WebBlendMode blend_mode) { layer_->SetBlendMode(BlendModeToSkia(blend_mode)); @@ -136,15 +152,21 @@ bool WebLayerImpl::isRootForIsolatedGroup() { return layer_->is_root_for_isolated_group(); } -void WebLayerImpl::setOpaque(bool opaque) { layer_->SetContentsOpaque(opaque); } +void WebLayerImpl::setOpaque(bool opaque) { + layer_->SetContentsOpaque(opaque); +} -bool WebLayerImpl::opaque() const { return layer_->contents_opaque(); } +bool WebLayerImpl::opaque() const { + return layer_->contents_opaque(); +} void WebLayerImpl::setPosition(const WebFloatPoint& position) { layer_->SetPosition(position); } -WebFloatPoint WebLayerImpl::position() const { return layer_->position(); } +WebFloatPoint WebLayerImpl::position() const { + return layer_->position(); +} void WebLayerImpl::setTransform(const SkMatrix44& matrix) { gfx::Transform transform; @@ -181,7 +203,9 @@ void WebLayerImpl::setDrawsContent(bool draws_content) { layer_->SetIsDrawable(draws_content); } -bool WebLayerImpl::drawsContent() const { return layer_->DrawsContent(); } +bool WebLayerImpl::drawsContent() const { + return layer_->DrawsContent(); +} void WebLayerImpl::setShouldFlattenTransform(bool flatten) { layer_->SetShouldFlattenTransform(flatten); @@ -216,8 +240,7 @@ void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { layer_->SetBackgroundFilters(filters_impl.AsFilterOperations()); } -void WebLayerImpl::setAnimationDelegate( - blink::WebAnimationDelegate* delegate) { +void WebLayerImpl::setAnimationDelegate(blink::WebAnimationDelegate* delegate) { animation_delegate_adapter_.reset( new WebToCCAnimationDelegateAdapter(delegate)); layer_->set_layer_animation_delegate(animation_delegate_adapter_.get()); @@ -238,15 +261,16 @@ void WebLayerImpl::removeAnimation( int animation_id, blink::WebAnimation::TargetProperty target_property) { layer_->layer_animation_controller()->RemoveAnimation( - animation_id, - static_cast(target_property)); + animation_id, static_cast(target_property)); } void WebLayerImpl::pauseAnimation(int animation_id, double time_offset) { layer_->PauseAnimation(animation_id, time_offset); } -bool WebLayerImpl::hasActiveAnimation() { return layer_->HasActiveAnimation(); } +bool WebLayerImpl::hasActiveAnimation() { + return layer_->HasActiveAnimation(); +} void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { layer_->SetForceRenderSurface(force_render_surface); @@ -268,7 +292,9 @@ void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) { layer_->SetScrollClipLayerId(clip_layer->id()); } -bool WebLayerImpl::scrollable() const { return layer_->scrollable(); } +bool WebLayerImpl::scrollable() const { + return layer_->scrollable(); +} void WebLayerImpl::setUserScrollable(bool horizontal, bool vertical) { layer_->SetUserScrollable(horizontal, vertical); @@ -392,8 +418,7 @@ blink::WebLayerPositionConstraint WebLayerImpl::positionConstraint() const { return ToWebLayerPositionConstraint(layer_->position_constraint()); } -void WebLayerImpl::setScrollClient( - blink::WebLayerScrollClient* scroll_client) { +void WebLayerImpl::setScrollClient(blink::WebLayerScrollClient* scroll_client) { if (scroll_client) { layer_->set_did_scroll_callback( base::Bind(&blink::WebLayerScrollClient::didScroll, @@ -403,7 +428,9 @@ void WebLayerImpl::setScrollClient( } } -bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } +bool WebLayerImpl::isOrphan() const { + return !layer_->layer_tree_host(); +} void WebLayerImpl::setWebLayerClient(blink::WebLayerClient* client) { web_layer_client_ = client; @@ -412,14 +439,15 @@ void WebLayerImpl::setWebLayerClient(blink::WebLayerClient* client) { class TracedDebugInfo : public base::debug::ConvertableToTraceFormat { public: // This object takes ownership of the debug_info object. - explicit TracedDebugInfo(blink::WebGraphicsLayerDebugInfo* debug_info) : - debug_info_(debug_info) {} + explicit TracedDebugInfo(blink::WebGraphicsLayerDebugInfo* debug_info) + : debug_info_(debug_info) {} virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE { DCHECK(thread_checker_.CalledOnValidThread()); blink::WebString web_string; debug_info_->appendAsTraceFormat(&web_string); out->append(web_string.utf8()); } + private: virtual ~TracedDebugInfo() {} scoped_ptr debug_info_; @@ -427,7 +455,7 @@ class TracedDebugInfo : public base::debug::ConvertableToTraceFormat { }; scoped_refptr - WebLayerImpl::TakeDebugInfo() { +WebLayerImpl::TakeDebugInfo() { if (!web_layer_client_) return NULL; blink::WebGraphicsLayerDebugInfo* debug_info = @@ -453,6 +481,9 @@ void WebLayerImpl::setClipParent(blink::WebLayer* parent) { layer_->SetClipParent(clip_parent); } -Layer* WebLayerImpl::layer() const { return layer_.get(); } +Layer* WebLayerImpl::layer() const { + return layer_.get(); +} + +} // namespace content -} // namespace webkit diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.h b/content/renderer/compositor_bindings/web_layer_impl.h similarity index 90% rename from webkit/renderer/compositor_bindings/web_layer_impl.h rename to content/renderer/compositor_bindings/web_layer_impl.h index f567dd62b67738..72f2b347562628 100644 --- a/webkit/renderer/compositor_bindings/web_layer_impl.h +++ b/content/renderer/compositor_bindings/web_layer_impl.h @@ -1,15 +1,16 @@ -// Copyright 2011 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ #include #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "cc/layers/layer_client.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebAnimation.h" #include "third_party/WebKit/public/platform/WebCString.h" #include "third_party/WebKit/public/platform/WebColor.h" @@ -21,9 +22,10 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebVector.h" #include "third_party/skia/include/utils/SkMatrix44.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" -namespace cc { class Layer; } +namespace cc { +class Layer; +} namespace blink { class WebFilterOperations; @@ -37,22 +39,22 @@ class ConvertableToTraceFormat; } } -namespace webkit { +namespace content { class WebToCCAnimationDelegateAdapter; class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerImpl(); - WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerImpl( + CONTENT_EXPORT WebLayerImpl(); + CONTENT_EXPORT explicit WebLayerImpl( scoped_refptr); virtual ~WebLayerImpl(); static bool UsingPictureLayer(); - WEBKIT_COMPOSITOR_BINDINGS_EXPORT static void SetImplSidePaintingEnabled( + CONTENT_EXPORT static void SetImplSidePaintingEnabled( bool enabled); - WEBKIT_COMPOSITOR_BINDINGS_EXPORT cc::Layer* layer() const; + CONTENT_EXPORT cc::Layer* layer() const; // WebLayer implementation. virtual int id() const; @@ -153,6 +155,7 @@ class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc similarity index 92% rename from webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc rename to content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc index 134ce406cca04f..b3195f9946c171 100644 --- a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc +++ b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc @@ -1,8 +1,8 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" +#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" #include "cc/layers/layer.h" #include "third_party/WebKit/public/platform/WebFloatPoint.h" @@ -11,7 +11,7 @@ using cc::Layer; -namespace webkit { +namespace content { WebLayerImplFixedBounds::WebLayerImplFixedBounds() { } @@ -20,7 +20,6 @@ WebLayerImplFixedBounds::WebLayerImplFixedBounds(scoped_refptr layer) : WebLayerImpl(layer) { } - WebLayerImplFixedBounds::~WebLayerImplFixedBounds() { } @@ -40,8 +39,8 @@ void WebLayerImplFixedBounds::setTransformOrigin( void WebLayerImplFixedBounds::setBounds(const blink::WebSize& bounds) { if (original_bounds_ != gfx::Size(bounds)) { - original_bounds_ = bounds; - UpdateLayerBoundsAndTransform(); + original_bounds_ = bounds; + UpdateLayerBoundsAndTransform(); } } @@ -98,4 +97,5 @@ void WebLayerImplFixedBounds::UpdateLayerBoundsAndTransform() { layer_->SetTransform(transform_with_bounds_scale); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h similarity index 67% rename from webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h rename to content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h index fbd709d66e7e6e..2048666fd18a18 100644 --- a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h +++ b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h @@ -1,15 +1,15 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "ui/gfx/size.h" #include "ui/gfx/transform.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" -namespace webkit { +namespace content { // A special implementation of WebLayerImpl for layers that its contents // need to be automatically scaled when the bounds changes. The compositor @@ -18,8 +18,8 @@ namespace webkit { // transformation scales. class WebLayerImplFixedBounds : public WebLayerImpl { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerImplFixedBounds(); - WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerImplFixedBounds( + CONTENT_EXPORT WebLayerImplFixedBounds(); + CONTENT_EXPORT explicit WebLayerImplFixedBounds( scoped_refptr); virtual ~WebLayerImplFixedBounds(); @@ -32,7 +32,7 @@ class WebLayerImplFixedBounds : public WebLayerImpl { virtual void setTransform(const SkMatrix44& transform); virtual SkMatrix44 transform() const; - WEBKIT_COMPOSITOR_BINDINGS_EXPORT void SetFixedBounds(gfx::Size bounds); + CONTENT_EXPORT void SetFixedBounds(gfx::Size bounds); protected: void SetTransformInternal(const gfx::Transform& transform); @@ -46,6 +46,7 @@ class WebLayerImplFixedBounds : public WebLayerImpl { DISALLOW_COPY_AND_ASSIGN(WebLayerImplFixedBounds); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ diff --git a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc similarity index 91% rename from webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc rename to content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc index ecf8c020020c0c..1935e209b6c0dc 100644 --- a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc +++ b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc @@ -1,4 +1,4 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,17 +7,17 @@ #include "cc/test/fake_layer_tree_host.h" #include "cc/test/geometry_test_utils.h" #include "cc/trees/layer_tree_host_common.h" +#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/public/platform/WebFloatPoint.h" #include "third_party/WebKit/public/platform/WebSize.h" #include "third_party/skia/include/utils/SkMatrix44.h" #include "ui/gfx/point3_f.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" using blink::WebFloatPoint; using blink::WebSize; -namespace webkit { +namespace content { namespace { TEST(WebLayerImplFixedBoundsTest, IdentityBounds) { @@ -54,9 +54,9 @@ void CheckBoundsScaleSimple(WebLayerImplFixedBounds* layer, original_point.y() * bounds.height / fixed_bounds.height(), original_point.z()); // Test if the bounds scale is correctly applied in transform. - EXPECT_POINT3F_EQ(scaled_point, - TransformPoint(layer->layer()->transform(), - original_point)); + EXPECT_POINT3F_EQ( + scaled_point, + TransformPoint(layer->layer()->transform(), original_point)); } TEST(WebLayerImplFixedBoundsTest, BoundsScaleSimple) { @@ -125,8 +125,8 @@ void CompareFixedBoundsLayerAndNormalLayer(const WebFloatPoint& anchor_point, } // Change of fixed bounds should not affect the target geometries. - fixed_bounds_layer->SetFixedBounds(gfx::Size(fixed_bounds.width() / 2, - fixed_bounds.height() * 2)); + fixed_bounds_layer->SetFixedBounds( + gfx::Size(fixed_bounds.width() / 2, fixed_bounds.height() * 2)); { cc::RenderSurfaceLayerList render_surface_layer_list; @@ -145,8 +145,7 @@ void CompareFixedBoundsLayerAndNormalLayer(const WebFloatPoint& anchor_point, // A black box test that ensures WebLayerImplFixedBounds won't change target // geometries. Simple case: identity transforms and zero anchor point. TEST(WebLayerImplFixedBoundsTest, CompareToWebLayerImplSimple) { - CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), - gfx::Transform()); + CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), gfx::Transform()); } // A black box test that ensures WebLayerImplFixedBounds won't change target @@ -166,4 +165,4 @@ TEST(WebLayerImplFixedBoundsTest, CompareToWebLayerImplComplex) { } } // namespace -} // namespace webkit +} // namespace content diff --git a/webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.cc b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc similarity index 67% rename from webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.cc rename to content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc index 6d8f7207393e30..55a7501b3ad07f 100644 --- a/webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.cc +++ b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc @@ -1,33 +1,37 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h" +#include "content/renderer/compositor_bindings/web_nine_patch_layer_impl.h" #include "base/command_line.h" #include "cc/base/switches.h" #include "cc/layers/nine_patch_layer.h" #include "cc/layers/picture_image_layer.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" +#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" -namespace webkit { +namespace content { WebNinePatchLayerImpl::WebNinePatchLayerImpl() { layer_.reset(new WebLayerImpl(cc::NinePatchLayer::Create())); } -WebNinePatchLayerImpl::~WebNinePatchLayerImpl() {} +WebNinePatchLayerImpl::~WebNinePatchLayerImpl() { +} -blink::WebLayer* WebNinePatchLayerImpl::layer() { return layer_.get(); } +blink::WebLayer* WebNinePatchLayerImpl::layer() { + return layer_.get(); +} void WebNinePatchLayerImpl::setBitmap(SkBitmap bitmap, const blink::WebRect& aperture) { setBitmap(bitmap); setAperture(aperture); - setBorder(blink::WebRect(aperture.x, aperture.y, - bitmap.width() - aperture.width, - bitmap.height() - aperture.height)); + setBorder(blink::WebRect(aperture.x, + aperture.y, + bitmap.width() - aperture.width, + bitmap.height() - aperture.height)); } void WebNinePatchLayerImpl::setBitmap(SkBitmap bitmap) { @@ -54,4 +58,5 @@ void WebNinePatchLayerImpl::setFillCenter(bool fill_center) { nine_patch->SetFillCenter(fill_center); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.h similarity index 67% rename from webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h rename to content/renderer/compositor_bindings/web_nine_patch_layer_impl.h index 5cca0389fc8a0a..cad69d7295e9a5 100644 --- a/webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h +++ b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.h @@ -1,22 +1,22 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebNinePatchLayer.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" -namespace webkit { +namespace content { class WebLayerImpl; class WebNinePatchLayerImpl : public blink::WebNinePatchLayer { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebNinePatchLayerImpl(); + CONTENT_EXPORT WebNinePatchLayerImpl(); virtual ~WebNinePatchLayerImpl(); // blink::WebNinePatchLayer implementation. @@ -36,6 +36,7 @@ class WebNinePatchLayerImpl : public blink::WebNinePatchLayer { DISALLOW_COPY_AND_ASSIGN(WebNinePatchLayerImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc b/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc similarity index 83% rename from webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc rename to content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc index fc6c76af2da444..3b752716631f39 100644 --- a/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc +++ b/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc @@ -2,26 +2,28 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" #if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED #include "cc/animation/scroll_offset_animation_curve.h" #include "cc/animation/timing_function.h" -#include "webkit/renderer/compositor_bindings/web_animation_curve_common.h" +#include "content/renderer/compositor_bindings/web_animation_curve_common.h" using blink::WebFloatPoint; -namespace webkit { +namespace content { WebScrollOffsetAnimationCurveImpl::WebScrollOffsetAnimationCurveImpl( WebFloatPoint target_value, TimingFunctionType timing_function) : curve_(cc::ScrollOffsetAnimationCurve::Create( gfx::Vector2dF(target_value.x, target_value.y), - CreateTimingFunction(timing_function))) {} + CreateTimingFunction(timing_function))) { +} -WebScrollOffsetAnimationCurveImpl::~WebScrollOffsetAnimationCurveImpl() {} +WebScrollOffsetAnimationCurveImpl::~WebScrollOffsetAnimationCurveImpl() { +} blink::WebAnimationCurve::AnimationCurveType WebScrollOffsetAnimationCurveImpl::type() const { @@ -47,6 +49,7 @@ WebScrollOffsetAnimationCurveImpl::CloneToAnimationCurve() const { return curve_->Clone(); } -} // namespace webkit +} // namespace content #endif // WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED + diff --git a/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h b/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h similarity index 73% rename from webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h rename to content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h index ae1c8b075f2128..4c29f8fdd76b59 100644 --- a/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h +++ b/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h @@ -2,28 +2,28 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ #include "third_party/WebKit/public/platform/WebAnimationCurve.h" #if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebScrollOffsetAnimationCurve.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" namespace cc { class AnimationCurve; class ScrollOffsetAnimationCurve; } -namespace webkit { +namespace content { class WebScrollOffsetAnimationCurveImpl : public blink::WebScrollOffsetAnimationCurve { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebScrollOffsetAnimationCurveImpl( + CONTENT_EXPORT WebScrollOffsetAnimationCurveImpl( blink::WebFloatPoint target_value, TimingFunctionType timing_function); virtual ~WebScrollOffsetAnimationCurveImpl(); @@ -44,8 +44,9 @@ class WebScrollOffsetAnimationCurveImpl DISALLOW_COPY_AND_ASSIGN(WebScrollOffsetAnimationCurveImpl); }; -} // namespace webkit +} // namespace content #endif // WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ + diff --git a/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc b/content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc similarity index 68% rename from webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc rename to content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc index eabaa4f489efd3..0d3be19aeca2ee 100644 --- a/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc +++ b/content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc @@ -1,15 +1,15 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h" +#include "content/renderer/compositor_bindings/web_scrollbar_layer_impl.h" #include "cc/layers/layer.h" #include "cc/layers/painted_scrollbar_layer.h" #include "cc/layers/scrollbar_layer_interface.h" #include "cc/layers/solid_color_scrollbar_layer.h" -#include "webkit/renderer/compositor_bindings/scrollbar_impl.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" +#include "content/renderer/compositor_bindings/scrollbar_impl.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" using cc::PaintedScrollbarLayer; using cc::SolidColorScrollbarLayer; @@ -19,22 +19,24 @@ namespace { cc::ScrollbarOrientation ConvertOrientation( blink::WebScrollbar::Orientation orientation) { return orientation == blink::WebScrollbar::Horizontal ? cc::HORIZONTAL - : cc::VERTICAL; + : cc::VERTICAL; } } // namespace -namespace webkit { +namespace content { WebScrollbarLayerImpl::WebScrollbarLayerImpl( blink::WebScrollbar* scrollbar, blink::WebScrollbarThemePainter painter, blink::WebScrollbarThemeGeometry* geometry) : layer_(new WebLayerImpl(PaintedScrollbarLayer::Create( - scoped_ptr(new ScrollbarImpl( - make_scoped_ptr(scrollbar), - painter, - make_scoped_ptr(geometry))).Pass(), 0))) {} + scoped_ptr( + new ScrollbarImpl(make_scoped_ptr(scrollbar), + painter, + make_scoped_ptr(geometry))).Pass(), + 0))) { +} WebScrollbarLayerImpl::WebScrollbarLayerImpl( blink::WebScrollbar::Orientation orientation, @@ -46,11 +48,15 @@ WebScrollbarLayerImpl::WebScrollbarLayerImpl( thumb_thickness, track_start, is_left_side_vertical_scrollbar, - 0))) {} + 0))) { +} -WebScrollbarLayerImpl::~WebScrollbarLayerImpl() {} +WebScrollbarLayerImpl::~WebScrollbarLayerImpl() { +} -blink::WebLayer* WebScrollbarLayerImpl::layer() { return layer_.get(); } +blink::WebLayer* WebScrollbarLayerImpl::layer() { + return layer_.get(); +} void WebScrollbarLayerImpl::setScrollLayer(blink::WebLayer* layer) { cc::Layer* scroll_layer = @@ -64,4 +70,5 @@ void WebScrollbarLayerImpl::setClipLayer(blink::WebLayer* layer) { layer_->layer()->ToScrollbarLayer()->SetClipLayer(clip_layer->id()); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h b/content/renderer/compositor_bindings/web_scrollbar_layer_impl.h similarity index 67% rename from webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h rename to content/renderer/compositor_bindings/web_scrollbar_layer_impl.h index 31cc87ae9711e3..47719e1d87c8e1 100644 --- a/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h +++ b/content/renderer/compositor_bindings/web_scrollbar_layer_impl.h @@ -1,31 +1,31 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebScrollbar.h" #include "third_party/WebKit/public/platform/WebScrollbarLayer.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" namespace blink { class WebScrollbarThemeGeometry; class WebScrollbarThemePainter; } -namespace webkit { +namespace content { class WebLayerImpl; class WebScrollbarLayerImpl : public blink::WebScrollbarLayer { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebScrollbarLayerImpl( + CONTENT_EXPORT WebScrollbarLayerImpl( blink::WebScrollbar* scrollbar, blink::WebScrollbarThemePainter painter, blink::WebScrollbarThemeGeometry* geometry); - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebScrollbarLayerImpl( + CONTENT_EXPORT WebScrollbarLayerImpl( blink::WebScrollbar::Orientation orientation, int thumb_thickness, int track_start, @@ -43,6 +43,6 @@ class WebScrollbarLayerImpl : public blink::WebScrollbarLayer { DISALLOW_COPY_AND_ASSIGN(WebScrollbarLayerImpl); }; -} // namespace webkit +} // namespace content -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_solid_color_layer_impl.cc b/content/renderer/compositor_bindings/web_solid_color_layer_impl.cc similarity index 54% rename from webkit/renderer/compositor_bindings/web_solid_color_layer_impl.cc rename to content/renderer/compositor_bindings/web_solid_color_layer_impl.cc index 5dd6aa383c4d7c..6cd9c1925803cb 100644 --- a/webkit/renderer/compositor_bindings/web_solid_color_layer_impl.cc +++ b/content/renderer/compositor_bindings/web_solid_color_layer_impl.cc @@ -1,27 +1,31 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h" +#include "content/renderer/compositor_bindings/web_solid_color_layer_impl.h" #include "cc/layers/solid_color_layer.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" using cc::SolidColorLayer; -namespace webkit { +namespace content { WebSolidColorLayerImpl::WebSolidColorLayerImpl() : layer_(new WebLayerImpl(SolidColorLayer::Create())) { layer_->layer()->SetIsDrawable(true); } -WebSolidColorLayerImpl::~WebSolidColorLayerImpl() {} +WebSolidColorLayerImpl::~WebSolidColorLayerImpl() { +} -blink::WebLayer* WebSolidColorLayerImpl::layer() { return layer_.get(); } +blink::WebLayer* WebSolidColorLayerImpl::layer() { + return layer_.get(); +} void WebSolidColorLayerImpl::setBackgroundColor(blink::WebColor color) { layer_->setBackgroundColor(color); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h b/content/renderer/compositor_bindings/web_solid_color_layer_impl.h similarity index 57% rename from webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h rename to content/renderer/compositor_bindings/web_solid_color_layer_impl.h index 0a2ec2641ced1e..fe6eefe6d67871 100644 --- a/webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h +++ b/content/renderer/compositor_bindings/web_solid_color_layer_impl.h @@ -1,21 +1,21 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebColor.h" #include "third_party/WebKit/public/platform/WebSolidColorLayer.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" -namespace webkit { +namespace content { class WebLayerImpl; class WebSolidColorLayerImpl : public blink::WebSolidColorLayer { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebSolidColorLayerImpl(); + CONTENT_EXPORT WebSolidColorLayerImpl(); virtual ~WebSolidColorLayerImpl(); // blink::WebSolidColorLayer implementation. @@ -28,7 +28,7 @@ class WebSolidColorLayerImpl : public blink::WebSolidColorLayer { DISALLOW_COPY_AND_ASSIGN(WebSolidColorLayerImpl); }; -} // namespace webkit +} // namespace content -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_ +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc b/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc similarity index 80% rename from webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc rename to content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc index a1de2a26869f9f..5a953bdb42c6df 100644 --- a/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc +++ b/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc @@ -1,16 +1,17 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h" +#include "content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h" #include "third_party/WebKit/public/platform/WebAnimationDelegate.h" -namespace webkit { +namespace content { WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( blink::WebAnimationDelegate* delegate) - : delegate_(delegate) {} + : delegate_(delegate) { +} void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( base::TimeTicks monotonic_time, @@ -28,4 +29,5 @@ void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( static_cast(target_property)); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h b/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h similarity index 65% rename from webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h rename to content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h index 951a9a669cdecb..b80b627f4247ea 100644 --- a/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h +++ b/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h @@ -1,17 +1,19 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "cc/animation/animation_delegate.h" -namespace blink { class WebAnimationDelegate; } +namespace blink { +class WebAnimationDelegate; +} -namespace webkit { +namespace content { class WebToCCAnimationDelegateAdapter : public cc::AnimationDelegate { public: @@ -31,6 +33,7 @@ class WebToCCAnimationDelegateAdapter : public cc::AnimationDelegate { DISALLOW_COPY_AND_ASSIGN(WebToCCAnimationDelegateAdapter); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ diff --git a/webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.cc b/content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc similarity index 72% rename from webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.cc rename to content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc index 1b0d073b21eede..8b03f48a8130c0 100644 --- a/webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.cc +++ b/content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc @@ -1,23 +1,25 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h" +#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h" #include "cc/animation/keyframed_animation_curve.h" #include "cc/animation/timing_function.h" #include "cc/animation/transform_operations.h" -#include "webkit/renderer/compositor_bindings/web_animation_curve_common.h" -#include "webkit/renderer/compositor_bindings/web_transform_operations_impl.h" +#include "content/renderer/compositor_bindings/web_animation_curve_common.h" +#include "content/renderer/compositor_bindings/web_transform_operations_impl.h" using blink::WebTransformKeyframe; -namespace webkit { +namespace content { WebTransformAnimationCurveImpl::WebTransformAnimationCurveImpl() - : curve_(cc::KeyframedTransformAnimationCurve::Create()) {} + : curve_(cc::KeyframedTransformAnimationCurve::Create()) { +} -WebTransformAnimationCurveImpl::~WebTransformAnimationCurveImpl() {} +WebTransformAnimationCurveImpl::~WebTransformAnimationCurveImpl() { +} blink::WebAnimationCurve::AnimationCurveType WebTransformAnimationCurveImpl::type() const { @@ -31,8 +33,8 @@ void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe) { void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, TimingFunctionType type) { const cc::TransformOperations& transform_operations = - static_cast(keyframe.value()) - .AsTransformOperations(); + static_cast(keyframe.value()) + .AsTransformOperations(); curve_->AddKeyframe(cc::TransformKeyframe::Create( keyframe.time(), transform_operations, CreateTimingFunction(type))); } @@ -43,8 +45,8 @@ void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, double x2, double y2) { const cc::TransformOperations& transform_operations = - static_cast(keyframe.value()) - .AsTransformOperations(); + static_cast(keyframe.value()) + .AsTransformOperations(); curve_->AddKeyframe(cc::TransformKeyframe::Create( keyframe.time(), transform_operations, @@ -57,4 +59,5 @@ WebTransformAnimationCurveImpl::CloneToAnimationCurve() const { return curve_->Clone(); } -} // namespace webkit +} // namespace content + diff --git a/webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h b/content/renderer/compositor_bindings/web_transform_animation_curve_impl.h similarity index 67% rename from webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h rename to content/renderer/compositor_bindings/web_transform_animation_curve_impl.h index 56eb637287c239..5a0576dd7f3df6 100644 --- a/webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h +++ b/content/renderer/compositor_bindings/web_transform_animation_curve_impl.h @@ -1,27 +1,29 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebTransformAnimationCurve.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" namespace cc { class AnimationCurve; class KeyframedTransformAnimationCurve; } -namespace blink { class WebTransformKeyframe; } +namespace blink { +class WebTransformKeyframe; +} -namespace webkit { +namespace content { class WebTransformAnimationCurveImpl : public blink::WebTransformAnimationCurve { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebTransformAnimationCurveImpl(); + CONTENT_EXPORT WebTransformAnimationCurveImpl(); virtual ~WebTransformAnimationCurveImpl(); // blink::WebAnimationCurve implementation. @@ -45,6 +47,7 @@ class WebTransformAnimationCurveImpl DISALLOW_COPY_AND_ASSIGN(WebTransformAnimationCurveImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ diff --git a/webkit/renderer/compositor_bindings/web_transform_operations_impl.cc b/content/renderer/compositor_bindings/web_transform_operations_impl.cc similarity index 85% rename from webkit/renderer/compositor_bindings/web_transform_operations_impl.cc rename to content/renderer/compositor_bindings/web_transform_operations_impl.cc index 8201f5ae16e5f6..cfec1b48153480 100644 --- a/webkit/renderer/compositor_bindings/web_transform_operations_impl.cc +++ b/content/renderer/compositor_bindings/web_transform_operations_impl.cc @@ -1,16 +1,17 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/renderer/compositor_bindings/web_transform_operations_impl.h" +#include "content/renderer/compositor_bindings/web_transform_operations_impl.h" #include #include "ui/gfx/transform.h" -namespace webkit { +namespace content { -WebTransformOperationsImpl::WebTransformOperationsImpl() {} +WebTransformOperationsImpl::WebTransformOperationsImpl() { +} const cc::TransformOperations& WebTransformOperationsImpl::AsTransformOperations() const { @@ -61,6 +62,8 @@ bool WebTransformOperationsImpl::isIdentity() const { return transform_operations_.IsIdentity(); } -WebTransformOperationsImpl::~WebTransformOperationsImpl() {} +WebTransformOperationsImpl::~WebTransformOperationsImpl() { +} + +} // namespace content -} // namespace webkit diff --git a/webkit/renderer/compositor_bindings/web_transform_operations_impl.h b/content/renderer/compositor_bindings/web_transform_operations_impl.h similarity index 69% rename from webkit/renderer/compositor_bindings/web_transform_operations_impl.h rename to content/renderer/compositor_bindings/web_transform_operations_impl.h index 374cdb7111b5ae..f0f7b47ba157f3 100644 --- a/webkit/renderer/compositor_bindings/web_transform_operations_impl.h +++ b/content/renderer/compositor_bindings/web_transform_operations_impl.h @@ -1,20 +1,20 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ +#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ +#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ #include "base/memory/scoped_ptr.h" #include "cc/animation/transform_operations.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebTransformOperations.h" -#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h" -namespace webkit { +namespace content { class WebTransformOperationsImpl : public blink::WebTransformOperations { public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebTransformOperationsImpl(); + CONTENT_EXPORT WebTransformOperationsImpl(); virtual ~WebTransformOperationsImpl(); const cc::TransformOperations& AsTransformOperations() const; @@ -36,6 +36,7 @@ class WebTransformOperationsImpl : public blink::WebTransformOperations { DISALLOW_COPY_AND_ASSIGN(WebTransformOperationsImpl); }; -} // namespace webkit +} // namespace content + +#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index f974828d94a191..fe393c78c4af86 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -31,6 +31,7 @@ #include "content/common/content_switches_internal.h" #include "content/common/gpu/client/context_provider_command_buffer.h" #include "content/public/common/content_switches.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/input/input_handler_manager.h" #include "content/renderer/render_thread_impl.h" #include "gpu/command_buffer/client/gles2_interface.h" @@ -40,7 +41,6 @@ #include "ui/gfx/frame_time.h" #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_switches.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" namespace base { class Value; @@ -452,7 +452,7 @@ void RenderWidgetCompositor::setSurfaceReady() { void RenderWidgetCompositor::setRootLayer(const blink::WebLayer& layer) { layer_tree_host_->SetRootLayer( - static_cast(&layer)->layer()); + static_cast(&layer)->layer()); } void RenderWidgetCompositor::clearRootLayer() { @@ -545,7 +545,7 @@ void RenderWidgetCompositor::didStopFlinging() { } void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) { - cc::Layer* cc_layer = static_cast(layer)->layer(); + cc::Layer* cc_layer = static_cast(layer)->layer(); cc_layer->layer_animation_controller()->SetAnimationRegistrar( layer_tree_host_->animation_registrar()); } @@ -555,14 +555,13 @@ void RenderWidgetCompositor::registerViewportLayers( const blink::WebLayer* innerViewportScrollLayer, const blink::WebLayer* outerViewportScrollLayer) { layer_tree_host_->RegisterViewportLayers( - static_cast(pageScaleLayer)->layer(), - static_cast(innerViewportScrollLayer) - ->layer(), + static_cast(pageScaleLayer)->layer(), + static_cast(innerViewportScrollLayer)->layer(), // The outer viewport layer will only exist when using pinch virtual // viewports. - outerViewportScrollLayer ? static_cast( - outerViewportScrollLayer)->layer() - : NULL); + outerViewportScrollLayer + ? static_cast(outerViewportScrollLayer)->layer() + : NULL); } void RenderWidgetCompositor::clearViewportLayers() { diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc index fcf37ceebfc0c8..98335469166017 100644 --- a/content/renderer/media/android/webmediaplayer_android.cc +++ b/content/renderer/media/android/webmediaplayer_android.cc @@ -19,6 +19,7 @@ #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" #include "content/public/renderer/render_frame.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/media/android/renderer_demuxer_android.h" #include "content/renderer/media/android/renderer_media_player_manager.h" #include "content/renderer/media/crypto/key_systems.h" @@ -51,7 +52,6 @@ #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkTypeface.h" #include "ui/gfx/image/image.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" static const uint32 kGLTextureExternalOES = 0x8D65; @@ -730,8 +730,7 @@ void WebMediaPlayerAndroid::OnVideoSizeChanged(int width, int height) { // Lazily allocate compositing layer. if (!video_weblayer_) { - video_weblayer_.reset( - new webkit::WebLayerImpl(cc::VideoLayer::Create(this))); + video_weblayer_.reset(new WebLayerImpl(cc::VideoLayer::Create(this))); client_->setWebLayer(video_weblayer_.get()); } diff --git a/content/renderer/media/android/webmediaplayer_android.h b/content/renderer/media/android/webmediaplayer_android.h index 3cfacff80ccc77..67d09e0670852b 100644 --- a/content/renderer/media/android/webmediaplayer_android.h +++ b/content/renderer/media/android/webmediaplayer_android.h @@ -49,14 +49,11 @@ namespace media { class MediaLog; } -namespace webkit { -class WebLayerImpl; -} - namespace content { class RendererCdmManager; class RendererMediaPlayerManager; class WebContentDecryptionModuleImpl; +class WebLayerImpl; class WebMediaPlayerDelegate; // This class implements blink::WebMediaPlayer by keeping the android @@ -392,7 +389,7 @@ class WebMediaPlayerAndroid : public blink::WebMediaPlayer, // not NULL while the compositor is actively using this webmediaplayer. cc::VideoFrameProvider::Client* video_frame_provider_client_; - scoped_ptr video_weblayer_; + scoped_ptr video_weblayer_; #if defined(VIDEO_HOLE) // A rectangle represents the geometry of video frame, when computed last diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc index 7b8bb49781a3be..088d545ac4dc5e 100644 --- a/content/renderer/media/webmediaplayer_impl.cc +++ b/content/renderer/media/webmediaplayer_impl.cc @@ -24,6 +24,7 @@ #include "cc/layers/video_layer.h" #include "content/public/common/content_switches.h" #include "content/public/renderer/render_frame.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/media/buffered_data_source.h" #include "content/renderer/media/crypto/key_systems.h" #include "content/renderer/media/render_media_log.h" @@ -71,7 +72,6 @@ #include "third_party/WebKit/public/web/WebSecurityOrigin.h" #include "third_party/WebKit/public/web/WebView.h" #include "v8/include/v8.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" #if defined(ENABLE_PEPPER_CDMS) #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h" @@ -964,7 +964,7 @@ void WebMediaPlayerImpl::OnPipelineMetadata( if (hasVideo()) { DCHECK(!video_weblayer_); video_weblayer_.reset( - new webkit::WebLayerImpl(cc::VideoLayer::Create(compositor_))); + new WebLayerImpl(cc::VideoLayer::Create(compositor_))); video_weblayer_->setOpaque(opaque_); client_->setWebLayer(video_weblayer_.get()); } diff --git a/content/renderer/media/webmediaplayer_impl.h b/content/renderer/media/webmediaplayer_impl.h index 8911e3b47abf1d..87c180e3509130 100644 --- a/content/renderer/media/webmediaplayer_impl.h +++ b/content/renderer/media/webmediaplayer_impl.h @@ -47,15 +47,13 @@ class GpuVideoAcceleratorFactories; class MediaLog; } -namespace webkit { -class WebLayerImpl; -} namespace content { class BufferedDataSource; class VideoFrameCompositor; class WebAudioSourceProviderImpl; class WebContentDecryptionModuleImpl; +class WebLayerImpl; class WebMediaPlayerDelegate; class WebMediaPlayerParams; class WebTextTrackImpl; @@ -337,7 +335,7 @@ class WebMediaPlayerImpl // The compositor layer for displaying the video content when using composited // playback. - scoped_ptr video_weblayer_; + scoped_ptr video_weblayer_; // Text track objects get a unique index value when they're created. int text_track_index_; diff --git a/content/renderer/media/webmediaplayer_ms.cc b/content/renderer/media/webmediaplayer_ms.cc index fe8d7a5a871d5f..b466d3168aab61 100644 --- a/content/renderer/media/webmediaplayer_ms.cc +++ b/content/renderer/media/webmediaplayer_ms.cc @@ -12,6 +12,7 @@ #include "base/metrics/histogram.h" #include "cc/layers/video_layer.h" #include "content/public/renderer/render_view.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/media/media_stream_audio_renderer.h" #include "content/renderer/media/media_stream_renderer_factory.h" #include "content/renderer/media/video_frame_provider.h" @@ -28,7 +29,6 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebView.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" using blink::WebCanvas; using blink::WebMediaPlayer; @@ -414,8 +414,7 @@ void WebMediaPlayerMS::OnFrameAvailable( GetClient()->sizeChanged(); if (video_frame_provider_) { - video_weblayer_.reset( - new webkit::WebLayerImpl(cc::VideoLayer::Create(this))); + video_weblayer_.reset(new WebLayerImpl(cc::VideoLayer::Create(this))); video_weblayer_->setOpaque(true); GetClient()->setWebLayer(video_weblayer_.get()); } diff --git a/content/renderer/media/webmediaplayer_ms.h b/content/renderer/media/webmediaplayer_ms.h index 51f90e8daa86da..7e8944ad92026c 100644 --- a/content/renderer/media/webmediaplayer_ms.h +++ b/content/renderer/media/webmediaplayer_ms.h @@ -25,14 +25,12 @@ namespace media { class MediaLog; } -namespace webkit { -class WebLayerImpl; -} namespace content { class MediaStreamAudioRenderer; class MediaStreamRendererFactory; class VideoFrameProvider; +class WebLayerImpl; class WebMediaPlayerDelegate; // WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to @@ -168,7 +166,7 @@ class WebMediaPlayerMS base::Lock current_frame_lock_; bool pending_repaint_; - scoped_ptr video_weblayer_; + scoped_ptr video_weblayer_; // A pointer back to the compositor to inform it about state changes. This is // not NULL while the compositor is actively using this webmediaplayer. diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc index 065571bd0777dc..91e16b073d1c60 100644 --- a/content/renderer/npapi/webplugin_impl.cc +++ b/content/renderer/npapi/webplugin_impl.cc @@ -24,6 +24,7 @@ #include "content/public/common/content_constants.h" #include "content/public/common/content_switches.h" #include "content/public/renderer/content_renderer_client.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/npapi/webplugin_delegate_proxy.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_process.h" @@ -57,7 +58,6 @@ #include "url/gurl.h" #include "url/url_util.h" #include "webkit/child/multipart_response_delegate.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" using blink::WebCanvas; using blink::WebConsoleMessage; @@ -852,7 +852,7 @@ void WebPluginImpl::AcceleratedPluginSwappedIOSurface() { if (next_io_surface_id_) { if (!io_surface_layer_.get()) { io_surface_layer_ = cc::IOSurfaceLayer::Create(); - web_layer_.reset(new webkit::WebLayerImpl(io_surface_layer_)); + web_layer_.reset(new WebLayerImpl(io_surface_layer_)); container_->setWebLayer(web_layer_.get()); } io_surface_layer_->SetIOSurfaceProperties( diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc index 7db4c547f56e73..6e7ff9ffc624b6 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc @@ -24,6 +24,7 @@ #include "content/public/common/content_switches.h" #include "content/public/common/page_zoom.h" #include "content/public/renderer/content_renderer_client.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/gpu/render_widget_compositor.h" #include "content/renderer/pepper/common.h" #include "content/renderer/pepper/content_decryptor_delegate.h" @@ -126,7 +127,6 @@ #include "ui/gfx/rect_conversions.h" #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" #include "v8/include/v8.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" #if defined(OS_CHROMEOS) #include "ui/events/keycodes/keyboard_codes_posix.h" @@ -2039,10 +2039,10 @@ void PepperPluginInstanceImpl::UpdateLayer() { // wmode=transparent was specified. opaque = opaque || fullscreen_container_; texture_layer_->SetContentsOpaque(opaque); - web_layer_.reset(new webkit::WebLayerImpl(texture_layer_)); + web_layer_.reset(new WebLayerImpl(texture_layer_)); } else if (want_compositor_layer) { compositor_layer_ = bound_compositor_->layer(); - web_layer_.reset(new webkit::WebLayerImpl(compositor_layer_)); + web_layer_.reset(new WebLayerImpl(compositor_layer_)); } if (web_layer_) { diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index e66bd926caa120..2fcaab46b5068d 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -63,6 +63,8 @@ #include "content/public/renderer/content_renderer_client.h" #include "content/public/renderer/render_process_observer.h" #include "content/public/renderer/render_view_visitor.h" +#include "content/renderer/compositor_bindings/web_external_bitmap_impl.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/devtools/devtools_agent_filter.h" #include "content/renderer/dom_storage/dom_storage_dispatcher.h" #include "content/renderer/dom_storage/webstoragearea_impl.h" @@ -121,8 +123,6 @@ #include "ui/base/layout.h" #include "ui/base/ui_base_switches.h" #include "v8/include/v8.h" -#include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" #if defined(OS_ANDROID) #include @@ -413,8 +413,7 @@ void RenderThreadImpl::Init() { is_impl_side_painting_enabled_ = command_line.HasSwitch(switches::kEnableImplSidePainting); - webkit::WebLayerImpl::SetImplSidePaintingEnabled( - is_impl_side_painting_enabled_); + WebLayerImpl::SetImplSidePaintingEnabled(is_impl_side_painting_enabled_); is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy) && !command_line.HasSwitch(switches::kDisableZeroCopy); @@ -808,7 +807,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() { if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) ScheduleIdleHandler(kLongIdleHandlerDelayMs); - webkit::SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction); + SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction); // Limit use of the scaled image cache to when deferred image decoding is // enabled. diff --git a/content/renderer/renderer_webkitplatformsupport_impl.h b/content/renderer/renderer_webkitplatformsupport_impl.h index 1cd15d8f157dcd..ee0ccb16401ddc 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.h +++ b/content/renderer/renderer_webkitplatformsupport_impl.h @@ -9,11 +9,11 @@ #include "base/memory/scoped_ptr.h" #include "content/child/blink_platform_impl.h" #include "content/common/content_export.h" +#include "content/renderer/compositor_bindings/web_compositor_support_impl.h" #include "content/renderer/webpublicsuffixlist_impl.h" #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" #include "third_party/WebKit/public/platform/WebIDBFactory.h" #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" -#include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" namespace base { class MessageLoopProxy; @@ -230,7 +230,7 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl scoped_ptr web_database_observer_impl_; - webkit::WebCompositorSupportImpl compositor_support_; + WebCompositorSupportImpl compositor_support_; scoped_ptr web_scrollbar_behavior_; diff --git a/content/shell/renderer/test_runner/TestPlugin.cpp b/content/shell/renderer/test_runner/TestPlugin.cpp index db9edc573f4098..22f56f5ad3d503 100644 --- a/content/shell/renderer/test_runner/TestPlugin.cpp +++ b/content/shell/renderer/test_runner/TestPlugin.cpp @@ -208,7 +208,7 @@ bool TestPlugin::initialize(WebPluginContainer* container) return false; m_layer = cc::TextureLayer::CreateForMailbox(this); - m_webLayer = make_scoped_ptr(new webkit::WebLayerImpl(m_layer)); + m_webLayer = make_scoped_ptr(InstantiateWebLayer(m_layer)); m_container = container; m_container->setWebLayer(m_webLayer.get()); if (m_reRequestTouchEvents) { diff --git a/content/shell/renderer/test_runner/TestPlugin.h b/content/shell/renderer/test_runner/TestPlugin.h index 8c1f06b775c2f0..6d05ed8c4c16a1 100644 --- a/content/shell/renderer/test_runner/TestPlugin.h +++ b/content/shell/renderer/test_runner/TestPlugin.h @@ -11,15 +11,17 @@ #include "base/memory/scoped_ptr.h" #include "cc/layers/texture_layer.h" #include "cc/layers/texture_layer_client.h" +#include "content/public/test/layouttest_support.h" #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h" #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" +#include "third_party/WebKit/public/platform/WebLayer.h" #include "third_party/WebKit/public/web/WebPlugin.h" #include "third_party/WebKit/public/web/WebPluginContainer.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" namespace blink { class WebFrame; +class WebLayer; } namespace content { @@ -138,7 +140,7 @@ class TestPlugin : public blink::WebPlugin, public cc::TextureLayerClient { unsigned m_framebuffer; Scene m_scene; scoped_refptr m_layer; - scoped_ptr m_webLayer; + scoped_ptr m_webLayer; blink::WebPluginContainer::TouchEventRequestType m_touchEventRequest; // Requests touch events from the WebPluginContainerImpl multiple times to tickle webkit.org/b/108381 diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc index 011312750c1d1d..3c43e8bc138fa4 100644 --- a/content/test/layouttest_support.cc +++ b/content/test/layouttest_support.cc @@ -9,6 +9,7 @@ #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/common/gpu/image_transport_surface.h" #include "content/public/common/page_state.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/history_entry.h" #include "content/renderer/history_serialization.h" #include "content/renderer/render_frame_impl.h" @@ -302,4 +303,8 @@ std::string DumpBackForwardList(std::vector& page_state, return result; } +blink::WebLayer* InstantiateWebLayer(scoped_refptr layer) { + return new WebLayerImpl(layer); +} + } // namespace content diff --git a/content/test/test_webkit_platform_support.cc b/content/test/test_webkit_platform_support.cc index baa4183bd19ba4..0e9aaf0578b0a8 100644 --- a/content/test/test_webkit_platform_support.cc +++ b/content/test/test_webkit_platform_support.cc @@ -32,7 +32,6 @@ #include "third_party/WebKit/public/web/WebStorageEventDispatcher.h" #include "v8/include/v8.h" #include "webkit/browser/database/vfs_backend.h" -#include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" #if defined(OS_MACOSX) #include "base/mac/mac_util.h" diff --git a/content/test/test_webkit_platform_support.h b/content/test/test_webkit_platform_support.h index 65e7c36083f5a6..469d6bfb604001 100644 --- a/content/test/test_webkit_platform_support.h +++ b/content/test/test_webkit_platform_support.h @@ -10,10 +10,10 @@ #include "content/child/blink_platform_impl.h" #include "content/child/simple_webmimeregistry_impl.h" #include "content/child/webfileutilities_impl.h" +#include "content/renderer/compositor_bindings/web_compositor_support_impl.h" #include "content/test/mock_webclipboard_impl.h" #include "content/test/weburl_loader_mock_factory.h" #include "third_party/WebKit/public/platform/WebUnitTestSupport.h" -#include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" namespace blink { class WebLayerTreeView; @@ -90,7 +90,7 @@ class TestWebKitPlatformSupport WebFileUtilitiesImpl file_utilities_; base::ScopedTempDir file_system_root_; scoped_ptr url_loader_factory_; - webkit::WebCompositorSupportImpl compositor_support_; + WebCompositorSupportImpl compositor_support_; #if defined(OS_WIN) || defined(OS_MACOSX) blink::WebThemeEngine* active_theme_engine_; diff --git a/content/test/web_layer_tree_view_impl_for_testing.cc b/content/test/web_layer_tree_view_impl_for_testing.cc index 724571cf0eec8a..9da489658da8c7 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.cc +++ b/content/test/web_layer_tree_view_impl_for_testing.cc @@ -13,6 +13,7 @@ #include "cc/output/output_surface.h" #include "cc/test/test_context_provider.h" #include "cc/trees/layer_tree_host.h" +#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/test/test_webkit_platform_support.h" #include "third_party/WebKit/public/platform/Platform.h" #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" @@ -20,13 +21,11 @@ #include "third_party/WebKit/public/platform/WebLayerTreeView.h" #include "third_party/WebKit/public/platform/WebSize.h" #include "ui/gfx/frame_time.h" -#include "webkit/renderer/compositor_bindings/web_layer_impl.h" using blink::WebColor; using blink::WebGraphicsContext3D; using blink::WebRect; using blink::WebSize; -using webkit::WebLayerImpl; namespace content { diff --git a/webkit/renderer/compositor_bindings/DEPS b/webkit/renderer/compositor_bindings/DEPS deleted file mode 100644 index c3a5b96fc44d4d..00000000000000 --- a/webkit/renderer/compositor_bindings/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+media", -] diff --git a/webkit/renderer/compositor_bindings/compositor_bindings.gyp b/webkit/renderer/compositor_bindings/compositor_bindings.gyp deleted file mode 100644 index 09f4b510b2c23b..00000000000000 --- a/webkit/renderer/compositor_bindings/compositor_bindings.gyp +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'chromium_code': 1, - }, - 'targets': [ - { - 'target_name': 'webkit_compositor_support', - 'type': 'static_library', - 'dependencies': [ - '<(DEPTH)/skia/skia.gyp:skia', - '<(DEPTH)/cc/cc.gyp:cc', - 'webkit_compositor_bindings', - ], - 'sources': [ - 'web_compositor_support_impl.cc', - 'web_compositor_support_impl.h', - ], - 'include_dirs': [ - '../..', - '<(SHARED_INTERMEDIATE_DIR)/webkit', - ], - }, - { - 'target_name': 'webkit_compositor_bindings', - 'type': '<(component)', - 'dependencies': [ - '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '<(DEPTH)/cc/cc.gyp:cc', - '<(DEPTH)/gpu/gpu.gyp:gpu', - '<(DEPTH)/media/media.gyp:media', - '<(DEPTH)/skia/skia.gyp:skia', - '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', - '<(DEPTH)/webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', - ], - 'defines': [ - 'WEBKIT_COMPOSITOR_BINDINGS_IMPLEMENTATION=1' - ], - 'sources': [ - 'scrollbar_impl.cc', - 'scrollbar_impl.h', - 'web_animation_curve_common.cc', - 'web_animation_curve_common.h', - 'web_animation_impl.cc', - 'web_animation_impl.h', - 'web_content_layer_impl.cc', - 'web_content_layer_impl.h', - 'web_external_bitmap_impl.cc', - 'web_external_bitmap_impl.h', - 'web_external_texture_layer_impl.cc', - 'web_external_texture_layer_impl.h', - 'web_filter_animation_curve_impl.cc', - 'web_filter_animation_curve_impl.h', - 'web_filter_operations_impl.cc', - 'web_filter_operations_impl.h', - 'web_float_animation_curve_impl.cc', - 'web_float_animation_curve_impl.h', - 'web_image_layer_impl.cc', - 'web_image_layer_impl.h', - 'web_layer_impl.cc', - 'web_layer_impl.h', - 'web_layer_impl_fixed_bounds.cc', - 'web_layer_impl_fixed_bounds.h', - 'web_nine_patch_layer_impl.cc', - 'web_nine_patch_layer_impl.h', - 'web_scroll_offset_animation_curve_impl.cc', - 'web_scroll_offset_animation_curve_impl.h', - 'web_scrollbar_layer_impl.cc', - 'web_scrollbar_layer_impl.h', - 'web_solid_color_layer_impl.cc', - 'web_solid_color_layer_impl.h', - 'web_to_cc_animation_delegate_adapter.cc', - 'web_to_cc_animation_delegate_adapter.h', - 'web_transform_animation_curve_impl.cc', - 'web_transform_animation_curve_impl.h', - 'web_transform_operations_impl.cc', - 'web_transform_operations_impl.h', - ], - }, - ], -} diff --git a/webkit/renderer/compositor_bindings/compositor_bindings_dummy_unittest.cc b/webkit/renderer/compositor_bindings/compositor_bindings_dummy_unittest.cc new file mode 100644 index 00000000000000..7a3ecfec2fcec4 --- /dev/null +++ b/webkit/renderer/compositor_bindings/compositor_bindings_dummy_unittest.cc @@ -0,0 +1,11 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "testing/gtest/include/gtest/gtest.h" + +namespace webkit { + TEST(CompositorBindingsDummyTest, DummyTest) { + EXPECT_EQ(0, 0); + } +} diff --git a/webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp b/webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp index 2444864aa8007c..6164935a4daeba 100644 --- a/webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp +++ b/webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp @@ -2,35 +2,25 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +# This is a dummy target so as to not to break the build while moving tests from +# webkit_compositor_bindings_unittests to content_unittests. { 'variables': { 'chromium_code': 1, - 'webkit_compositor_bindings_tests_sources': [ - 'web_animation_unittest.cc', - 'web_float_animation_curve_unittest.cc', - 'web_layer_impl_fixed_bounds_unittest.cc', - ], }, 'targets': [ { 'target_name': 'webkit_compositor_bindings_unittests', 'type' : '<(gtest_target_type)', 'dependencies': [ - '<(DEPTH)/base/base.gyp:test_support_base', - '<(DEPTH)/cc/cc.gyp:cc', - '<(DEPTH)/cc/cc_tests.gyp:cc_test_support', - '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/testing/gmock.gyp:gmock', '<(DEPTH)/testing/gtest.gyp:gtest', - 'compositor_bindings.gyp:webkit_compositor_bindings', + '<(DEPTH)/base/base.gyp:test_support_base', ], 'sources': [ - '<@(webkit_compositor_bindings_tests_sources)', + 'compositor_bindings_dummy_unittest.cc', 'test/run_all_unittests.cc', ], - 'include_dirs': [ - '<(DEPTH)' - ], 'conditions': [ ['OS == "android"', { 'dependencies': [ @@ -66,4 +56,4 @@ ], }], ], -} +} \ No newline at end of file diff --git a/webkit/renderer/compositor_bindings/web_animation_curve_common.h b/webkit/renderer/compositor_bindings/web_animation_curve_common.h deleted file mode 100644 index b24fabacc37cfa..00000000000000 --- a/webkit/renderer/compositor_bindings/web_animation_curve_common.h +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ - -#include "base/memory/scoped_ptr.h" -#include "third_party/WebKit/public/platform/WebAnimationCurve.h" - -namespace cc { class TimingFunction; } - -namespace webkit { -scoped_ptr CreateTimingFunction( - blink::WebAnimationCurve::TimingFunctionType); -} - -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ diff --git a/webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h b/webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h deleted file mode 100644 index 77a698f038008c..00000000000000 --- a/webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEBKIT_COMPOSITOR_BINDINGS_EXPORT_H_ -#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEBKIT_COMPOSITOR_BINDINGS_EXPORT_H_ - -#if defined(COMPONENT_BUILD) -#if defined(WIN32) - -#if defined(WEBKIT_COMPOSITOR_BINDINGS_IMPLEMENTATION) -#define WEBKIT_COMPOSITOR_BINDINGS_EXPORT __declspec(dllexport) -#else -#define WEBKIT_COMPOSITOR_BINDINGS_EXPORT __declspec(dllimport) -#endif // defined(WEBKIT_COMPOSITOR_BINDINGS_IMPLEMENTATION) - -#else // defined(WIN32) -#if defined(WEBKIT_COMPOSITOR_BINDINGS_IMPLEMENTATION) -#define WEBKIT_COMPOSITOR_BINDINGS_EXPORT \ - __attribute__((visibility("default"))) -#else -#define WEBKIT_COMPOSITOR_BINDINGS_EXPORT -#endif -#endif - -#else // defined(COMPONENT_BUILD) -#define WEBKIT_COMPOSITOR_BINDINGS_EXPORT -#endif - -#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEBKIT_COMPOSITOR_BINDINGS_EXPORT_H_