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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); | 262 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); |
263 virtual void Composite(); | 263 virtual void Composite(); |
264 | 264 |
265 // Set the background of the render widget to a bitmap. The bitmap will be | 265 // Set the background of the render widget to a bitmap. The bitmap will be |
266 // tiled in both directions if it isn't big enough to fill the area. This is | 266 // tiled in both directions if it isn't big enough to fill the area. This is |
267 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). | 267 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). |
268 virtual void SetBackground(const SkBitmap& bitmap); | 268 virtual void SetBackground(const SkBitmap& bitmap); |
269 | 269 |
270 // Resizes the render widget. | 270 // Resizes the render widget. |
271 void Resize(const gfx::Size& new_size, | 271 void Resize(const gfx::Size& new_size, |
| 272 const gfx::Size& physical_backing_size, |
272 const gfx::Rect& resizer_rect, | 273 const gfx::Rect& resizer_rect, |
273 bool is_fullscreen, | 274 bool is_fullscreen, |
274 ResizeAck resize_ack); | 275 ResizeAck resize_ack); |
275 | 276 |
276 // RenderWidget IPC message handlers | 277 // RenderWidget IPC message handlers |
277 void OnClose(); | 278 void OnClose(); |
278 void OnCreatingNewAck(); | 279 void OnCreatingNewAck(); |
279 virtual void OnResize(const gfx::Size& new_size, | 280 virtual void OnResize(const gfx::Size& new_size, |
| 281 const gfx::Size& physical_backing_size, |
280 const gfx::Rect& resizer_rect, | 282 const gfx::Rect& resizer_rect, |
281 bool is_fullscreen); | 283 bool is_fullscreen); |
282 void OnChangeResizeRect(const gfx::Rect& resizer_rect); | 284 void OnChangeResizeRect(const gfx::Rect& resizer_rect); |
283 virtual void OnWasHidden(); | 285 virtual void OnWasHidden(); |
284 virtual void OnWasShown(bool needs_repainting); | 286 virtual void OnWasShown(bool needs_repainting); |
285 virtual void OnWasSwappedOut(); | 287 virtual void OnWasSwappedOut(); |
286 void OnUpdateRectAck(); | 288 void OnUpdateRectAck(); |
287 void OnCreateVideoAck(int32 video_id); | 289 void OnCreateVideoAck(int32 video_id); |
288 void OnUpdateVideoAck(int32 video_id); | 290 void OnUpdateVideoAck(int32 video_id); |
289 void OnRequestMoveAck(); | 291 void OnRequestMoveAck(); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 WebCursor current_cursor_; | 496 WebCursor current_cursor_; |
495 | 497 |
496 // The size of the RenderWidget. | 498 // The size of the RenderWidget. |
497 gfx::Size size_; | 499 gfx::Size size_; |
498 | 500 |
499 // The TransportDIB that is being used to transfer an image to the browser. | 501 // The TransportDIB that is being used to transfer an image to the browser. |
500 TransportDIB* current_paint_buf_; | 502 TransportDIB* current_paint_buf_; |
501 | 503 |
502 PaintAggregator paint_aggregator_; | 504 PaintAggregator paint_aggregator_; |
503 | 505 |
| 506 // The size of the view's backing surface in non-DPI-adjusted pixels. |
| 507 gfx::Size physical_backing_size_; |
| 508 |
504 // The area that must be reserved for drawing the resize corner. | 509 // The area that must be reserved for drawing the resize corner. |
505 gfx::Rect resizer_rect_; | 510 gfx::Rect resizer_rect_; |
506 | 511 |
507 // Flags for the next ViewHostMsg_UpdateRect message. | 512 // Flags for the next ViewHostMsg_UpdateRect message. |
508 int next_paint_flags_; | 513 int next_paint_flags_; |
509 | 514 |
510 // Filtered time per frame based on UpdateRect messages. | 515 // Filtered time per frame based on UpdateRect messages. |
511 float filtered_time_per_frame_; | 516 float filtered_time_per_frame_; |
512 | 517 |
513 // True if we are expecting an UpdateRect_ACK message (i.e., that a | 518 // True if we are expecting an UpdateRect_ACK message (i.e., that a |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 | 661 |
657 // Specified whether the compositor will run in its own thread. | 662 // Specified whether the compositor will run in its own thread. |
658 bool is_threaded_compositing_enabled_; | 663 bool is_threaded_compositing_enabled_; |
659 | 664 |
660 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 665 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
661 }; | 666 }; |
662 | 667 |
663 } // namespace content | 668 } // namespace content |
664 | 669 |
665 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 670 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |