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> |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 385 |
386 // Set the RenderView background. | 386 // Set the RenderView background. |
387 void SetBackground(const SkBitmap& background); | 387 void SetBackground(const SkBitmap& background); |
388 | 388 |
389 // Notifies the renderer that the next key event is bound to one or more | 389 // Notifies the renderer that the next key event is bound to one or more |
390 // pre-defined edit commands | 390 // pre-defined edit commands |
391 void SetEditCommandsForNextKeyEvent( | 391 void SetEditCommandsForNextKeyEvent( |
392 const std::vector<EditCommand>& commands); | 392 const std::vector<EditCommand>& commands); |
393 | 393 |
394 // Gets the accessibility mode. | 394 // Gets the accessibility mode. |
395 AccessibilityMode accessibility_mode() const { | 395 unsigned int accessibility_mode() const { |
396 return accessibility_mode_; | 396 return accessibility_mode_; |
397 } | 397 } |
398 | 398 |
399 // Send a message to the renderer process to change the accessibility mode. | 399 // Adds the given accessibility mode to the current accessibility mode bitmap. |
400 void SetAccessibilityMode(AccessibilityMode mode); | 400 void AddAccessibilityMode(AccessibilityMode mode); |
| 401 |
| 402 // Removes the given accessibility mode from the current accessibility mode |
| 403 // bitmap, managing the bits that are shared with other modes such that a |
| 404 // bit will only be turned off when all modes that depend on it have been |
| 405 // removed. |
| 406 void RemoveAccessibilityMode(AccessibilityMode mode); |
401 | 407 |
402 // Relay a request from assistive technology to perform the default action | 408 // Relay a request from assistive technology to perform the default action |
403 // on a given node. | 409 // on a given node. |
404 void AccessibilityDoDefaultAction(int object_id); | 410 void AccessibilityDoDefaultAction(int object_id); |
405 | 411 |
406 // Relay a request from assistive technology to set focus to a given node. | 412 // Relay a request from assistive technology to set focus to a given node. |
407 void AccessibilitySetFocus(int object_id); | 413 void AccessibilitySetFocus(int object_id); |
408 | 414 |
409 // Relay a request from assistive technology to make a given object | 415 // Relay a request from assistive technology to make a given object |
410 // visible by scrolling as many scrollable containers as necessary. | 416 // visible by scrolling as many scrollable containers as necessary. |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, | 757 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, |
752 InputEventAckState ack_result) OVERRIDE; | 758 InputEventAckState ack_result) OVERRIDE; |
753 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; | 759 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; |
754 | 760 |
755 // Called when there is a new auto resize (using a post to avoid a stack | 761 // Called when there is a new auto resize (using a post to avoid a stack |
756 // which may get in recursive loops). | 762 // which may get in recursive loops). |
757 void DelayedAutoResized(); | 763 void DelayedAutoResized(); |
758 | 764 |
759 void WindowSnapshotReachedScreen(int snapshot_id); | 765 void WindowSnapshotReachedScreen(int snapshot_id); |
760 | 766 |
| 767 // Send a message to the renderer process to change the accessibility mode. |
| 768 void SetAccessibilityMode(unsigned int AccessibilityMode); |
| 769 |
761 // Our delegate, which wants to know mainly about keyboard events. | 770 // Our delegate, which wants to know mainly about keyboard events. |
762 // It will remain non-NULL until DetachDelegate() is called. | 771 // It will remain non-NULL until DetachDelegate() is called. |
763 RenderWidgetHostDelegate* delegate_; | 772 RenderWidgetHostDelegate* delegate_; |
764 | 773 |
765 // Created during construction but initialized during Init*(). Therefore, it | 774 // Created during construction but initialized during Init*(). Therefore, it |
766 // is guaranteed never to be NULL, but its channel may be NULL if the | 775 // is guaranteed never to be NULL, but its channel may be NULL if the |
767 // renderer crashed, so you must always check that. | 776 // renderer crashed, so you must always check that. |
768 RenderProcessHost* process_; | 777 RenderProcessHost* process_; |
769 | 778 |
770 // The ID of the corresponding object in the Renderer Instance. | 779 // The ID of the corresponding object in the Renderer Instance. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 gfx::Size new_auto_size_; | 832 gfx::Size new_auto_size_; |
824 | 833 |
825 // True if the render widget host should track the render widget's size as | 834 // True if the render widget host should track the render widget's size as |
826 // opposed to visa versa. | 835 // opposed to visa versa. |
827 bool should_auto_resize_; | 836 bool should_auto_resize_; |
828 | 837 |
829 bool waiting_for_screen_rects_ack_; | 838 bool waiting_for_screen_rects_ack_; |
830 gfx::Rect last_view_screen_rect_; | 839 gfx::Rect last_view_screen_rect_; |
831 gfx::Rect last_window_screen_rect_; | 840 gfx::Rect last_window_screen_rect_; |
832 | 841 |
833 AccessibilityMode accessibility_mode_; | 842 unsigned int accessibility_mode_; |
834 | 843 |
835 // Keyboard event listeners. | 844 // Keyboard event listeners. |
836 std::vector<KeyPressEventCallback> key_press_event_callbacks_; | 845 std::vector<KeyPressEventCallback> key_press_event_callbacks_; |
837 | 846 |
838 // Mouse event callbacks. | 847 // Mouse event callbacks. |
839 std::vector<MouseEventCallback> mouse_event_callbacks_; | 848 std::vector<MouseEventCallback> mouse_event_callbacks_; |
840 | 849 |
841 // If true, then we should repaint when restoring even if we have a | 850 // If true, then we should repaint when restoring even if we have a |
842 // backingstore. This flag is set to true if we receive a paint message | 851 // backingstore. This flag is set to true if we receive a paint message |
843 // while is_hidden_ to true. Even though we tell the render widget to hide | 852 // while is_hidden_ to true. Even though we tell the render widget to hide |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 int64 last_input_number_; | 942 int64 last_input_number_; |
934 | 943 |
935 BrowserRenderingStats rendering_stats_; | 944 BrowserRenderingStats rendering_stats_; |
936 | 945 |
937 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 946 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
938 }; | 947 }; |
939 | 948 |
940 } // namespace content | 949 } // namespace content |
941 | 950 |
942 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 951 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |