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

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

Issue 12335101: Move some accessibility methods, enums and interfaces into the content/public API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove #include which crept back in" Created 7 years, 9 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_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 <vector> 13 #include <vector>
14 14
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/process_util.h" 19 #include "base/process_util.h"
20 #include "base/string16.h" 20 #include "base/string16.h"
21 #include "base/time.h" 21 #include "base/time.h"
22 #include "base/timer.h" 22 #include "base/timer.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "content/common/view_message_enums.h" 24 #include "content/common/view_message_enums.h"
25 #include "content/port/common/input_event_ack_state.h" 25 #include "content/port/common/input_event_ack_state.h"
26 #include "content/public/browser/render_widget_host.h" 26 #include "content/public/browser/render_widget_host.h"
27 #include "content/public/common/accessibility_mode.h"
27 #include "content/public/common/page_zoom.h" 28 #include "content/public/common/page_zoom.h"
28 #include "ipc/ipc_listener.h" 29 #include "ipc/ipc_listener.h"
29 #include "ui/base/ime/text_input_type.h" 30 #include "ui/base/ime/text_input_type.h"
30 #include "ui/gfx/native_widget_types.h" 31 #include "ui/gfx/native_widget_types.h"
31 32
32 class WebCursor; 33 class WebCursor;
33 struct AcceleratedSurfaceMsg_BufferPresented_Params; 34 struct AcceleratedSurfaceMsg_BufferPresented_Params;
34 struct ViewHostMsg_UpdateRect_Params; 35 struct ViewHostMsg_UpdateRect_Params;
35 struct ViewHostMsg_TextInputState_Params; 36 struct ViewHostMsg_TextInputState_Params;
36 struct ViewHostMsg_BeginSmoothScroll_Params; 37 struct ViewHostMsg_BeginSmoothScroll_Params;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const gfx::Size& accelerated_dst_size, 112 const gfx::Size& accelerated_dst_size,
112 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; 113 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
113 #if defined(TOOLKIT_GTK) 114 #if defined(TOOLKIT_GTK)
114 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, 115 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect,
115 GdkWindow* target) OVERRIDE; 116 GdkWindow* target) OVERRIDE;
116 #elif defined(OS_MACOSX) 117 #elif defined(OS_MACOSX)
117 virtual gfx::Size GetBackingStoreSize() OVERRIDE; 118 virtual gfx::Size GetBackingStoreSize() OVERRIDE;
118 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, 119 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect,
119 CGContextRef target) OVERRIDE; 120 CGContextRef target) OVERRIDE;
120 #endif 121 #endif
121 virtual void EnableFullAccessibilityMode() OVERRIDE; 122 virtual AccessibilityMode GetAccessibilityMode() const OVERRIDE;
123
124 // Send a message to the renderer process to change the accessibility mode.
125 virtual void SetAccessibilityMode(AccessibilityMode mode) OVERRIDE;
126
122 virtual void ForwardMouseEvent( 127 virtual void ForwardMouseEvent(
123 const WebKit::WebMouseEvent& mouse_event) OVERRIDE; 128 const WebKit::WebMouseEvent& mouse_event) OVERRIDE;
124 virtual void ForwardWheelEvent( 129 virtual void ForwardWheelEvent(
125 const WebKit::WebMouseWheelEvent& wheel_event) OVERRIDE; 130 const WebKit::WebMouseWheelEvent& wheel_event) OVERRIDE;
126 virtual void ForwardKeyboardEvent( 131 virtual void ForwardKeyboardEvent(
127 const NativeWebKeyboardEvent& key_event) OVERRIDE; 132 const NativeWebKeyboardEvent& key_event) OVERRIDE;
128 virtual const gfx::Vector2d& GetLastScrollOffset() const OVERRIDE; 133 virtual const gfx::Vector2d& GetLastScrollOffset() const OVERRIDE;
129 virtual RenderProcessHost* GetProcess() const OVERRIDE; 134 virtual RenderProcessHost* GetProcess() const OVERRIDE;
130 virtual int GetRoutingID() const OVERRIDE; 135 virtual int GetRoutingID() const OVERRIDE;
131 virtual RenderWidgetHostView* GetView() const OVERRIDE; 136 virtual RenderWidgetHostView* GetView() const OVERRIDE;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 void StartUserGesture(); 325 void StartUserGesture();
321 326
322 // Set the RenderView background. 327 // Set the RenderView background.
323 void SetBackground(const SkBitmap& background); 328 void SetBackground(const SkBitmap& background);
324 329
325 // Notifies the renderer that the next key event is bound to one or more 330 // Notifies the renderer that the next key event is bound to one or more
326 // pre-defined edit commands 331 // pre-defined edit commands
327 void SetEditCommandsForNextKeyEvent( 332 void SetEditCommandsForNextKeyEvent(
328 const std::vector<EditCommand>& commands); 333 const std::vector<EditCommand>& commands);
329 334
330 // Send a message to the renderer process to change the accessibility mode.
331 void SetAccessibilityMode(AccessibilityMode mode);
332
333 // Relay a request from assistive technology to perform the default action 335 // Relay a request from assistive technology to perform the default action
334 // on a given node. 336 // on a given node.
335 void AccessibilityDoDefaultAction(int object_id); 337 void AccessibilityDoDefaultAction(int object_id);
336 338
337 // Relay a request from assistive technology to set focus to a given node. 339 // Relay a request from assistive technology to set focus to a given node.
338 void AccessibilitySetFocus(int object_id); 340 void AccessibilitySetFocus(int object_id);
339 341
340 // Relay a request from assistive technology to make a given object 342 // Relay a request from assistive technology to make a given object
341 // visible by scrolling as many scrollable containers as necessary. 343 // visible by scrolling as many scrollable containers as necessary.
342 // In addition, if it's not possible to make the entire object visible, 344 // In addition, if it's not possible to make the entire object visible,
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 722
721 // (Similar to |next_mouse_move_|.) The next mouse wheel events to send. 723 // (Similar to |next_mouse_move_|.) The next mouse wheel events to send.
722 // Unlike mouse moves, mouse wheel events received while one is pending are 724 // Unlike mouse moves, mouse wheel events received while one is pending are
723 // coalesced (by accumulating deltas) if they match the previous event in 725 // coalesced (by accumulating deltas) if they match the previous event in
724 // modifiers. On the Mac, in particular, mouse wheel events are received at a 726 // modifiers. On the Mac, in particular, mouse wheel events are received at a
725 // high rate; not waiting for the ack results in jankiness, and using the same 727 // high rate; not waiting for the ack results in jankiness, and using the same
726 // mechanism as for mouse moves (just dropping old events when multiple ones 728 // mechanism as for mouse moves (just dropping old events when multiple ones
727 // would be queued) results in very slow scrolling. 729 // would be queued) results in very slow scrolling.
728 WheelEventQueue coalesced_mouse_wheel_events_; 730 WheelEventQueue coalesced_mouse_wheel_events_;
729 731
732 enum AccessibilityMode accessibility_mode_;
733
730 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. 734 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK.
731 bool select_range_pending_; 735 bool select_range_pending_;
732 736
733 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any. 737 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any.
734 struct SelectionRange { 738 struct SelectionRange {
735 gfx::Point start, end; 739 gfx::Point start, end;
736 }; 740 };
737 scoped_ptr<SelectionRange> next_selection_range_; 741 scoped_ptr<SelectionRange> next_selection_range_;
738 742
739 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK. 743 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 #if defined(OS_WIN) 846 #if defined(OS_WIN)
843 std::list<HWND> dummy_windows_for_activation_; 847 std::list<HWND> dummy_windows_for_activation_;
844 #endif 848 #endif
845 849
846 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 850 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
847 }; 851 };
848 852
849 } // namespace content 853 } // namespace content
850 854
851 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 855 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698