| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
| 11 #include "base/timer.h" | 11 #include "base/timer.h" |
| 12 #include "chrome/common/bitmap_wire_data.h" | |
| 13 #include "chrome/common/ipc_channel.h" | 12 #include "chrome/common/ipc_channel.h" |
| 14 #include "testing/gtest/include/gtest/gtest_prod.h" | 13 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 15 | 14 |
| 16 namespace gfx { | 15 namespace gfx { |
| 17 class Rect; | 16 class Rect; |
| 18 } | 17 } |
| 19 | 18 |
| 20 class BackingStore; | 19 class BackingStore; |
| 21 class PaintObserver; | 20 class PaintObserver; |
| 22 class RenderProcessHost; | 21 class RenderProcessHost; |
| 23 class RenderWidgetHostView; | 22 class RenderWidgetHostView; |
| 23 class TransportDIB; |
| 24 class WebInputEvent; | 24 class WebInputEvent; |
| 25 class WebKeyboardEvent; | 25 class WebKeyboardEvent; |
| 26 class WebMouseEvent; | 26 class WebMouseEvent; |
| 27 class WebMouseWheelEvent; | 27 class WebMouseWheelEvent; |
| 28 class WebCursor; | 28 class WebCursor; |
| 29 struct ViewHostMsg_PaintRect_Params; | 29 struct ViewHostMsg_PaintRect_Params; |
| 30 struct ViewHostMsg_ScrollRect_Params; | 30 struct ViewHostMsg_ScrollRect_Params; |
| 31 | 31 |
| 32 // This class manages the browser side of a browser<->renderer HWND connection. | 32 // This class manages the browser side of a browser<->renderer HWND connection. |
| 33 // The HWND lives in the browser process, and windows events are sent over | 33 // The HWND lives in the browser process, and windows events are sent over |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 void OnMsgScrollRect(const ViewHostMsg_ScrollRect_Params& params); | 255 void OnMsgScrollRect(const ViewHostMsg_ScrollRect_Params& params); |
| 256 void OnMsgInputEventAck(const IPC::Message& message); | 256 void OnMsgInputEventAck(const IPC::Message& message); |
| 257 void OnMsgFocus(); | 257 void OnMsgFocus(); |
| 258 void OnMsgBlur(); | 258 void OnMsgBlur(); |
| 259 void OnMsgSetCursor(const WebCursor& cursor); | 259 void OnMsgSetCursor(const WebCursor& cursor); |
| 260 // Using int instead of ViewHostMsg_ImeControl for control's type to avoid | 260 // Using int instead of ViewHostMsg_ImeControl for control's type to avoid |
| 261 // having to bring in render_messages.h in a header file. | 261 // having to bring in render_messages.h in a header file. |
| 262 void OnMsgImeUpdateStatus(int control, const gfx::Rect& caret_rect); | 262 void OnMsgImeUpdateStatus(int control, const gfx::Rect& caret_rect); |
| 263 | 263 |
| 264 // Paints the given bitmap to the current backing store at the given location. | 264 // Paints the given bitmap to the current backing store at the given location. |
| 265 void PaintBackingStoreRect(BitmapWireData bitmap, | 265 void PaintBackingStoreRect(TransportDIB* dib, |
| 266 const gfx::Rect& bitmap_rect, | 266 const gfx::Rect& bitmap_rect, |
| 267 const gfx::Size& view_size); | 267 const gfx::Size& view_size); |
| 268 | 268 |
| 269 // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The | 269 // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The |
| 270 // |bitmap| and its corresponding location |bitmap_rect| in the backing store | 270 // |dib| and its corresponding location |bitmap_rect| in the backing store |
| 271 // is the newly painted pixels by the renderer. | 271 // is the newly painted pixels by the renderer. |
| 272 void ScrollBackingStoreRect(BitmapWireData bitmap, | 272 void ScrollBackingStoreRect(TransportDIB* dib, |
| 273 const gfx::Rect& bitmap_rect, | 273 const gfx::Rect& bitmap_rect, |
| 274 int dx, int dy, | 274 int dx, int dy, |
| 275 const gfx::Rect& clip_rect, | 275 const gfx::Rect& clip_rect, |
| 276 const gfx::Size& view_size); | 276 const gfx::Size& view_size); |
| 277 | 277 |
| 278 // The View associated with the RenderViewHost. The lifetime of this object | 278 // The View associated with the RenderViewHost. The lifetime of this object |
| 279 // is associated with the lifetime of the Render process. If the Renderer | 279 // is associated with the lifetime of the Render process. If the Renderer |
| 280 // crashes, its View is destroyed and this pointer becomes NULL, even though | 280 // crashes, its View is destroyed and this pointer becomes NULL, even though |
| 281 // render_view_host_ lives on to load another URL (creating a new View while | 281 // render_view_host_ lives on to load another URL (creating a new View while |
| 282 // doing so). | 282 // doing so). |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 bool view_being_painted_; | 343 bool view_being_painted_; |
| 344 | 344 |
| 345 // Used for UMA histogram logging to measure the time for a repaint view | 345 // Used for UMA histogram logging to measure the time for a repaint view |
| 346 // operation to finish. | 346 // operation to finish. |
| 347 base::TimeTicks repaint_start_time_; | 347 base::TimeTicks repaint_start_time_; |
| 348 | 348 |
| 349 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 349 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
| 350 }; | 350 }; |
| 351 | 351 |
| 352 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 352 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |