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

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: Candidate patch for public demo 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/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 24 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.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 17 matching lines...) Expand all
46 class RenderWidgetHost; 47 class RenderWidgetHost;
47 class RenderWidgetHostImpl; 48 class RenderWidgetHostImpl;
48 class SurfaceTextureTransportClient; 49 class SurfaceTextureTransportClient;
49 struct NativeWebKeyboardEvent; 50 struct NativeWebKeyboardEvent;
50 51
51 // ----------------------------------------------------------------------------- 52 // -----------------------------------------------------------------------------
52 // See comments in render_widget_host_view.h about this class and its members. 53 // See comments in render_widget_host_view.h about this class and its members.
53 // ----------------------------------------------------------------------------- 54 // -----------------------------------------------------------------------------
54 class RenderWidgetHostViewAndroid 55 class RenderWidgetHostViewAndroid
55 : public RenderWidgetHostViewBase, 56 : public RenderWidgetHostViewBase,
57 public BrowserAccessibilityDelegate,
56 public cc::TextureLayerClient, 58 public cc::TextureLayerClient,
57 public cc::DelegatedRendererLayerClient { 59 public cc::DelegatedRendererLayerClient {
58 public: 60 public:
59 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, 61 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget,
60 ContentViewCoreImpl* content_view_core); 62 ContentViewCoreImpl* content_view_core);
61 virtual ~RenderWidgetHostViewAndroid(); 63 virtual ~RenderWidgetHostViewAndroid();
62 64
63 // RenderWidgetHostView implementation. 65 // RenderWidgetHostView implementation.
64 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 66 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
65 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; 67 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 virtual void UnlockMouse() OVERRIDE; 153 virtual void UnlockMouse() OVERRIDE;
152 virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE; 154 virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE;
153 virtual void OnSwapCompositorFrame( 155 virtual void OnSwapCompositorFrame(
154 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; 156 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE;
155 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, 157 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect,
156 const SkBitmap& zoomed_bitmap) OVERRIDE; 158 const SkBitmap& zoomed_bitmap) OVERRIDE;
157 virtual SmoothScrollGesture* CreateSmoothScrollGesture( 159 virtual SmoothScrollGesture* CreateSmoothScrollGesture(
158 bool scroll_down, int pixels_to_scroll, int mouse_event_x, 160 bool scroll_down, int pixels_to_scroll, int mouse_event_x,
159 int mouse_event_y) OVERRIDE; 161 int mouse_event_y) OVERRIDE;
160 162
163 // Implementation of BrowserAccessibilityDelegate:
164 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE;
165 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE;
166 virtual void AccessibilityScrollToMakeVisible(
167 int acc_obj_id, gfx::Rect subfocus) OVERRIDE;
168 virtual void AccessibilityScrollToPoint(
169 int acc_obj_id, gfx::Point point) OVERRIDE;
170 virtual void AccessibilitySetTextSelection(
171 int acc_obj_id, int start_offset, int end_offset) OVERRIDE;
172
173 virtual gfx::Point GetLastTouchEventLocation() const OVERRIDE;
174 virtual void FatalAccessibilityTreeError() OVERRIDE;
175
161 // cc::TextureLayerClient implementation. 176 // cc::TextureLayerClient implementation.
162 virtual unsigned PrepareTexture(cc::ResourceUpdateQueue* queue) OVERRIDE; 177 virtual unsigned PrepareTexture(cc::ResourceUpdateQueue* queue) OVERRIDE;
163 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; 178 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
164 virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox) OVERRIDE; 179 virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox) OVERRIDE;
165 180
166 // cc::DelegatedRendererLayerClient implementation. 181 // cc::DelegatedRendererLayerClient implementation.
167 virtual void DidCommitFrameData() OVERRIDE; 182 virtual void DidCommitFrameData() OVERRIDE;
168 183
169 // Non-virtual methods 184 // Non-virtual methods
170 void SetContentViewCore(ContentViewCoreImpl* content_view_core); 185 void SetContentViewCore(ContentViewCoreImpl* content_view_core);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 274 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
260 275
261 std::queue<base::Closure> ack_callbacks_; 276 std::queue<base::Closure> ack_callbacks_;
262 277
263 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 278 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
264 }; 279 };
265 280
266 } // namespace content 281 } // namespace content
267 282
268 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 283 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698