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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 blink::WebTextDirection hint); | 152 blink::WebTextDirection hint); |
153 virtual void setWindowRect(const blink::WebRect&); | 153 virtual void setWindowRect(const blink::WebRect&); |
154 virtual blink::WebRect windowResizerRect(); | 154 virtual blink::WebRect windowResizerRect(); |
155 virtual blink::WebRect rootWindowRect(); | 155 virtual blink::WebRect rootWindowRect(); |
156 virtual blink::WebScreenInfo screenInfo(); | 156 virtual blink::WebScreenInfo screenInfo(); |
157 virtual float deviceScaleFactor(); | 157 virtual float deviceScaleFactor(); |
158 virtual void resetInputMethod(); | 158 virtual void resetInputMethod(); |
159 virtual void didHandleGestureEvent(const blink::WebGestureEvent& event, | 159 virtual void didHandleGestureEvent(const blink::WebGestureEvent& event, |
160 bool event_cancelled); | 160 bool event_cancelled); |
161 | 161 |
| 162 // Begins the compositor's scheduler to start producing frames. |
| 163 void StartCompositor(); |
| 164 |
162 // Called when a plugin is moved. These events are queued up and sent with | 165 // Called when a plugin is moved. These events are queued up and sent with |
163 // the next paint or scroll message to the host. | 166 // the next paint or scroll message to the host. |
164 void SchedulePluginMove(const WebPluginGeometry& move); | 167 void SchedulePluginMove(const WebPluginGeometry& move); |
165 | 168 |
166 // Called when a plugin window has been destroyed, to make sure the currently | 169 // Called when a plugin window has been destroyed, to make sure the currently |
167 // pending moves don't try to reference it. | 170 // pending moves don't try to reference it. |
168 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); | 171 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); |
169 | 172 |
170 RenderWidgetCompositor* compositor() const; | 173 RenderWidgetCompositor* compositor() const; |
171 | 174 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 friend class RenderWidgetTest; | 271 friend class RenderWidgetTest; |
269 | 272 |
270 enum ResizeAck { | 273 enum ResizeAck { |
271 SEND_RESIZE_ACK, | 274 SEND_RESIZE_ACK, |
272 NO_RESIZE_ACK, | 275 NO_RESIZE_ACK, |
273 }; | 276 }; |
274 | 277 |
275 RenderWidget(blink::WebPopupType popup_type, | 278 RenderWidget(blink::WebPopupType popup_type, |
276 const blink::WebScreenInfo& screen_info, | 279 const blink::WebScreenInfo& screen_info, |
277 bool swapped_out, | 280 bool swapped_out, |
278 bool hidden); | 281 bool hidden, |
| 282 bool never_visible); |
279 | 283 |
280 virtual ~RenderWidget(); | 284 virtual ~RenderWidget(); |
281 | 285 |
282 // Initializes this view with the given opener. CompleteInit must be called | 286 // Initializes this view with the given opener. CompleteInit must be called |
283 // later. | 287 // later. |
284 bool Init(int32 opener_id); | 288 bool Init(int32 opener_id); |
285 | 289 |
286 // Called by Init and subclasses to perform initialization. | 290 // Called by Init and subclasses to perform initialization. |
287 bool DoInit(int32 opener_id, | 291 bool DoInit(int32 opener_id, |
288 blink::WebWidget* web_widget, | 292 blink::WebWidget* web_widget, |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 // can be outstanding before we start throttling based on | 614 // can be outstanding before we start throttling based on |
611 // OnSwapBuffersComplete callback. | 615 // OnSwapBuffersComplete callback. |
612 static const int kMaxSwapBuffersPending = 2; | 616 static const int kMaxSwapBuffersPending = 2; |
613 | 617 |
614 // Set to true if we should ignore RenderWidget::Show calls. | 618 // Set to true if we should ignore RenderWidget::Show calls. |
615 bool did_show_; | 619 bool did_show_; |
616 | 620 |
617 // Indicates that we shouldn't bother generated paint events. | 621 // Indicates that we shouldn't bother generated paint events. |
618 bool is_hidden_; | 622 bool is_hidden_; |
619 | 623 |
| 624 // Indicates that we are never visible, so never produce graphical output. |
| 625 bool never_visible_; |
| 626 |
620 // Indicates that we are in fullscreen mode. | 627 // Indicates that we are in fullscreen mode. |
621 bool is_fullscreen_; | 628 bool is_fullscreen_; |
622 | 629 |
623 // Indicates that we should be repainted when restored. This flag is set to | 630 // Indicates that we should be repainted when restored. This flag is set to |
624 // true if we receive an invalidation / scroll event from webkit while our | 631 // true if we receive an invalidation / scroll event from webkit while our |
625 // is_hidden_ flag is set to true. This is used to force a repaint once we | 632 // is_hidden_ flag is set to true. This is used to force a repaint once we |
626 // restore to account for the fact that our host would not know about the | 633 // restore to account for the fact that our host would not know about the |
627 // invalidation / scroll event(s) from webkit while we are hidden. | 634 // invalidation / scroll event(s) from webkit while we are hidden. |
628 bool needs_repainting_on_restore_; | 635 bool needs_repainting_on_restore_; |
629 | 636 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 | 792 |
786 ui::MenuSourceType context_menu_source_type_; | 793 ui::MenuSourceType context_menu_source_type_; |
787 gfx::Point touch_editing_context_menu_location_; | 794 gfx::Point touch_editing_context_menu_location_; |
788 | 795 |
789 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 796 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
790 }; | 797 }; |
791 | 798 |
792 } // namespace content | 799 } // namespace content |
793 | 800 |
794 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 801 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |