| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CHROME_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CHROME_RENDERER_RENDER_WIDGET_H_ | 6 #define CHROME_RENDERER_RENDER_WIDGET_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/gfx/native_widget_types.h" | 10 #include "base/gfx/native_widget_types.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // Initializes this view with the given opener. CompleteInit must be called | 109 // Initializes this view with the given opener. CompleteInit must be called |
| 110 // later. | 110 // later. |
| 111 void Init(int32 opener_id); | 111 void Init(int32 opener_id); |
| 112 | 112 |
| 113 // Finishes creation of a pending view started with Init. | 113 // Finishes creation of a pending view started with Init. |
| 114 void CompleteInit(gfx::NativeViewId parent); | 114 void CompleteInit(gfx::NativeViewId parent); |
| 115 | 115 |
| 116 // Paints the given rectangular region of the WebWidget into canvas (a | 116 // Paints the given rectangular region of the WebWidget into canvas (a |
| 117 // shared memory segment returned by AllocPaintBuf on Windows). The caller | 117 // shared memory segment returned by AllocPaintBuf on Windows). The caller |
| 118 // must ensure that the given rect fits within the bounds of the WebWidget. | 118 // must ensure that the given rect fits within the bounds of the WebWidget. |
| 119 void PaintThisRect(const gfx::Rect& rect, skia::PlatformCanvas* canvas); |
| 119 void PaintRect(const gfx::Rect& rect, skia::PlatformCanvas* canvas); | 120 void PaintRect(const gfx::Rect& rect, skia::PlatformCanvas* canvas); |
| 121 void PaintRects(const std::vector<gfx::Rect>& rect, |
| 122 skia::PlatformCanvas* canvas); |
| 120 | 123 |
| 121 void DoDeferredPaint(); | 124 void DoDeferredPaint(); |
| 122 void DoDeferredScroll(); | 125 void DoDeferredScroll(); |
| 123 void DoDeferredClose(); | 126 void DoDeferredClose(); |
| 124 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); | 127 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); |
| 125 | 128 |
| 126 // This method is called immediately after PaintRect but before the | 129 // This method is called immediately after PaintRect but before the |
| 127 // corresponding paint or scroll message is send to the widget host. | 130 // corresponding paint or scroll message is send to the widget host. |
| 128 virtual void DidPaint() {} | 131 virtual void DidPaint() {} |
| 129 | 132 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // The size of the RenderWidget. | 221 // The size of the RenderWidget. |
| 219 gfx::Size size_; | 222 gfx::Size size_; |
| 220 | 223 |
| 221 // Transport DIBs that are currently in use to transfer an image to the | 224 // Transport DIBs that are currently in use to transfer an image to the |
| 222 // browser. | 225 // browser. |
| 223 TransportDIB* current_paint_buf_; | 226 TransportDIB* current_paint_buf_; |
| 224 TransportDIB* current_scroll_buf_; | 227 TransportDIB* current_scroll_buf_; |
| 225 | 228 |
| 226 // The smallest bounding rectangle that needs to be re-painted. This is non- | 229 // The smallest bounding rectangle that needs to be re-painted. This is non- |
| 227 // empty if a paint event is pending. | 230 // empty if a paint event is pending. |
| 228 gfx::Rect paint_rect_; | 231 std::vector<gfx::Rect> paint_rects_; |
| 229 | 232 |
| 230 // The clip rect for the pending scroll event. This is non-empty if a | 233 // The clip rect for the pending scroll event. This is non-empty if a |
| 231 // scroll event is pending. | 234 // scroll event is pending. |
| 232 gfx::Rect scroll_rect_; | 235 gfx::Rect scroll_rect_; |
| 233 | 236 |
| 234 // The area that must be reserved for drawing the resize corner. | 237 // The area that must be reserved for drawing the resize corner. |
| 235 gfx::Rect resizer_rect_; | 238 gfx::Rect resizer_rect_; |
| 236 | 239 |
| 237 // The scroll delta for a pending scroll event. | 240 // The scroll delta for a pending scroll event. |
| 238 gfx::Point scroll_delta_; | 241 gfx::Point scroll_delta_; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 297 |
| 295 // While we are waiting for the browser to update window sizes, | 298 // While we are waiting for the browser to update window sizes, |
| 296 // we track the pending size temporarily. | 299 // we track the pending size temporarily. |
| 297 int pending_window_rect_count_; | 300 int pending_window_rect_count_; |
| 298 WebKit::WebRect pending_window_rect_; | 301 WebKit::WebRect pending_window_rect_; |
| 299 | 302 |
| 300 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 303 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 301 }; | 304 }; |
| 302 | 305 |
| 303 #endif // CHROME_RENDERER_RENDER_WIDGET_H_ | 306 #endif // CHROME_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |