| 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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 | 77 |
| 78 namespace scheduler { | 78 namespace scheduler { |
| 79 class RenderWidgetSchedulingState; | 79 class RenderWidgetSchedulingState; |
| 80 } | 80 } |
| 81 | 81 |
| 82 namespace content { | 82 namespace content { |
| 83 class CompositorDependencies; | 83 class CompositorDependencies; |
| 84 class ExternalPopupMenu; | 84 class ExternalPopupMenu; |
| 85 class FrameSwapMessageQueue; | 85 class FrameSwapMessageQueue; |
| 86 class ImeEventGuard; |
| 86 class PepperPluginInstanceImpl; | 87 class PepperPluginInstanceImpl; |
| 87 class RenderFrameImpl; | 88 class RenderFrameImpl; |
| 88 class RenderFrameProxy; | 89 class RenderFrameProxy; |
| 89 class RenderWidgetCompositor; | 90 class RenderWidgetCompositor; |
| 90 class RenderWidgetTest; | 91 class RenderWidgetTest; |
| 91 class ResizingModeSelector; | 92 class ResizingModeSelector; |
| 92 struct ContextMenuParams; | 93 struct ContextMenuParams; |
| 93 struct DidOverscrollParams; | 94 struct DidOverscrollParams; |
| 94 struct WebPluginGeometry; | 95 struct WebPluginGeometry; |
| 95 | 96 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // This mechanism is not a drop-in replacement for IPC: messages sent this way | 240 // This mechanism is not a drop-in replacement for IPC: messages sent this way |
| 240 // will not be automatically available to BrowserMessageFilter, for example. | 241 // will not be automatically available to BrowserMessageFilter, for example. |
| 241 // FIFO ordering is preserved between messages enqueued with the same | 242 // FIFO ordering is preserved between messages enqueued with the same |
| 242 // |policy|, the ordering between messages enqueued for different policies is | 243 // |policy|, the ordering between messages enqueued for different policies is |
| 243 // undefined. | 244 // undefined. |
| 244 // | 245 // |
| 245 // |msg| message to send, ownership of |msg| is transferred. | 246 // |msg| message to send, ownership of |msg| is transferred. |
| 246 // |policy| see the comment on MessageDeliveryPolicy. | 247 // |policy| see the comment on MessageDeliveryPolicy. |
| 247 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); | 248 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); |
| 248 | 249 |
| 249 // Handle common setup/teardown for handling IME events. | 250 // Handle start and finish of IME event guard. |
| 250 void StartHandlingImeEvent(); | 251 void OnImeEventGuardStart(ImeEventGuard* guard); |
| 251 void FinishHandlingImeEvent(); | 252 void OnImeEventGuardFinish(ImeEventGuard* guard); |
| 252 | 253 |
| 253 // Returns whether we currently should handle an IME event. | 254 // Returns whether we currently should handle an IME event. |
| 254 bool ShouldHandleImeEvent(); | 255 bool ShouldHandleImeEvent(); |
| 255 | 256 |
| 256 // Called by the compositor when page scale animation completed. | 257 // Called by the compositor when page scale animation completed. |
| 257 virtual void DidCompletePageScaleAnimation() {} | 258 virtual void DidCompletePageScaleAnimation() {} |
| 258 | 259 |
| 259 // When paused in debugger, we send ack for mouse event early. This ensures | 260 // When paused in debugger, we send ack for mouse event early. This ensures |
| 260 // that we continue receiving mouse moves and pass them to debugger. Returns | 261 // that we continue receiving mouse moves and pass them to debugger. Returns |
| 261 // whether we are paused in mouse move event and have sent the ack. | 262 // whether we are paused in mouse move event and have sent the ack. |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 | 657 |
| 657 // Are we currently handling an input event? | 658 // Are we currently handling an input event? |
| 658 bool handling_input_event_; | 659 bool handling_input_event_; |
| 659 | 660 |
| 660 // Used to intercept overscroll notifications while an event is being | 661 // Used to intercept overscroll notifications while an event is being |
| 661 // handled. If the event causes overscroll, the overscroll metadata can be | 662 // handled. If the event causes overscroll, the overscroll metadata can be |
| 662 // bundled in the event ack, saving an IPC. Note that we must continue | 663 // bundled in the event ack, saving an IPC. Note that we must continue |
| 663 // supporting overscroll IPC notifications due to fling animation updates. | 664 // supporting overscroll IPC notifications due to fling animation updates. |
| 664 scoped_ptr<DidOverscrollParams>* handling_event_overscroll_; | 665 scoped_ptr<DidOverscrollParams>* handling_event_overscroll_; |
| 665 | 666 |
| 666 // Are we currently handling an ime event? | 667 // It is possible that one ImeEventGuard is nested inside another |
| 667 bool handling_ime_event_; | 668 // ImeEventGuard. We keep track of the outermost one, and update it as needed. |
| 669 ImeEventGuard* ime_event_guard_; |
| 668 | 670 |
| 669 // Type of the input event we are currently handling. | 671 // Type of the input event we are currently handling. |
| 670 blink::WebInputEvent::Type handling_event_type_; | 672 blink::WebInputEvent::Type handling_event_type_; |
| 671 | 673 |
| 672 // Whether we should not send ack for the current mouse move. | 674 // Whether we should not send ack for the current mouse move. |
| 673 bool ignore_ack_for_mouse_move_from_debugger_; | 675 bool ignore_ack_for_mouse_move_from_debugger_; |
| 674 | 676 |
| 675 // True if we have requested this widget be closed. No more messages will | 677 // True if we have requested this widget be closed. No more messages will |
| 676 // be sent, except for a Close. | 678 // be sent, except for a Close. |
| 677 bool closing_; | 679 bool closing_; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 | 799 |
| 798 scoped_ptr<scheduler::RenderWidgetSchedulingState> | 800 scoped_ptr<scheduler::RenderWidgetSchedulingState> |
| 799 render_widget_scheduling_state_; | 801 render_widget_scheduling_state_; |
| 800 | 802 |
| 801 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 803 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 802 }; | 804 }; |
| 803 | 805 |
| 804 } // namespace content | 806 } // namespace content |
| 805 | 807 |
| 806 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 808 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |