Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_android.h |
| diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h |
| index fb0892a8e1a195439e9d6d1837b8dde314015a4a..c17c0a5d6a53246b3336ece4fc67a4f253eaa61d 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_android.h |
| +++ b/content/browser/renderer_host/render_widget_host_view_android.h |
| @@ -22,6 +22,8 @@ |
| #include "content/browser/renderer_host/image_transport_factory_android.h" |
| #include "content/browser/renderer_host/ime_adapter_android.h" |
| #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| +#include "content/public/browser/android/compositor_observer.h" |
| +#include "content/public/browser/android/compositor_provider_client.h" |
| #include "gpu/command_buffer/common/mailbox.h" |
| #include "third_party/skia/include/core/SkColor.h" |
| #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| @@ -49,6 +51,7 @@ class WebMouseEvent; |
| } |
| namespace content { |
| +class CompositorProvider; |
| class ContentViewCoreImpl; |
| class OverscrollGlow; |
| class RenderWidgetHost; |
| @@ -61,13 +64,14 @@ struct NativeWebKeyboardEvent; |
| class RenderWidgetHostViewAndroid |
| : public RenderWidgetHostViewBase, |
| public BrowserAccessibilityDelegate, |
| - public cc::TextureLayerClient, |
| - public cc::DelegatedRendererLayerClient, |
| public cc::DelegatedFrameResourceCollectionClient, |
| + public CompositorObserver, |
| + public CompositorProviderClient, |
| public ImageTransportFactoryAndroidObserver { |
| public: |
| RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, |
| - ContentViewCoreImpl* content_view_core); |
| + ContentViewCoreImpl* content_view_core, |
| + CompositorProvider* compositor_provider); |
| virtual ~RenderWidgetHostViewAndroid(); |
| // RenderWidgetHostView implementation. |
| @@ -190,22 +194,18 @@ class RenderWidgetHostViewAndroid |
| virtual gfx::Point GetLastTouchEventLocation() const OVERRIDE; |
| virtual void FatalAccessibilityTreeError() OVERRIDE; |
| - // cc::TextureLayerClient implementation. |
| - virtual unsigned PrepareTexture() OVERRIDE; |
| - virtual bool PrepareTextureMailbox( |
| - cc::TextureMailbox* mailbox, |
| - scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| - bool use_shared_memory) OVERRIDE; |
| - |
| - // cc::DelegatedRendererLayerClient implementation. |
| - virtual void DidCommitFrameData() OVERRIDE; |
| - |
| // cc::DelegatedFrameResourceCollectionClient implementation. |
| virtual void UnusedResourcesAreAvailable() OVERRIDE; |
| + // content::CompositorObserver implementation. |
| + virtual void OnCompositingDidCommit(Compositor* compositor) OVERRIDE; |
| + |
| // ImageTransportFactoryAndroidObserver implementation. |
| virtual void OnLostResources() OVERRIDE; |
| + // CompositorProviderClient implementation. |
| + virtual void ChangeCompositor(Compositor* new_compositor) OVERRIDE; |
|
no sievers
2013/11/08 22:14:04
nit: maybe just 'SetCompositor'?
powei
2013/11/08 22:51:16
Done.
|
| + |
| // Non-virtual methods |
| void SetContentViewCore(ContentViewCoreImpl* content_view_core); |
| SkColor GetCachedBackgroundColor() const; |
| @@ -220,6 +220,7 @@ class RenderWidgetHostViewAndroid |
| void OnDidChangeBodyBackgroundColor(SkColor color); |
| void OnStartContentIntent(const GURL& content_url); |
| void OnSetNeedsBeginFrame(bool enabled); |
| + void SetCompositorProvider(CompositorProvider* compositor_provider); |
|
no sievers
2013/11/08 22:14:04
That's weird. Isn't the whole point of the provide
powei
2013/11/08 22:51:16
I agree this isn't great. Maybe you can suggest a
|
| int GetNativeImeAdapter(); |
| @@ -270,6 +271,10 @@ class RenderWidgetHostViewAndroid |
| void UpdateAnimationSize(const cc::CompositorFrameMetadata& frame_metadata); |
| void ScheduleAnimationIfNecessary(); |
| + Compositor* GetCompositor(); |
| + void ObserveCompositor(Compositor* compositor); |
| + void UnobserveCompositor(Compositor* compositor); |
| + |
| // Called after async screenshot task completes. Scales and crops the result |
| // of the copy. |
| static void PrepareTextureCopyOutputResult( |
| @@ -340,6 +345,8 @@ class RenderWidgetHostViewAndroid |
| int accelerated_surface_route_id_; |
| + CompositorProvider* compositor_provider_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| }; |