| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 17 #include "base/timer/timer.h" | 18 #include "base/timer/timer.h" |
| 18 #include "cc/debug/rendering_stats_instrumentation.h" | 19 #include "cc/debug/rendering_stats_instrumentation.h" |
| 19 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 20 #include "content/common/cursors/webcursor.h" | 21 #include "content/common/cursors/webcursor.h" |
| 21 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 22 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 22 #include "content/common/input/synthetic_gesture_params.h" | 23 #include "content/common/input/synthetic_gesture_params.h" |
| 24 #include "content/renderer/message_delivery_policy.h" |
| 23 #include "ipc/ipc_listener.h" | 25 #include "ipc/ipc_listener.h" |
| 24 #include "ipc/ipc_sender.h" | 26 #include "ipc/ipc_sender.h" |
| 25 #include "third_party/WebKit/public/platform/WebRect.h" | 27 #include "third_party/WebKit/public/platform/WebRect.h" |
| 26 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 28 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 27 #include "third_party/WebKit/public/web/WebPopupType.h" | 29 #include "third_party/WebKit/public/web/WebPopupType.h" |
| 28 #include "third_party/WebKit/public/web/WebTextDirection.h" | 30 #include "third_party/WebKit/public/web/WebTextDirection.h" |
| 29 #include "third_party/WebKit/public/web/WebTextInputInfo.h" | 31 #include "third_party/WebKit/public/web/WebTextInputInfo.h" |
| 30 #include "third_party/WebKit/public/web/WebTouchAction.h" | 32 #include "third_party/WebKit/public/web/WebTouchAction.h" |
| 31 #include "third_party/WebKit/public/web/WebWidget.h" | 33 #include "third_party/WebKit/public/web/WebWidget.h" |
| 32 #include "third_party/WebKit/public/web/WebWidgetClient.h" | 34 #include "third_party/WebKit/public/web/WebWidgetClient.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 59 } | 61 } |
| 60 | 62 |
| 61 namespace cc { class OutputSurface; } | 63 namespace cc { class OutputSurface; } |
| 62 | 64 |
| 63 namespace gfx { | 65 namespace gfx { |
| 64 class Range; | 66 class Range; |
| 65 } | 67 } |
| 66 | 68 |
| 67 namespace content { | 69 namespace content { |
| 68 class ExternalPopupMenu; | 70 class ExternalPopupMenu; |
| 71 class FrameSwapMessageQueue; |
| 69 class PepperPluginInstanceImpl; | 72 class PepperPluginInstanceImpl; |
| 70 class RenderFrameImpl; | 73 class RenderFrameImpl; |
| 71 class RenderWidgetCompositor; | 74 class RenderWidgetCompositor; |
| 72 class RenderWidgetTest; | 75 class RenderWidgetTest; |
| 73 class ResizingModeSelector; | 76 class ResizingModeSelector; |
| 74 struct ContextMenuParams; | 77 struct ContextMenuParams; |
| 75 struct WebPluginGeometry; | 78 struct WebPluginGeometry; |
| 76 | 79 |
| 77 // RenderWidget provides a communication bridge between a WebWidget and | 80 // RenderWidget provides a communication bridge between a WebWidget and |
| 78 // a RenderWidgetHost, the latter of which lives in a different process. | 81 // a RenderWidgetHost, the latter of which lives in a different process. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 void QueueSyntheticGesture( | 172 void QueueSyntheticGesture( |
| 170 scoped_ptr<SyntheticGestureParams> gesture_params, | 173 scoped_ptr<SyntheticGestureParams> gesture_params, |
| 171 const SyntheticGestureCompletionCallback& callback); | 174 const SyntheticGestureCompletionCallback& callback); |
| 172 | 175 |
| 173 // Close the underlying WebWidget. | 176 // Close the underlying WebWidget. |
| 174 virtual void Close(); | 177 virtual void Close(); |
| 175 | 178 |
| 176 // Notifies about a compositor frame commit operation having finished. | 179 // Notifies about a compositor frame commit operation having finished. |
| 177 virtual void DidCommitCompositorFrame(); | 180 virtual void DidCommitCompositorFrame(); |
| 178 | 181 |
| 182 // Deliveres |message| together with compositor state change updates. The |
| 183 // exact behavior depends on |policy|. |
| 184 // |
| 185 // |msg| message to send, ownership of |msg| is transferred. |
| 186 // |policy| see the comment on MessageDeliveryPolicy. |
| 187 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); |
| 188 |
| 179 // Handle common setup/teardown for handling IME events. | 189 // Handle common setup/teardown for handling IME events. |
| 180 void StartHandlingImeEvent(); | 190 void StartHandlingImeEvent(); |
| 181 void FinishHandlingImeEvent(); | 191 void FinishHandlingImeEvent(); |
| 182 | 192 |
| 183 // Returns whether we currently should handle an IME event. | 193 // Returns whether we currently should handle an IME event. |
| 184 bool ShouldHandleImeEvent(); | 194 bool ShouldHandleImeEvent(); |
| 185 | 195 |
| 186 virtual void InstrumentWillBeginFrame(int frame_id) {} | 196 virtual void InstrumentWillBeginFrame(int frame_id) {} |
| 187 virtual void InstrumentDidBeginFrame() {} | 197 virtual void InstrumentDidBeginFrame() {} |
| 188 virtual void InstrumentDidCancelFrame() {} | 198 virtual void InstrumentDidCancelFrame() {} |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 #endif // defined(OS_MACOSX) | 690 #endif // defined(OS_MACOSX) |
| 681 | 691 |
| 682 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; | 692 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; |
| 683 | 693 |
| 684 // Popups may be displaced when screen metrics emulation is enabled. | 694 // Popups may be displaced when screen metrics emulation is enabled. |
| 685 // These values are used to properly adjust popup position. | 695 // These values are used to properly adjust popup position. |
| 686 gfx::Point popup_view_origin_for_emulation_; | 696 gfx::Point popup_view_origin_for_emulation_; |
| 687 gfx::Point popup_screen_origin_for_emulation_; | 697 gfx::Point popup_screen_origin_for_emulation_; |
| 688 float popup_origin_scale_for_emulation_; | 698 float popup_origin_scale_for_emulation_; |
| 689 | 699 |
| 700 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
| 690 scoped_ptr<ResizingModeSelector> resizing_mode_selector_; | 701 scoped_ptr<ResizingModeSelector> resizing_mode_selector_; |
| 691 | 702 |
| 692 // A list of swapped out RenderFrames that need to be notified | 703 // A list of swapped out RenderFrames that need to be notified |
| 693 // of compositing-related events (e.g. DidCommitCompositorFrame). | 704 // of compositing-related events (e.g. DidCommitCompositorFrame). |
| 694 ObserverList<RenderFrameImpl> swapped_out_frames_; | 705 ObserverList<RenderFrameImpl> swapped_out_frames_; |
| 695 | 706 |
| 696 ui::MenuSourceType context_menu_source_type_; | 707 ui::MenuSourceType context_menu_source_type_; |
| 697 gfx::Point touch_editing_context_menu_location_; | 708 gfx::Point touch_editing_context_menu_location_; |
| 698 | 709 |
| 699 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 710 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 700 }; | 711 }; |
| 701 | 712 |
| 702 } // namespace content | 713 } // namespace content |
| 703 | 714 |
| 704 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 715 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |