| 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.h" | 16 #include "base/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 "content/browser/accessibility/browser_accessibility_manager.h" |
| 19 #include "content/browser/renderer_host/ime_adapter_android.h" | 20 #include "content/browser/renderer_host/ime_adapter_android.h" |
| 20 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 21 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 21 #include "gpu/command_buffer/common/mailbox.h" | 22 #include "gpu/command_buffer/common/mailbox.h" |
| 22 #include "third_party/skia/include/core/SkColor.h" | 23 #include "third_party/skia/include/core/SkColor.h" |
| 23 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 24 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 24 #include "ui/gfx/size.h" | 25 #include "ui/gfx/size.h" |
| 25 #include "ui/gfx/vector2d_f.h" | 26 #include "ui/gfx/vector2d_f.h" |
| 26 | 27 |
| 27 struct ViewHostMsg_TextInputState_Params; | 28 struct ViewHostMsg_TextInputState_Params; |
| 28 | 29 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 47 class RenderWidgetHost; | 48 class RenderWidgetHost; |
| 48 class RenderWidgetHostImpl; | 49 class RenderWidgetHostImpl; |
| 49 class SurfaceTextureTransportClient; | 50 class SurfaceTextureTransportClient; |
| 50 struct NativeWebKeyboardEvent; | 51 struct NativeWebKeyboardEvent; |
| 51 | 52 |
| 52 // ----------------------------------------------------------------------------- | 53 // ----------------------------------------------------------------------------- |
| 53 // See comments in render_widget_host_view.h about this class and its members. | 54 // See comments in render_widget_host_view.h about this class and its members. |
| 54 // ----------------------------------------------------------------------------- | 55 // ----------------------------------------------------------------------------- |
| 55 class RenderWidgetHostViewAndroid | 56 class RenderWidgetHostViewAndroid |
| 56 : public RenderWidgetHostViewBase, | 57 : public RenderWidgetHostViewBase, |
| 58 public BrowserAccessibilityDelegate, |
| 57 public cc::TextureLayerClient, | 59 public cc::TextureLayerClient, |
| 58 public cc::DelegatedRendererLayerClient { | 60 public cc::DelegatedRendererLayerClient { |
| 59 public: | 61 public: |
| 60 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, | 62 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, |
| 61 ContentViewCoreImpl* content_view_core); | 63 ContentViewCoreImpl* content_view_core); |
| 62 virtual ~RenderWidgetHostViewAndroid(); | 64 virtual ~RenderWidgetHostViewAndroid(); |
| 63 | 65 |
| 64 // RenderWidgetHostView implementation. | 66 // RenderWidgetHostView implementation. |
| 65 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 67 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 66 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; | 68 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 virtual void OnSwapCompositorFrame( | 156 virtual void OnSwapCompositorFrame( |
| 155 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; | 157 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; |
| 156 virtual void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, | 158 virtual void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, |
| 157 gfx::Vector2dF current_fling_velocity) OVERRIDE; | 159 gfx::Vector2dF current_fling_velocity) OVERRIDE; |
| 158 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, | 160 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, |
| 159 const SkBitmap& zoomed_bitmap) OVERRIDE; | 161 const SkBitmap& zoomed_bitmap) OVERRIDE; |
| 160 virtual SmoothScrollGesture* CreateSmoothScrollGesture( | 162 virtual SmoothScrollGesture* CreateSmoothScrollGesture( |
| 161 bool scroll_down, int pixels_to_scroll, int mouse_event_x, | 163 bool scroll_down, int pixels_to_scroll, int mouse_event_x, |
| 162 int mouse_event_y) OVERRIDE; | 164 int mouse_event_y) OVERRIDE; |
| 163 | 165 |
| 166 // Implementation of BrowserAccessibilityDelegate: |
| 167 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; |
| 168 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; |
| 169 virtual void AccessibilityScrollToMakeVisible( |
| 170 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; |
| 171 virtual void AccessibilityScrollToPoint( |
| 172 int acc_obj_id, gfx::Point point) OVERRIDE; |
| 173 virtual void AccessibilitySetTextSelection( |
| 174 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; |
| 175 |
| 176 virtual gfx::Point GetLastTouchEventLocation() const OVERRIDE; |
| 177 virtual void FatalAccessibilityTreeError() OVERRIDE; |
| 178 |
| 164 // cc::TextureLayerClient implementation. | 179 // cc::TextureLayerClient implementation. |
| 165 virtual unsigned PrepareTexture(cc::ResourceUpdateQueue* queue) OVERRIDE; | 180 virtual unsigned PrepareTexture(cc::ResourceUpdateQueue* queue) OVERRIDE; |
| 166 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; | 181 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; |
| 167 virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox) OVERRIDE; | 182 virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox) OVERRIDE; |
| 168 | 183 |
| 169 // cc::DelegatedRendererLayerClient implementation. | 184 // cc::DelegatedRendererLayerClient implementation. |
| 170 virtual void DidCommitFrameData() OVERRIDE; | 185 virtual void DidCommitFrameData() OVERRIDE; |
| 171 | 186 |
| 172 // Non-virtual methods | 187 // Non-virtual methods |
| 173 void SetContentViewCore(ContentViewCoreImpl* content_view_core); | 188 void SetContentViewCore(ContentViewCoreImpl* content_view_core); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 287 |
| 273 // Used to render overscroll overlays. | 288 // Used to render overscroll overlays. |
| 274 scoped_ptr<OverscrollGlow> overscroll_effect_; | 289 scoped_ptr<OverscrollGlow> overscroll_effect_; |
| 275 | 290 |
| 276 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 291 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 277 }; | 292 }; |
| 278 | 293 |
| 279 } // namespace content | 294 } // namespace content |
| 280 | 295 |
| 281 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 296 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |