summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-12 16:24:38 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-12 16:24:38 +0000
commitf209b34c28c450d045fb1db6774d7bca7e6c2e6f (patch)
treec4141c6a4a3417acbab0fb7669d69b1a25a35be2
parent1e282861b2061d3c4c14de3d85bff45a136ea962 (diff)
downloadchromium_src-f209b34c28c450d045fb1db6774d7bca7e6c2e6f.zip
chromium_src-f209b34c28c450d045fb1db6774d7bca7e6c2e6f.tar.gz
chromium_src-f209b34c28c450d045fb1db6774d7bca7e6c2e6f.tar.bz2
Remove ::create factory functions from objects created via WebCompositorSupport
These are uncalled and don't actually work at all in the component build. Leaving them around is just confusing. Code that wants to instantiate these types can use the WebCompositorSupport interface or directly construct the Impls. BUG= Review URL: https://chromiumcodereview.appspot.com/11231017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167188 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/android/testshell/tab_manager.cc1
-rw-r--r--chrome/browser/android/tab_base_android_impl.cc7
-rw-r--r--content/browser/android/content_view_render_view.cc5
-rw-r--r--content/browser/renderer_host/render_widget_host_view_android.cc3
-rw-r--r--webkit/compositor_bindings/web_animation_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_content_layer_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_external_texture_layer_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_float_animation_curve_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_image_layer_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_io_surface_layer_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_layer_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_layer_unittest.cc23
-rw-r--r--webkit/compositor_bindings/web_scrollbar_layer_impl.cc6
-rw-r--r--webkit/compositor_bindings/web_solid_color_layer_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_transform_animation_curve_impl.cc5
-rw-r--r--webkit/compositor_bindings/web_video_layer_impl.cc5
16 files changed, 24 insertions, 71 deletions
diff --git a/chrome/android/testshell/tab_manager.cc b/chrome/android/testshell/tab_manager.cc
index 0a9da47..f55a78b 100644
--- a/chrome/android/testshell/tab_manager.cc
+++ b/chrome/android/testshell/tab_manager.cc
@@ -14,7 +14,6 @@
#include "chrome/browser/android/tab_base_android_impl.h"
#include "content/public/browser/android/content_view_layer_renderer.h"
#include "jni/TabManager_jni.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
#include <android/native_window_jni.h>
diff --git a/chrome/browser/android/tab_base_android_impl.cc b/chrome/browser/android/tab_base_android_impl.cc
index b2f639d..9439ea8 100644
--- a/chrome/browser/android/tab_base_android_impl.cc
+++ b/chrome/browser/android/tab_base_android_impl.cc
@@ -13,6 +13,8 @@
#include "content/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
#include "jni/TabBase_jni.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/Platform.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSupport.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
#include "ui/gfx/android/window_android.h"
@@ -58,8 +60,9 @@ TabBaseAndroidImpl::TabBaseAndroidImpl(JNIEnv* env,
jobject obj,
WebContents* web_contents,
WindowAndroid* window_android)
- : web_contents_(web_contents),
- tab_layer_(WebKit::WebLayer::create()) {
+ : web_contents_(web_contents) {
+ tab_layer_.reset(
+ WebKit::Platform::current()->compositorSupport()->createLayer());
InitTabHelpers(web_contents);
WindowAndroidHelper::FromWebContents(web_contents)->
SetWindowAndroid(window_android);
diff --git a/content/browser/android/content_view_render_view.cc b/content/browser/android/content_view_render_view.cc
index 1db4e61..d2d3e2b 100644
--- a/content/browser/android/content_view_render_view.cc
+++ b/content/browser/android/content_view_render_view.cc
@@ -15,6 +15,8 @@
#include "content/public/browser/android/content_view_layer_renderer.h"
#include "content/public/browser/android/draw_delegate.h"
#include "jni/ContentViewRenderView_jni.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/Platform.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSupport.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
#include "ui/gfx/size.h"
@@ -90,7 +92,8 @@ void InitCompositor() {
g_global_state.Get().compositor.reset(
Compositor::Create(&g_global_state.Get().client));
DCHECK(!g_global_state.Get().root_layer.get());
- g_global_state.Get().root_layer.reset(WebKit::WebLayer::create());
+ g_global_state.Get().root_layer.reset(
+ WebKit::Platform::current()->compositorSupport()->createLayer());
g_global_state.Get().layer_renderer.reset(new ContentViewLayerRendererImpl());
}
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 61d4073..6c6782e 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -54,7 +54,8 @@ RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid(
is_hidden_(!content_view_core),
content_view_core_(content_view_core),
ime_adapter_android_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
- texture_layer_(WebKit::WebExternalTextureLayer::create()),
+ texture_layer_(WebKit::Platform::current()->
+ compositorSupport()->createExternalTextureLayer()),
texture_id_in_layer_(0) {
host_->SetView(this);
// RenderWidgetHost is initialized as visible. If is_hidden_ is true, tell
diff --git a/webkit/compositor_bindings/web_animation_impl.cc b/webkit/compositor_bindings/web_animation_impl.cc
index 0e156fa..961bd86 100644
--- a/webkit/compositor_bindings/web_animation_impl.cc
+++ b/webkit/compositor_bindings/web_animation_impl.cc
@@ -15,11 +15,6 @@ using cc::ActiveAnimation;
namespace WebKit {
-WebAnimation* WebAnimation::create(const WebAnimationCurve& curve, TargetProperty targetProperty, int animationId)
-{
- return new WebAnimationImpl(curve, targetProperty, animationId, 0);
-}
-
WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& webCurve, TargetProperty targetProperty, int animationId, int groupId)
{
static int nextAnimationId = 1;
diff --git a/webkit/compositor_bindings/web_content_layer_impl.cc b/webkit/compositor_bindings/web_content_layer_impl.cc
index 853970d..7c38f6f 100644
--- a/webkit/compositor_bindings/web_content_layer_impl.cc
+++ b/webkit/compositor_bindings/web_content_layer_impl.cc
@@ -24,11 +24,6 @@ static bool usingPictureLayer()
return CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kImplSidePainting);
}
-WebContentLayer* WebContentLayer::create(WebContentLayerClient* client)
-{
- return new WebContentLayerImpl(client);
-}
-
WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client)
: m_client(client)
{
diff --git a/webkit/compositor_bindings/web_external_texture_layer_impl.cc b/webkit/compositor_bindings/web_external_texture_layer_impl.cc
index b374e9d..40c0f29 100644
--- a/webkit/compositor_bindings/web_external_texture_layer_impl.cc
+++ b/webkit/compositor_bindings/web_external_texture_layer_impl.cc
@@ -15,11 +15,6 @@ using namespace cc;
namespace WebKit {
-WebExternalTextureLayer* WebExternalTextureLayer::create(WebExternalTextureLayerClient* client)
-{
- return new WebExternalTextureLayerImpl(client);
-}
-
WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(WebExternalTextureLayerClient* client)
: m_client(client)
{
diff --git a/webkit/compositor_bindings/web_float_animation_curve_impl.cc b/webkit/compositor_bindings/web_float_animation_curve_impl.cc
index 9496cc6..caaace1 100644
--- a/webkit/compositor_bindings/web_float_animation_curve_impl.cc
+++ b/webkit/compositor_bindings/web_float_animation_curve_impl.cc
@@ -11,11 +11,6 @@
namespace WebKit {
-WebFloatAnimationCurve* WebFloatAnimationCurve::create()
-{
- return new WebFloatAnimationCurveImpl();
-}
-
WebFloatAnimationCurveImpl::WebFloatAnimationCurveImpl()
: m_curve(cc::KeyframedFloatAnimationCurve::create())
{
diff --git a/webkit/compositor_bindings/web_image_layer_impl.cc b/webkit/compositor_bindings/web_image_layer_impl.cc
index 551ecf8..fd0fef6 100644
--- a/webkit/compositor_bindings/web_image_layer_impl.cc
+++ b/webkit/compositor_bindings/web_image_layer_impl.cc
@@ -11,11 +11,6 @@ using cc::ImageLayer;
namespace WebKit {
-WebImageLayer* WebImageLayer::create()
-{
- return new WebImageLayerImpl();
-}
-
WebImageLayerImpl::WebImageLayerImpl()
: m_layer(new WebLayerImpl(ImageLayer::create()))
{
diff --git a/webkit/compositor_bindings/web_io_surface_layer_impl.cc b/webkit/compositor_bindings/web_io_surface_layer_impl.cc
index d6236ac..c969b92 100644
--- a/webkit/compositor_bindings/web_io_surface_layer_impl.cc
+++ b/webkit/compositor_bindings/web_io_surface_layer_impl.cc
@@ -11,11 +11,6 @@ using cc::IOSurfaceLayer;
namespace WebKit {
-WebIOSurfaceLayer* WebIOSurfaceLayer::create()
-{
- return new WebIOSurfaceLayerImpl();
-}
-
WebIOSurfaceLayerImpl::WebIOSurfaceLayerImpl()
: m_layer(new WebLayerImpl(IOSurfaceLayer::create()))
{
diff --git a/webkit/compositor_bindings/web_layer_impl.cc b/webkit/compositor_bindings/web_layer_impl.cc
index 7856d2c..3df0e39 100644
--- a/webkit/compositor_bindings/web_layer_impl.cc
+++ b/webkit/compositor_bindings/web_layer_impl.cc
@@ -59,11 +59,6 @@ SkMatrix44 skMatrix44FromTransformationMatrix(const WebTransformationMatrix& mat
}
-WebLayer* WebLayer::create()
-{
- return new WebLayerImpl();
-}
-
WebLayerImpl::WebLayerImpl()
: m_layer(Layer::create())
{
diff --git a/webkit/compositor_bindings/web_layer_unittest.cc b/webkit/compositor_bindings/web_layer_unittest.cc
index ed94edb..a62c3e7 100644
--- a/webkit/compositor_bindings/web_layer_unittest.cc
+++ b/webkit/compositor_bindings/web_layer_unittest.cc
@@ -6,9 +6,12 @@
#include "cc/thread.h"
#include "cc/test/compositor_fake_web_graphics_context_3d.h"
-#include "web_layer_impl.h"
-#include "web_layer_tree_view_impl.h"
-#include "web_layer_tree_view_test_common.h"
+#include "webkit/compositor_bindings/test/web_layer_tree_view_test_common.h"
+#include "webkit/compositor_bindings/web_layer_impl.h"
+#include "webkit/compositor_bindings/web_layer_tree_view_impl.h"
+#include "webkit/compositor_bindings/web_content_layer_impl.h"
+#include "webkit/compositor_bindings/web_solid_color_layer_impl.h"
+#include "webkit/compositor_bindings/web_external_texture_layer_impl.h"
#include <public/WebContentLayer.h>
#include <public/WebContentLayerClient.h>
#include <public/WebExternalTextureLayer.h>
@@ -49,7 +52,7 @@ public:
virtual void SetUp()
{
- m_rootLayer.reset(WebLayer::create());
+ m_rootLayer.reset(new WebLayerImpl);
EXPECT_CALL(m_client, scheduleComposite()).Times(AnyNumber());
m_view.reset(new WebLayerTreeViewImpl(&m_client));
EXPECT_TRUE(m_view->initialize(WebLayerTreeView::Settings(), scoped_ptr<cc::Thread>(NULL)));
@@ -68,7 +71,7 @@ public:
protected:
MockWebLayerTreeViewClient m_client;
- scoped_ptr<WebLayer> m_rootLayer;
+ scoped_ptr<WebLayerImpl> m_rootLayer;
scoped_ptr<WebLayerTreeViewImpl> m_view;
};
@@ -78,7 +81,7 @@ TEST_F(WebLayerTest, Client)
{
// Base layer.
EXPECT_CALL(m_client, scheduleComposite()).Times(AnyNumber());
- scoped_ptr<WebLayer> layer(WebLayer::create());
+ scoped_ptr<WebLayer> layer(new WebLayerImpl);
layer->setDrawsContent(true);
m_rootLayer->addChild(layer.get());
Mock::VerifyAndClearExpectations(&m_client);
@@ -107,7 +110,7 @@ TEST_F(WebLayerTest, Client)
EXPECT_TRUE(layer->masksToBounds());
EXPECT_CALL(m_client, scheduleComposite()).Times(AnyNumber());
- scoped_ptr<WebLayer> otherLayer(WebLayer::create());
+ scoped_ptr<WebLayer> otherLayer(new WebLayerImpl);
m_rootLayer->addChild(otherLayer.get());
EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
layer->setMaskLayer(otherLayer.get());
@@ -131,7 +134,7 @@ TEST_F(WebLayerTest, Client)
// Texture layer.
EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
- scoped_ptr<WebExternalTextureLayer> textureLayer(WebExternalTextureLayer::create());
+ scoped_ptr<WebExternalTextureLayer> textureLayer(new WebExternalTextureLayerImpl(NULL));
m_rootLayer->addChild(textureLayer->layer());
Mock::VerifyAndClearExpectations(&m_client);
@@ -158,7 +161,7 @@ TEST_F(WebLayerTest, Client)
#endif // WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT
EXPECT_CALL(m_client, scheduleComposite()).Times(AnyNumber());
- scoped_ptr<WebContentLayer> contentLayer(WebContentLayer::create(&contentClient));
+ scoped_ptr<WebContentLayer> contentLayer(new WebContentLayerImpl(&contentClient));
m_rootLayer->addChild(contentLayer->layer());
Mock::VerifyAndClearExpectations(&m_client);
@@ -169,7 +172,7 @@ TEST_F(WebLayerTest, Client)
// Solid color layer.
EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
- scoped_ptr<WebSolidColorLayer> solidColorLayer(WebSolidColorLayer::create());
+ scoped_ptr<WebSolidColorLayer> solidColorLayer(new WebSolidColorLayerImpl);
m_rootLayer->addChild(solidColorLayer->layer());
Mock::VerifyAndClearExpectations(&m_client);
diff --git a/webkit/compositor_bindings/web_scrollbar_layer_impl.cc b/webkit/compositor_bindings/web_scrollbar_layer_impl.cc
index dbadb31..0c363c1 100644
--- a/webkit/compositor_bindings/web_scrollbar_layer_impl.cc
+++ b/webkit/compositor_bindings/web_scrollbar_layer_impl.cc
@@ -11,12 +11,6 @@ using cc::ScrollbarLayer;
namespace WebKit {
-WebScrollbarLayer* WebScrollbarLayer::create(WebScrollbar* scrollbar, WebScrollbarThemePainter painter, WebScrollbarThemeGeometry* geometry)
-{
- return new WebScrollbarLayerImpl(scrollbar, painter, geometry);
-}
-
-
WebScrollbarLayerImpl::WebScrollbarLayerImpl(WebScrollbar* scrollbar, WebScrollbarThemePainter painter, WebScrollbarThemeGeometry* geometry)
: m_layer(new WebLayerImpl(ScrollbarLayer::create(make_scoped_ptr(scrollbar), painter, make_scoped_ptr(geometry), 0)))
{
diff --git a/webkit/compositor_bindings/web_solid_color_layer_impl.cc b/webkit/compositor_bindings/web_solid_color_layer_impl.cc
index d6f2700..19d3b3b 100644
--- a/webkit/compositor_bindings/web_solid_color_layer_impl.cc
+++ b/webkit/compositor_bindings/web_solid_color_layer_impl.cc
@@ -11,11 +11,6 @@ using cc::SolidColorLayer;
namespace WebKit {
-WebSolidColorLayer* WebSolidColorLayer::create()
-{
- return new WebSolidColorLayerImpl();
-}
-
WebSolidColorLayerImpl::WebSolidColorLayerImpl()
: m_layer(new WebLayerImpl(SolidColorLayer::create()))
{
diff --git a/webkit/compositor_bindings/web_transform_animation_curve_impl.cc b/webkit/compositor_bindings/web_transform_animation_curve_impl.cc
index facd945..5946730 100644
--- a/webkit/compositor_bindings/web_transform_animation_curve_impl.cc
+++ b/webkit/compositor_bindings/web_transform_animation_curve_impl.cc
@@ -10,11 +10,6 @@
namespace WebKit {
-WebTransformAnimationCurve* WebTransformAnimationCurve::create()
-{
- return new WebTransformAnimationCurveImpl();
-}
-
WebTransformAnimationCurveImpl::WebTransformAnimationCurveImpl()
: m_curve(cc::KeyframedTransformAnimationCurve::create())
{
diff --git a/webkit/compositor_bindings/web_video_layer_impl.cc b/webkit/compositor_bindings/web_video_layer_impl.cc
index bea4c5e..4785f3e 100644
--- a/webkit/compositor_bindings/web_video_layer_impl.cc
+++ b/webkit/compositor_bindings/web_video_layer_impl.cc
@@ -11,11 +11,6 @@
namespace WebKit {
-WebVideoLayer* WebVideoLayer::create(WebVideoFrameProvider* provider)
-{
- return new WebVideoLayerImpl(provider);
-}
-
WebVideoLayerImpl::WebVideoLayerImpl(WebVideoFrameProvider* provider)
: m_layer(new WebLayerImpl(
cc::VideoLayer::create(