| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 namespace cc { class OutputSurface; } | 62 namespace cc { class OutputSurface; } |
| 63 | 63 |
| 64 namespace gfx { | 64 namespace gfx { |
| 65 class Range; | 65 class Range; |
| 66 } | 66 } |
| 67 | 67 |
| 68 namespace content { | 68 namespace content { |
| 69 class ExternalPopupMenu; | 69 class ExternalPopupMenu; |
| 70 class PepperPluginInstanceImpl; | 70 class PepperPluginInstanceImpl; |
| 71 class RenderFrameImpl; | 71 class RenderFrameImpl; |
| 72 class RenderFrameProxy; |
| 72 class RenderWidgetCompositor; | 73 class RenderWidgetCompositor; |
| 73 class RenderWidgetTest; | 74 class RenderWidgetTest; |
| 74 class ResizingModeSelector; | 75 class ResizingModeSelector; |
| 75 struct ContextMenuParams; | 76 struct ContextMenuParams; |
| 76 struct WebPluginGeometry; | 77 struct WebPluginGeometry; |
| 77 | 78 |
| 78 // RenderWidget provides a communication bridge between a WebWidget and | 79 // RenderWidget provides a communication bridge between a WebWidget and |
| 79 // a RenderWidgetHost, the latter of which lives in a different process. | 80 // a RenderWidgetHost, the latter of which lives in a different process. |
| 80 class CONTENT_EXPORT RenderWidget | 81 class CONTENT_EXPORT RenderWidget |
| 81 : public IPC::Listener, | 82 : public IPC::Listener, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 103 // Temporary for debugging purposes... | 104 // Temporary for debugging purposes... |
| 104 bool closing() const { return closing_; } | 105 bool closing() const { return closing_; } |
| 105 bool is_swapped_out() { return is_swapped_out_; } | 106 bool is_swapped_out() { return is_swapped_out_; } |
| 106 ui::MenuSourceType context_menu_source_type() { | 107 ui::MenuSourceType context_menu_source_type() { |
| 107 return context_menu_source_type_; } | 108 return context_menu_source_type_; } |
| 108 gfx::Point touch_editing_context_menu_location() { | 109 gfx::Point touch_editing_context_menu_location() { |
| 109 return touch_editing_context_menu_location_; | 110 return touch_editing_context_menu_location_; |
| 110 } | 111 } |
| 111 | 112 |
| 112 // Functions to track out-of-process frames for special notifications. | 113 // Functions to track out-of-process frames for special notifications. |
| 113 void RegisterSwappedOutChildFrame(RenderFrameImpl* frame); | 114 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); |
| 114 void UnregisterSwappedOutChildFrame(RenderFrameImpl* frame); | 115 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); |
| 115 | 116 |
| 116 // Functions to track all RenderFrame objects associated with this | 117 // Functions to track all RenderFrame objects associated with this |
| 117 // RenderWidget. | 118 // RenderWidget. |
| 118 void RegisterRenderFrame(RenderFrameImpl* frame); | 119 void RegisterRenderFrame(RenderFrameImpl* frame); |
| 119 void UnregisterRenderFrame(RenderFrameImpl* frame); | 120 void UnregisterRenderFrame(RenderFrameImpl* frame); |
| 120 | 121 |
| 121 #if defined(VIDEO_HOLE) | 122 #if defined(VIDEO_HOLE) |
| 122 void RegisterVideoHoleFrame(RenderFrameImpl* frame); | 123 void RegisterVideoHoleFrame(RenderFrameImpl* frame); |
| 123 void UnregisterVideoHoleFrame(RenderFrameImpl* frame); | 124 void UnregisterVideoHoleFrame(RenderFrameImpl* frame); |
| 124 #endif // defined(VIDEO_HOLE) | 125 #endif // defined(VIDEO_HOLE) |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; | 686 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; |
| 686 | 687 |
| 687 // Popups may be displaced when screen metrics emulation is enabled. | 688 // Popups may be displaced when screen metrics emulation is enabled. |
| 688 // These values are used to properly adjust popup position. | 689 // These values are used to properly adjust popup position. |
| 689 gfx::Point popup_view_origin_for_emulation_; | 690 gfx::Point popup_view_origin_for_emulation_; |
| 690 gfx::Point popup_screen_origin_for_emulation_; | 691 gfx::Point popup_screen_origin_for_emulation_; |
| 691 float popup_origin_scale_for_emulation_; | 692 float popup_origin_scale_for_emulation_; |
| 692 | 693 |
| 693 scoped_ptr<ResizingModeSelector> resizing_mode_selector_; | 694 scoped_ptr<ResizingModeSelector> resizing_mode_selector_; |
| 694 | 695 |
| 695 // Lists of swapped out RenderFrames that need to be notified | 696 // Lists of RenderFrameProxy objects that need to be notified of |
| 696 // of compositing-related events (e.g. DidCommitCompositorFrame). | 697 // compositing-related events (e.g. DidCommitCompositorFrame). |
| 697 ObserverList<RenderFrameImpl> swapped_out_frames_; | 698 ObserverList<RenderFrameProxy> render_frame_proxies_; |
| 698 #if defined(VIDEO_HOLE) | 699 #if defined(VIDEO_HOLE) |
| 699 ObserverList<RenderFrameImpl> video_hole_frames_; | 700 ObserverList<RenderFrameImpl> video_hole_frames_; |
| 700 #endif // defined(VIDEO_HOLE) | 701 #endif // defined(VIDEO_HOLE) |
| 701 | 702 |
| 702 // A list of RenderFrames associated with this RenderWidget. Notifications | 703 // A list of RenderFrames associated with this RenderWidget. Notifications |
| 703 // are sent to each frame in the list for events such as changing | 704 // are sent to each frame in the list for events such as changing |
| 704 // visibility state for example. | 705 // visibility state for example. |
| 705 ObserverList<RenderFrameImpl> render_frames_; | 706 ObserverList<RenderFrameImpl> render_frames_; |
| 706 | 707 |
| 707 ui::MenuSourceType context_menu_source_type_; | 708 ui::MenuSourceType context_menu_source_type_; |
| 708 gfx::Point touch_editing_context_menu_location_; | 709 gfx::Point touch_editing_context_menu_location_; |
| 709 | 710 |
| 710 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 711 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 711 }; | 712 }; |
| 712 | 713 |
| 713 } // namespace content | 714 } // namespace content |
| 714 | 715 |
| 715 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 716 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |