| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/process/process.h" | 16 #include "base/process/process.h" |
| 17 #include "cc/layers/delegated_renderer_layer_client.h" | 17 #include "cc/layers/delegated_renderer_layer_client.h" |
| 18 #include "cc/layers/texture_layer_client.h" | 18 #include "cc/layers/texture_layer_client.h" |
| 19 #include "cc/output/begin_frame_args.h" | 19 #include "cc/output/begin_frame_args.h" |
| 20 #include "content/browser/accessibility/browser_accessibility_manager.h" | 20 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 21 #include "content/browser/renderer_host/compositor_observer.h" |
| 21 #include "content/browser/renderer_host/image_transport_factory_android.h" | 22 #include "content/browser/renderer_host/image_transport_factory_android.h" |
| 22 #include "content/browser/renderer_host/ime_adapter_android.h" | 23 #include "content/browser/renderer_host/ime_adapter_android.h" |
| 23 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 24 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 24 #include "gpu/command_buffer/common/mailbox.h" | 25 #include "gpu/command_buffer/common/mailbox.h" |
| 25 #include "third_party/skia/include/core/SkColor.h" | 26 #include "third_party/skia/include/core/SkColor.h" |
| 26 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 27 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 27 #include "ui/gfx/size.h" | 28 #include "ui/gfx/size.h" |
| 28 #include "ui/gfx/vector2d_f.h" | 29 #include "ui/gfx/vector2d_f.h" |
| 29 | 30 |
| 30 struct ViewHostMsg_TextInputState_Params; | 31 struct ViewHostMsg_TextInputState_Params; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 54 struct NativeWebKeyboardEvent; | 55 struct NativeWebKeyboardEvent; |
| 55 | 56 |
| 56 // ----------------------------------------------------------------------------- | 57 // ----------------------------------------------------------------------------- |
| 57 // See comments in render_widget_host_view.h about this class and its members. | 58 // See comments in render_widget_host_view.h about this class and its members. |
| 58 // ----------------------------------------------------------------------------- | 59 // ----------------------------------------------------------------------------- |
| 59 class RenderWidgetHostViewAndroid | 60 class RenderWidgetHostViewAndroid |
| 60 : public RenderWidgetHostViewBase, | 61 : public RenderWidgetHostViewBase, |
| 61 public BrowserAccessibilityDelegate, | 62 public BrowserAccessibilityDelegate, |
| 62 public cc::TextureLayerClient, | 63 public cc::TextureLayerClient, |
| 63 public cc::DelegatedRendererLayerClient, | 64 public cc::DelegatedRendererLayerClient, |
| 65 public CompositorObserver, |
| 64 public ImageTransportFactoryAndroidObserver { | 66 public ImageTransportFactoryAndroidObserver { |
| 65 public: | 67 public: |
| 66 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, | 68 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, |
| 67 ContentViewCoreImpl* content_view_core); | 69 ContentViewCoreImpl* content_view_core); |
| 68 virtual ~RenderWidgetHostViewAndroid(); | 70 virtual ~RenderWidgetHostViewAndroid(); |
| 69 | 71 |
| 70 // RenderWidgetHostView implementation. | 72 // RenderWidgetHostView implementation. |
| 71 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 73 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 72 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; | 74 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; |
| 73 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 75 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; | 192 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; |
| 191 virtual bool PrepareTextureMailbox( | 193 virtual bool PrepareTextureMailbox( |
| 192 cc::TextureMailbox* mailbox, | 194 cc::TextureMailbox* mailbox, |
| 193 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 195 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 194 bool use_shared_memory) OVERRIDE; | 196 bool use_shared_memory) OVERRIDE; |
| 195 | 197 |
| 196 // cc::DelegatedRendererLayerClient implementation. | 198 // cc::DelegatedRendererLayerClient implementation. |
| 197 virtual void DidCommitFrameData() OVERRIDE; | 199 virtual void DidCommitFrameData() OVERRIDE; |
| 198 virtual void UnusedResourcesAreAvailable() OVERRIDE {} | 200 virtual void UnusedResourcesAreAvailable() OVERRIDE {} |
| 199 | 201 |
| 202 // content::CompositorObserver implementation. |
| 203 virtual void OnCompositingDidCommit(Compositor* compositor) OVERRIDE; |
| 204 |
| 200 // ImageTransportFactoryAndroidObserver implementation. | 205 // ImageTransportFactoryAndroidObserver implementation. |
| 201 virtual void OnLostResources() OVERRIDE; | 206 virtual void OnLostResources() OVERRIDE; |
| 202 | 207 |
| 203 // Non-virtual methods | 208 // Non-virtual methods |
| 204 void SetContentViewCore(ContentViewCoreImpl* content_view_core); | 209 void SetContentViewCore(ContentViewCoreImpl* content_view_core); |
| 205 SkColor GetCachedBackgroundColor() const; | 210 SkColor GetCachedBackgroundColor() const; |
| 206 void SendKeyEvent(const NativeWebKeyboardEvent& event); | 211 void SendKeyEvent(const NativeWebKeyboardEvent& event); |
| 207 void SendTouchEvent(const WebKit::WebTouchEvent& event); | 212 void SendTouchEvent(const WebKit::WebTouchEvent& event); |
| 208 void SendMouseEvent(const WebKit::WebMouseEvent& event); | 213 void SendMouseEvent(const WebKit::WebMouseEvent& event); |
| 209 void SendMouseWheelEvent(const WebKit::WebMouseWheelEvent& event); | 214 void SendMouseWheelEvent(const WebKit::WebMouseWheelEvent& event); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 scoped_ptr<OverscrollGlow> overscroll_effect_; | 331 scoped_ptr<OverscrollGlow> overscroll_effect_; |
| 327 | 332 |
| 328 bool flush_input_requested_; | 333 bool flush_input_requested_; |
| 329 | 334 |
| 330 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 335 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 331 }; | 336 }; |
| 332 | 337 |
| 333 } // namespace content | 338 } // namespace content |
| 334 | 339 |
| 335 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 340 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |