Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 15741009: Native Android accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address most reviewer feedback Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // Used to render overscroll overlays. 289 // Used to render overscroll overlays.
275 bool overscroll_effect_enabled_; 290 bool overscroll_effect_enabled_;
276 scoped_ptr<OverscrollGlow> overscroll_effect_; 291 scoped_ptr<OverscrollGlow> overscroll_effect_;
277 292
278 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 293 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
279 }; 294 };
280 295
281 } // namespace content 296 } // namespace content
282 297
283 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 298 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698