| 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/public/common/widget_visible_state.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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void QueueSyntheticGesture( | 174 void QueueSyntheticGesture( |
| 172 scoped_ptr<SyntheticGestureParams> gesture_params, | 175 scoped_ptr<SyntheticGestureParams> gesture_params, |
| 173 const SyntheticGestureCompletionCallback& callback); | 176 const SyntheticGestureCompletionCallback& callback); |
| 174 | 177 |
| 175 // Close the underlying WebWidget. | 178 // Close the underlying WebWidget. |
| 176 virtual void Close(); | 179 virtual void Close(); |
| 177 | 180 |
| 178 // Notifies about a compositor frame commit operation having finished. | 181 // Notifies about a compositor frame commit operation having finished. |
| 179 virtual void DidCommitCompositorFrame(); | 182 virtual void DidCommitCompositorFrame(); |
| 180 | 183 |
| 184 // FIXME: docs |
| 185 void QueueMessage(IPC::Message* msg); |
| 186 |
| 181 // Handle common setup/teardown for handling IME events. | 187 // Handle common setup/teardown for handling IME events. |
| 182 void StartHandlingImeEvent(); | 188 void StartHandlingImeEvent(); |
| 183 void FinishHandlingImeEvent(); | 189 void FinishHandlingImeEvent(); |
| 184 | 190 |
| 185 // Returns whether we currently should handle an IME event. | 191 // Returns whether we currently should handle an IME event. |
| 186 bool ShouldHandleImeEvent(); | 192 bool ShouldHandleImeEvent(); |
| 187 | 193 |
| 188 virtual void InstrumentWillBeginFrame(int frame_id) {} | 194 virtual void InstrumentWillBeginFrame(int frame_id) {} |
| 189 virtual void InstrumentDidBeginFrame() {} | 195 virtual void InstrumentDidBeginFrame() {} |
| 190 virtual void InstrumentDidCancelFrame() {} | 196 virtual void InstrumentDidCancelFrame() {} |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 #endif // defined(OS_MACOSX) | 692 #endif // defined(OS_MACOSX) |
| 687 | 693 |
| 688 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; | 694 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; |
| 689 | 695 |
| 690 // Popups may be displaced when screen metrics emulation is enabled. | 696 // Popups may be displaced when screen metrics emulation is enabled. |
| 691 // These values are used to properly adjust popup position. | 697 // These values are used to properly adjust popup position. |
| 692 gfx::Point popup_view_origin_for_emulation_; | 698 gfx::Point popup_view_origin_for_emulation_; |
| 693 gfx::Point popup_screen_origin_for_emulation_; | 699 gfx::Point popup_screen_origin_for_emulation_; |
| 694 float popup_origin_scale_for_emulation_; | 700 float popup_origin_scale_for_emulation_; |
| 695 | 701 |
| 702 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
| 696 scoped_ptr<ResizingModeSelector> resizing_mode_selector_; | 703 scoped_ptr<ResizingModeSelector> resizing_mode_selector_; |
| 697 | 704 |
| 698 // A list of swapped out RenderFrames that need to be notified | 705 // A list of swapped out RenderFrames that need to be notified |
| 699 // of compositing-related events (e.g. DidCommitCompositorFrame). | 706 // of compositing-related events (e.g. DidCommitCompositorFrame). |
| 700 ObserverList<RenderFrameImpl> swapped_out_frames_; | 707 ObserverList<RenderFrameImpl> swapped_out_frames_; |
| 701 | 708 |
| 702 ui::MenuSourceType context_menu_source_type_; | 709 ui::MenuSourceType context_menu_source_type_; |
| 703 gfx::Point touch_editing_context_menu_location_; | 710 gfx::Point touch_editing_context_menu_location_; |
| 704 | 711 |
| 705 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 712 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 706 }; | 713 }; |
| 707 | 714 |
| 708 } // namespace content | 715 } // namespace content |
| 709 | 716 |
| 710 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 717 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |