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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // IPC::Listener | 115 // IPC::Listener |
116 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 116 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
117 | 117 |
118 // IPC::Sender | 118 // IPC::Sender |
119 virtual bool Send(IPC::Message* msg) OVERRIDE; | 119 virtual bool Send(IPC::Message* msg) OVERRIDE; |
120 | 120 |
121 // blink::WebWidgetClient | 121 // blink::WebWidgetClient |
122 virtual void suppressCompositorScheduling(bool enable); | 122 virtual void suppressCompositorScheduling(bool enable); |
123 virtual void willBeginCompositorFrame(); | 123 virtual void willBeginCompositorFrame(); |
124 virtual void didInvalidateRect(const blink::WebRect&); | |
125 virtual void didScrollRect(int dx, int dy, | |
126 const blink::WebRect& clipRect); | |
127 virtual void didAutoResize(const blink::WebSize& new_size); | 124 virtual void didAutoResize(const blink::WebSize& new_size); |
128 virtual void didActivateCompositor() OVERRIDE; | 125 virtual void didActivateCompositor() OVERRIDE; |
129 virtual void didDeactivateCompositor(); | 126 virtual void didDeactivateCompositor(); |
130 virtual void initializeLayerTreeView(); | 127 virtual void initializeLayerTreeView(); |
131 virtual blink::WebLayerTreeView* layerTreeView(); | 128 virtual blink::WebLayerTreeView* layerTreeView(); |
132 virtual void didBecomeReadyForAdditionalInput(); | 129 virtual void didBecomeReadyForAdditionalInput(); |
133 virtual void didCommitAndDrawCompositorFrame(); | 130 virtual void didCommitAndDrawCompositorFrame(); |
134 virtual void didCompleteSwapBuffers(); | 131 virtual void didCompleteSwapBuffers(); |
135 virtual void scheduleComposite(); | 132 virtual void scheduleComposite(); |
136 virtual void didFocus(); | 133 virtual void didFocus(); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 292 |
296 // Finishes creation of a pending view started with Init. | 293 // Finishes creation of a pending view started with Init. |
297 void CompleteInit(); | 294 void CompleteInit(); |
298 | 295 |
299 // Sets whether this RenderWidget has been swapped out to be displayed by | 296 // Sets whether this RenderWidget has been swapped out to be displayed by |
300 // a RenderWidget in a different process. If so, no new IPC messages will be | 297 // a RenderWidget in a different process. If so, no new IPC messages will be |
301 // sent (only ACKs) and the process is free to exit when there are no other | 298 // sent (only ACKs) and the process is free to exit when there are no other |
302 // active RenderWidgets. | 299 // active RenderWidgets. |
303 void SetSwappedOut(bool is_swapped_out); | 300 void SetSwappedOut(bool is_swapped_out); |
304 | 301 |
305 void InvalidationCallback(); | |
306 void FlushPendingInputEventAck(); | 302 void FlushPendingInputEventAck(); |
307 void DoDeferredClose(); | 303 void DoDeferredClose(); |
308 void DoDeferredSetWindowRect(const blink::WebRect& pos); | 304 void DoDeferredSetWindowRect(const blink::WebRect& pos); |
309 | 305 |
310 // Set the background of the render widget to a bitmap. The bitmap will be | 306 // Set the background of the render widget to a bitmap. The bitmap will be |
311 // tiled in both directions if it isn't big enough to fill the area. This is | 307 // tiled in both directions if it isn't big enough to fill the area. This is |
312 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). | 308 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). |
313 virtual void SetBackground(const SkBitmap& bitmap); | 309 virtual void SetBackground(const SkBitmap& bitmap); |
314 | 310 |
315 // Resizes the render widget. | 311 // Resizes the render widget. |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 // The time spent in input handlers this frame. Used to throttle input acks. | 646 // The time spent in input handlers this frame. Used to throttle input acks. |
651 base::TimeDelta total_input_handling_time_this_frame_; | 647 base::TimeDelta total_input_handling_time_this_frame_; |
652 | 648 |
653 // Indicates if the next sequence of Char events should be suppressed or not. | 649 // Indicates if the next sequence of Char events should be suppressed or not. |
654 bool suppress_next_char_events_; | 650 bool suppress_next_char_events_; |
655 | 651 |
656 // Set to true if painting to the window is handled by the accelerated | 652 // Set to true if painting to the window is handled by the accelerated |
657 // compositor. | 653 // compositor. |
658 bool is_accelerated_compositing_active_; | 654 bool is_accelerated_compositing_active_; |
659 | 655 |
660 bool invalidation_task_posted_; | |
661 | |
662 // Stats for legacy software mode | |
663 scoped_ptr<cc::RenderingStatsInstrumentation> legacy_software_mode_stats_; | |
664 | |
665 // Properties of the screen hosting this RenderWidget instance. | 656 // Properties of the screen hosting this RenderWidget instance. |
666 blink::WebScreenInfo screen_info_; | 657 blink::WebScreenInfo screen_info_; |
667 | 658 |
668 // The device scale factor. This value is computed from the DPI entries in | 659 // The device scale factor. This value is computed from the DPI entries in |
669 // |screen_info_| on some platforms, and defaults to 1 on other platforms. | 660 // |screen_info_| on some platforms, and defaults to 1 on other platforms. |
670 float device_scale_factor_; | 661 float device_scale_factor_; |
671 | 662 |
672 // State associated with synthetic gestures. Synthetic gestures are processed | 663 // State associated with synthetic gestures. Synthetic gestures are processed |
673 // in-order, so a queue is sufficient to identify the correct state for a | 664 // in-order, so a queue is sufficient to identify the correct state for a |
674 // completed gesture. | 665 // completed gesture. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 709 |
719 ui::MenuSourceType context_menu_source_type_; | 710 ui::MenuSourceType context_menu_source_type_; |
720 gfx::Point touch_editing_context_menu_location_; | 711 gfx::Point touch_editing_context_menu_location_; |
721 | 712 |
722 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 713 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
723 }; | 714 }; |
724 | 715 |
725 } // namespace content | 716 } // namespace content |
726 | 717 |
727 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 718 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |