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_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 Loading... | |
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 void EnableFullAccessibilityMode() OVERRIDE; |
dmazzoni
2013/02/27 16:41:01
Get rid of this variant now that we have SetAccess
aboxhall
2013/02/27 18:58:50
Done.
| |
123 virtual AccessibilityMode GetAccessibilityMode() const OVERRIDE; | |
124 | |
125 // Send a message to the renderer process to change the accessibility mode. | |
126 virtual void SetAccessibilityMode(AccessibilityMode mode) OVERRIDE; | |
127 | |
122 virtual void ForwardMouseEvent( | 128 virtual void ForwardMouseEvent( |
123 const WebKit::WebMouseEvent& mouse_event) OVERRIDE; | 129 const WebKit::WebMouseEvent& mouse_event) OVERRIDE; |
124 virtual void ForwardWheelEvent( | 130 virtual void ForwardWheelEvent( |
125 const WebKit::WebMouseWheelEvent& wheel_event) OVERRIDE; | 131 const WebKit::WebMouseWheelEvent& wheel_event) OVERRIDE; |
126 virtual void ForwardKeyboardEvent( | 132 virtual void ForwardKeyboardEvent( |
127 const NativeWebKeyboardEvent& key_event) OVERRIDE; | 133 const NativeWebKeyboardEvent& key_event) OVERRIDE; |
128 virtual const gfx::Vector2d& GetLastScrollOffset() const OVERRIDE; | 134 virtual const gfx::Vector2d& GetLastScrollOffset() const OVERRIDE; |
129 virtual RenderProcessHost* GetProcess() const OVERRIDE; | 135 virtual RenderProcessHost* GetProcess() const OVERRIDE; |
130 virtual int GetRoutingID() const OVERRIDE; | 136 virtual int GetRoutingID() const OVERRIDE; |
131 virtual RenderWidgetHostView* GetView() const OVERRIDE; | 137 virtual RenderWidgetHostView* GetView() const OVERRIDE; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
320 void StartUserGesture(); | 326 void StartUserGesture(); |
321 | 327 |
322 // Set the RenderView background. | 328 // Set the RenderView background. |
323 void SetBackground(const SkBitmap& background); | 329 void SetBackground(const SkBitmap& background); |
324 | 330 |
325 // Notifies the renderer that the next key event is bound to one or more | 331 // Notifies the renderer that the next key event is bound to one or more |
326 // pre-defined edit commands | 332 // pre-defined edit commands |
327 void SetEditCommandsForNextKeyEvent( | 333 void SetEditCommandsForNextKeyEvent( |
328 const std::vector<EditCommand>& commands); | 334 const std::vector<EditCommand>& commands); |
329 | 335 |
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 | 336 // Relay a request from assistive technology to perform the default action |
334 // on a given node. | 337 // on a given node. |
335 void AccessibilityDoDefaultAction(int object_id); | 338 void AccessibilityDoDefaultAction(int object_id); |
336 | 339 |
337 // Relay a request from assistive technology to set focus to a given node. | 340 // Relay a request from assistive technology to set focus to a given node. |
338 void AccessibilitySetFocus(int object_id); | 341 void AccessibilitySetFocus(int object_id); |
339 | 342 |
340 // Relay a request from assistive technology to make a given object | 343 // Relay a request from assistive technology to make a given object |
341 // visible by scrolling as many scrollable containers as necessary. | 344 // visible by scrolling as many scrollable containers as necessary. |
342 // In addition, if it's not possible to make the entire object visible, | 345 // 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 Loading... | |
720 | 723 |
721 // (Similar to |next_mouse_move_|.) The next mouse wheel events to send. | 724 // (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 | 725 // Unlike mouse moves, mouse wheel events received while one is pending are |
723 // coalesced (by accumulating deltas) if they match the previous event in | 726 // 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 | 727 // 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 | 728 // 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 | 729 // mechanism as for mouse moves (just dropping old events when multiple ones |
727 // would be queued) results in very slow scrolling. | 730 // would be queued) results in very slow scrolling. |
728 WheelEventQueue coalesced_mouse_wheel_events_; | 731 WheelEventQueue coalesced_mouse_wheel_events_; |
729 | 732 |
733 enum AccessibilityMode accessibility_mode_; | |
734 | |
730 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. | 735 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. |
731 bool select_range_pending_; | 736 bool select_range_pending_; |
732 | 737 |
733 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any. | 738 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any. |
734 struct SelectionRange { | 739 struct SelectionRange { |
735 gfx::Point start, end; | 740 gfx::Point start, end; |
736 }; | 741 }; |
737 scoped_ptr<SelectionRange> next_selection_range_; | 742 scoped_ptr<SelectionRange> next_selection_range_; |
738 | 743 |
739 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK. | 744 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
842 #if defined(OS_WIN) | 847 #if defined(OS_WIN) |
843 std::list<HWND> dummy_windows_for_activation_; | 848 std::list<HWND> dummy_windows_for_activation_; |
844 #endif | 849 #endif |
845 | 850 |
846 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 851 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
847 }; | 852 }; |
848 | 853 |
849 } // namespace content | 854 } // namespace content |
850 | 855 |
851 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 856 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |