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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // a RenderWidget in a different process. If so, no new IPC messages will be | 300 // 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 | 301 // sent (only ACKs) and the process is free to exit when there are no other |
302 // active RenderWidgets. | 302 // active RenderWidgets. |
303 void SetSwappedOut(bool is_swapped_out); | 303 void SetSwappedOut(bool is_swapped_out); |
304 | 304 |
305 void InvalidationCallback(); | 305 void InvalidationCallback(); |
306 void FlushPendingInputEventAck(); | 306 void FlushPendingInputEventAck(); |
307 void DoDeferredClose(); | 307 void DoDeferredClose(); |
308 void DoDeferredSetWindowRect(const blink::WebRect& pos); | 308 void DoDeferredSetWindowRect(const blink::WebRect& pos); |
309 | 309 |
310 // 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 | |
312 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). | |
313 virtual void SetBackground(const SkBitmap& bitmap); | |
314 | |
315 // Resizes the render widget. | 310 // Resizes the render widget. |
316 void Resize(const gfx::Size& new_size, | 311 void Resize(const gfx::Size& new_size, |
317 const gfx::Size& physical_backing_size, | 312 const gfx::Size& physical_backing_size, |
318 float overdraw_bottom_height, | 313 float overdraw_bottom_height, |
319 const gfx::Size& visible_viewport_size, | 314 const gfx::Size& visible_viewport_size, |
320 const gfx::Rect& resizer_rect, | 315 const gfx::Rect& resizer_rect, |
321 bool is_fullscreen, | 316 bool is_fullscreen, |
322 ResizeAck resize_ack); | 317 ResizeAck resize_ack); |
323 // Used to force the size of a window when running layout tests. | 318 // Used to force the size of a window when running layout tests. |
324 void ResizeSynchronously(const gfx::Rect& new_position); | 319 void ResizeSynchronously(const gfx::Rect& new_position); |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 // Stores the current composition range. | 621 // Stores the current composition range. |
627 gfx::Range composition_range_; | 622 gfx::Range composition_range_; |
628 | 623 |
629 // The kind of popup this widget represents, NONE if not a popup. | 624 // The kind of popup this widget represents, NONE if not a popup. |
630 blink::WebPopupType popup_type_; | 625 blink::WebPopupType popup_type_; |
631 | 626 |
632 // Holds all the needed plugin window moves for a scroll. | 627 // Holds all the needed plugin window moves for a scroll. |
633 typedef std::vector<WebPluginGeometry> WebPluginGeometryVector; | 628 typedef std::vector<WebPluginGeometry> WebPluginGeometryVector; |
634 WebPluginGeometryVector plugin_window_moves_; | 629 WebPluginGeometryVector plugin_window_moves_; |
635 | 630 |
636 // A custom background for the widget. | |
637 SkBitmap background_; | |
638 | |
639 // While we are waiting for the browser to update window sizes, we track the | 631 // While we are waiting for the browser to update window sizes, we track the |
640 // pending size temporarily. | 632 // pending size temporarily. |
641 int pending_window_rect_count_; | 633 int pending_window_rect_count_; |
642 blink::WebRect pending_window_rect_; | 634 blink::WebRect pending_window_rect_; |
643 | 635 |
644 // The screen rects of the view and the window that contains it. | 636 // The screen rects of the view and the window that contains it. |
645 gfx::Rect view_screen_rect_; | 637 gfx::Rect view_screen_rect_; |
646 gfx::Rect window_screen_rect_; | 638 gfx::Rect window_screen_rect_; |
647 | 639 |
648 scoped_ptr<IPC::Message> pending_input_event_ack_; | 640 scoped_ptr<IPC::Message> pending_input_event_ack_; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 710 |
719 ui::MenuSourceType context_menu_source_type_; | 711 ui::MenuSourceType context_menu_source_type_; |
720 gfx::Point touch_editing_context_menu_location_; | 712 gfx::Point touch_editing_context_menu_location_; |
721 | 713 |
722 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 714 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
723 }; | 715 }; |
724 | 716 |
725 } // namespace content | 717 } // namespace content |
726 | 718 |
727 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 719 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |