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

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

Issue 246773008: RWHI should implement BrowserAccessibilityDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac tests Created 6 years, 8 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 | Annotate | Revision Log
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_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/process/kill.h" 21 #include "base/process/kill.h"
22 #include "base/strings/string16.h" 22 #include "base/strings/string16.h"
23 #include "base/time/time.h" 23 #include "base/time/time.h"
24 #include "base/timer/timer.h" 24 #include "base/timer/timer.h"
25 #include "build/build_config.h" 25 #include "build/build_config.h"
26 #include "content/browser/accessibility/browser_accessibility_manager.h"
26 #include "content/browser/renderer_host/input/input_ack_handler.h" 27 #include "content/browser/renderer_host/input/input_ack_handler.h"
27 #include "content/browser/renderer_host/input/input_router_client.h" 28 #include "content/browser/renderer_host/input/input_router_client.h"
28 #include "content/browser/renderer_host/input/synthetic_gesture.h" 29 #include "content/browser/renderer_host/input/synthetic_gesture.h"
29 #include "content/browser/renderer_host/input/touch_emulator_client.h" 30 #include "content/browser/renderer_host/input/touch_emulator_client.h"
30 #include "content/common/input/synthetic_gesture_packet.h" 31 #include "content/common/input/synthetic_gesture_packet.h"
31 #include "content/common/view_message_enums.h" 32 #include "content/common/view_message_enums.h"
32 #include "content/port/browser/event_with_latency_info.h" 33 #include "content/port/browser/event_with_latency_info.h"
33 #include "content/port/common/input_event_ack_state.h" 34 #include "content/port/common/input_event_ack_state.h"
34 #include "content/public/browser/render_widget_host.h" 35 #include "content/public/browser/render_widget_host.h"
35 #include "content/public/common/page_zoom.h" 36 #include "content/public/common/page_zoom.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 class RenderWidgetHostDelegate; 84 class RenderWidgetHostDelegate;
84 class RenderWidgetHostViewPort; 85 class RenderWidgetHostViewPort;
85 class SyntheticGestureController; 86 class SyntheticGestureController;
86 class TimeoutMonitor; 87 class TimeoutMonitor;
87 class TouchEmulator; 88 class TouchEmulator;
88 class WebCursor; 89 class WebCursor;
89 struct EditCommand; 90 struct EditCommand;
90 91
91 // This implements the RenderWidgetHost interface that is exposed to 92 // This implements the RenderWidgetHost interface that is exposed to
92 // embedders of content, and adds things only visible to content. 93 // embedders of content, and adds things only visible to content.
93 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, 94 class CONTENT_EXPORT RenderWidgetHostImpl
94 public InputRouterClient, 95 : virtual public RenderWidgetHost,
95 public InputAckHandler, 96 public InputRouterClient,
96 public TouchEmulatorClient, 97 public InputAckHandler,
97 public IPC::Listener { 98 public TouchEmulatorClient,
99 public IPC::Listener,
100 public BrowserAccessibilityDelegate {
98 public: 101 public:
99 // routing_id can be MSG_ROUTING_NONE, in which case the next available 102 // routing_id can be MSG_ROUTING_NONE, in which case the next available
100 // routing id is taken from the RenderProcessHost. 103 // routing id is taken from the RenderProcessHost.
101 // If this object outlives |delegate|, DetachDelegate() must be called when 104 // If this object outlives |delegate|, DetachDelegate() must be called when
102 // |delegate| goes away. 105 // |delegate| goes away.
103 RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, 106 RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
104 RenderProcessHost* process, 107 RenderProcessHost* process,
105 int routing_id, 108 int routing_id,
106 bool hidden); 109 bool hidden);
107 virtual ~RenderWidgetHostImpl(); 110 virtual ~RenderWidgetHostImpl();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 const MouseEventCallback& callback) OVERRIDE; 171 const MouseEventCallback& callback) OVERRIDE;
169 virtual void RemoveMouseEventCallback( 172 virtual void RemoveMouseEventCallback(
170 const MouseEventCallback& callback) OVERRIDE; 173 const MouseEventCallback& callback) OVERRIDE;
171 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE; 174 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE;
172 virtual void GetSnapshotFromRenderer( 175 virtual void GetSnapshotFromRenderer(
173 const gfx::Rect& src_subrect, 176 const gfx::Rect& src_subrect,
174 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; 177 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
175 178
176 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE; 179 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE;
177 180
178 virtual void AccessibilityDoDefaultAction(int object_id) OVERRIDE; 181 // BrowserAccessibilityDelegate
179 virtual void AccessibilitySetFocus(int object_id) OVERRIDE; 182 virtual void AccessibilitySetFocus(int acc_obj_id) OVERRIDE;
183 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE;
184 virtual void AccessibilityShowMenu(int acc_obj_id) OVERRIDE;
180 virtual void AccessibilityScrollToMakeVisible( 185 virtual void AccessibilityScrollToMakeVisible(
181 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; 186 int acc_obj_id, gfx::Rect subfocus) OVERRIDE;
182 virtual void AccessibilityScrollToPoint( 187 virtual void AccessibilityScrollToPoint(
183 int acc_obj_id, gfx::Point point) OVERRIDE; 188 int acc_obj_id, gfx::Point point) OVERRIDE;
184 virtual void AccessibilitySetTextSelection( 189 virtual void AccessibilitySetTextSelection(
185 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; 190 int acc_obj_id, int start_offset, int end_offset) OVERRIDE;
191 virtual bool AccessibilityViewHasFocus() const OVERRIDE;
192 virtual gfx::Rect AccessibilityGetViewBounds() const OVERRIDE;
193 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds)
194 const OVERRIDE;
195 virtual void AccessibilityFatalError() OVERRIDE;
186 196
187 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; 197 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const;
188 198
189 // Notification that the screen info has changed. 199 // Notification that the screen info has changed.
190 void NotifyScreenInfoChanged(); 200 void NotifyScreenInfoChanged();
191 201
192 // Invalidates the cached screen info so that next resize request 202 // Invalidates the cached screen info so that next resize request
193 // will carry the up to date screen info. Unlike 203 // will carry the up to date screen info. Unlike
194 // |NotifyScreenInfoChanged|, this doesn't send a message to the renderer. 204 // |NotifyScreenInfoChanged|, this doesn't send a message to the renderer.
195 void InvalidateScreenInfo(); 205 void InvalidateScreenInfo();
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // Removes the given accessibility mode from the current accessibility mode 410 // Removes the given accessibility mode from the current accessibility mode
401 // bitmap, managing the bits that are shared with other modes such that a 411 // bitmap, managing the bits that are shared with other modes such that a
402 // bit will only be turned off when all modes that depend on it have been 412 // bit will only be turned off when all modes that depend on it have been
403 // removed. 413 // removed.
404 void RemoveAccessibilityMode(AccessibilityMode mode); 414 void RemoveAccessibilityMode(AccessibilityMode mode);
405 415
406 // Resets the accessibility mode to the default setting in 416 // Resets the accessibility mode to the default setting in
407 // BrowserStateAccessibilityImpl. 417 // BrowserStateAccessibilityImpl.
408 void ResetAccessibilityMode(); 418 void ResetAccessibilityMode();
409 419
410 // Kill the renderer because we got a fatal accessibility error.
411 void FatalAccessibilityTreeError();
412
413 #if defined(OS_WIN) 420 #if defined(OS_WIN)
414 void SetParentNativeViewAccessible( 421 void SetParentNativeViewAccessible(
415 gfx::NativeViewAccessible accessible_parent); 422 gfx::NativeViewAccessible accessible_parent);
416 gfx::NativeViewAccessible GetParentNativeViewAccessible() const; 423 gfx::NativeViewAccessible GetParentNativeViewAccessible() const;
417 #endif 424 #endif
418 425
419 // Executes the edit command on the RenderView. 426 // Executes the edit command on the RenderView.
420 void ExecuteEditCommand(const std::string& command, 427 void ExecuteEditCommand(const std::string& command,
421 const std::string& value); 428 const std::string& value);
422 429
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_; 896 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
890 897
891 int64 last_input_number_; 898 int64 last_input_number_;
892 899
893 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 900 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
894 }; 901 };
895 902
896 } // namespace content 903 } // namespace content
897 904
898 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 905 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698