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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 namespace content { | 78 namespace content { |
79 class BackingStore; | 79 class BackingStore; |
80 class InputRouter; | 80 class InputRouter; |
81 class MockRenderWidgetHost; | 81 class MockRenderWidgetHost; |
82 class OverscrollController; | 82 class OverscrollController; |
83 class RenderWidgetHostDelegate; | 83 class RenderWidgetHostDelegate; |
84 class RenderWidgetHostViewPort; | 84 class RenderWidgetHostViewPort; |
85 class SyntheticGestureController; | 85 class SyntheticGestureController; |
86 struct EditCommand; | 86 struct EditCommand; |
| 87 struct SyntheticDelayConfiguration; |
87 | 88 |
88 // This implements the RenderWidgetHost interface that is exposed to | 89 // This implements the RenderWidgetHost interface that is exposed to |
89 // embedders of content, and adds things only visible to content. | 90 // embedders of content, and adds things only visible to content. |
90 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, | 91 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, |
91 public InputRouterClient, | 92 public InputRouterClient, |
92 public InputAckHandler, | 93 public InputAckHandler, |
93 public IPC::Listener { | 94 public IPC::Listener { |
94 public: | 95 public: |
95 // routing_id can be MSG_ROUTING_NONE, in which case the next available | 96 // routing_id can be MSG_ROUTING_NONE, in which case the next available |
96 // routing id is taken from the RenderProcessHost. | 97 // routing id is taken from the RenderProcessHost. |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 #if defined(OS_MACOSX) | 653 #if defined(OS_MACOSX) |
653 void OnCompositorSurfaceBuffersSwapped( | 654 void OnCompositorSurfaceBuffersSwapped( |
654 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); | 655 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); |
655 #endif | 656 #endif |
656 bool OnSwapCompositorFrame(const IPC::Message& message); | 657 bool OnSwapCompositorFrame(const IPC::Message& message); |
657 void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, | 658 void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, |
658 gfx::Vector2dF current_fling_velocity); | 659 gfx::Vector2dF current_fling_velocity); |
659 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 660 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
660 void OnUpdateIsDelayed(); | 661 void OnUpdateIsDelayed(); |
661 void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet); | 662 void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet); |
| 663 void OnConfigureSyntheticDelays( |
| 664 const std::vector<content::SyntheticDelayConfiguration>& delays); |
662 virtual void OnFocus(); | 665 virtual void OnFocus(); |
663 virtual void OnBlur(); | 666 virtual void OnBlur(); |
664 void OnSetCursor(const WebCursor& cursor); | 667 void OnSetCursor(const WebCursor& cursor); |
665 void OnTextInputTypeChanged(ui::TextInputType type, | 668 void OnTextInputTypeChanged(ui::TextInputType type, |
666 ui::TextInputMode input_mode, | 669 ui::TextInputMode input_mode, |
667 bool can_compose_inline); | 670 bool can_compose_inline); |
668 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) | 671 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) |
669 void OnImeCompositionRangeChanged( | 672 void OnImeCompositionRangeChanged( |
670 const gfx::Range& range, | 673 const gfx::Range& range, |
671 const std::vector<gfx::Rect>& character_bounds); | 674 const std::vector<gfx::Rect>& character_bounds); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, | 738 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, |
736 InputEventAckState ack_result) OVERRIDE; | 739 InputEventAckState ack_result) OVERRIDE; |
737 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; | 740 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; |
738 | 741 |
739 // Called when there is a new auto resize (using a post to avoid a stack | 742 // Called when there is a new auto resize (using a post to avoid a stack |
740 // which may get in recursive loops). | 743 // which may get in recursive loops). |
741 void DelayedAutoResized(); | 744 void DelayedAutoResized(); |
742 | 745 |
743 void WindowSnapshotReachedScreen(int snapshot_id); | 746 void WindowSnapshotReachedScreen(int snapshot_id); |
744 | 747 |
| 748 void DidConfigureSyntheticDelays(); |
| 749 |
745 // Our delegate, which wants to know mainly about keyboard events. | 750 // Our delegate, which wants to know mainly about keyboard events. |
746 // It will remain non-NULL until DetachDelegate() is called. | 751 // It will remain non-NULL until DetachDelegate() is called. |
747 RenderWidgetHostDelegate* delegate_; | 752 RenderWidgetHostDelegate* delegate_; |
748 | 753 |
749 // Created during construction but initialized during Init*(). Therefore, it | 754 // Created during construction but initialized during Init*(). Therefore, it |
750 // is guaranteed never to be NULL, but its channel may be NULL if the | 755 // is guaranteed never to be NULL, but its channel may be NULL if the |
751 // renderer crashed, so you must always check that. | 756 // renderer crashed, so you must always check that. |
752 RenderProcessHost* process_; | 757 RenderProcessHost* process_; |
753 | 758 |
754 // The ID of the corresponding object in the Renderer Instance. | 759 // The ID of the corresponding object in the Renderer Instance. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 int64 last_input_number_; | 920 int64 last_input_number_; |
916 | 921 |
917 BrowserRenderingStats rendering_stats_; | 922 BrowserRenderingStats rendering_stats_; |
918 | 923 |
919 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 924 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
920 }; | 925 }; |
921 | 926 |
922 } // namespace content | 927 } // namespace content |
923 | 928 |
924 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 929 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |