Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.h

Issue 19491: POSIX: bitmap data on the wire (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <windows.h>
9
10 #include <vector> 8 #include <vector>
11 9
12 #include "base/gfx/size.h" 10 #include "base/gfx/size.h"
13 #include "base/timer.h" 11 #include "base/timer.h"
12 #include "chrome/common/bitmap_wire_data.h"
14 #include "chrome/common/ipc_channel.h" 13 #include "chrome/common/ipc_channel.h"
14 #include "chrome/common/render_messages.h"
15 #include "testing/gtest/include/gtest/gtest_prod.h" 15 #include "testing/gtest/include/gtest/gtest_prod.h"
16 16
17 namespace gfx { 17 namespace gfx {
18 class Rect; 18 class Rect;
19 } 19 }
20 20
21 class BackingStore; 21 class BackingStore;
22 class PaintObserver; 22 class PaintObserver;
23 class RenderProcessHost; 23 class RenderProcessHost;
24 class RenderWidgetHostView; 24 class RenderWidgetHostView;
25 class WebInputEvent; 25 class WebInputEvent;
26 class WebKeyboardEvent; 26 class WebKeyboardEvent;
27 class WebMouseEvent; 27 class WebMouseEvent;
28 class WebMouseWheelEvent; 28 class WebMouseWheelEvent;
29 class WebCursor; 29 class WebCursor;
30 enum ViewHostMsg_ImeControl;
31 struct ViewHostMsg_PaintRect_Params; 30 struct ViewHostMsg_PaintRect_Params;
32 struct ViewHostMsg_ScrollRect_Params; 31 struct ViewHostMsg_ScrollRect_Params;
33 struct WebPluginGeometry; 32 struct WebPluginGeometry;
34 33
35 // This class manages the browser side of a browser<->renderer HWND connection. 34 // This class manages the browser side of a browser<->renderer HWND connection.
36 // The HWND lives in the browser process, and windows events are sent over 35 // The HWND lives in the browser process, and windows events are sent over
37 // IPC to the corresponding object in the renderer. The renderer paints into 36 // IPC to the corresponding object in the renderer. The renderer paints into
38 // shared memory, which we transfer to a backing store and blit to the screen 37 // shared memory, which we transfer to a backing store and blit to the screen
39 // when Windows sends us a WM_PAINT message. 38 // when Windows sends us a WM_PAINT message.
40 // 39 //
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 void OnMsgPaintRect(const ViewHostMsg_PaintRect_Params& params); 252 void OnMsgPaintRect(const ViewHostMsg_PaintRect_Params& params);
254 void OnMsgScrollRect(const ViewHostMsg_ScrollRect_Params& params); 253 void OnMsgScrollRect(const ViewHostMsg_ScrollRect_Params& params);
255 void OnMsgInputEventAck(const IPC::Message& message); 254 void OnMsgInputEventAck(const IPC::Message& message);
256 void OnMsgFocus(); 255 void OnMsgFocus();
257 void OnMsgBlur(); 256 void OnMsgBlur();
258 void OnMsgSetCursor(const WebCursor& cursor); 257 void OnMsgSetCursor(const WebCursor& cursor);
259 void OnMsgImeUpdateStatus(ViewHostMsg_ImeControl control, 258 void OnMsgImeUpdateStatus(ViewHostMsg_ImeControl control,
260 const gfx::Rect& caret_rect); 259 const gfx::Rect& caret_rect);
261 260
262 // Paints the given bitmap to the current backing store at the given location. 261 // Paints the given bitmap to the current backing store at the given location.
263 void PaintBackingStoreRect(HANDLE bitmap, 262 void PaintBackingStoreRect(BitmapWireData bitmap,
264 const gfx::Rect& bitmap_rect, 263 const gfx::Rect& bitmap_rect,
265 const gfx::Size& view_size); 264 const gfx::Size& view_size);
266 265
267 // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The 266 // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The
268 // |bitmap| and its corresponding location |bitmap_rect| in the backing store 267 // |bitmap| and its corresponding location |bitmap_rect| in the backing store
269 // is the newly painted pixels by the renderer. 268 // is the newly painted pixels by the renderer.
270 void ScrollBackingStoreRect(HANDLE bitmap, 269 void ScrollBackingStoreRect(BitmapWireData bitmap,
271 const gfx::Rect& bitmap_rect, 270 const gfx::Rect& bitmap_rect,
272 int dx, int dy, 271 int dx, int dy,
273 const gfx::Rect& clip_rect, 272 const gfx::Rect& clip_rect,
274 const gfx::Size& view_size); 273 const gfx::Size& view_size);
275 274
276 // The View associated with the RenderViewHost. The lifetime of this object 275 // The View associated with the RenderViewHost. The lifetime of this object
277 // is associated with the lifetime of the Render process. If the Renderer 276 // is associated with the lifetime of the Render process. If the Renderer
278 // crashes, its View is destroyed and this pointer becomes NULL, even though 277 // crashes, its View is destroyed and this pointer becomes NULL, even though
279 // render_view_host_ lives on to load another URL (creating a new View while 278 // render_view_host_ lives on to load another URL (creating a new View while
280 // doing so). 279 // doing so).
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 bool view_being_painted_; 340 bool view_being_painted_;
342 341
343 // Used for UMA histogram logging to measure the time for a repaint view 342 // Used for UMA histogram logging to measure the time for a repaint view
344 // operation to finish. 343 // operation to finish.
345 base::TimeTicks repaint_start_time_; 344 base::TimeTicks repaint_start_time_;
346 345
347 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); 346 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost);
348 }; 347 };
349 348
350 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 349 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/backing_store_win.cc ('k') | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698