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

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

Issue 506013: Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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) 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_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 <deque> 8 #include <deque>
9 9
10 #include "app/gfx/native_widget_types.h" 10 #include "app/gfx/native_widget_types.h"
(...skipping 20 matching lines...) Expand all
31 struct WebScreenInfo; 31 struct WebScreenInfo;
32 } 32 }
33 33
34 class BackingStore; 34 class BackingStore;
35 class PaintObserver; 35 class PaintObserver;
36 class RenderProcessHost; 36 class RenderProcessHost;
37 class RenderWidgetHostView; 37 class RenderWidgetHostView;
38 class RenderWidgetHostPaintingObserver; 38 class RenderWidgetHostPaintingObserver;
39 class TransportDIB; 39 class TransportDIB;
40 class WebCursor; 40 class WebCursor;
41 struct ViewHostMsg_PaintRect_Params;
42 struct ViewHostMsg_ScrollRect_Params;
43 struct ViewHostMsg_ShowPopup_Params; 41 struct ViewHostMsg_ShowPopup_Params;
42 struct ViewHostMsg_UpdateRect_Params;
44 43
45 // This class manages the browser side of a browser<->renderer HWND connection. 44 // This class manages the browser side of a browser<->renderer HWND connection.
46 // The HWND lives in the browser process, and windows events are sent over 45 // The HWND lives in the browser process, and windows events are sent over
47 // IPC to the corresponding object in the renderer. The renderer paints into 46 // IPC to the corresponding object in the renderer. The renderer paints into
48 // shared memory, which we transfer to a backing store and blit to the screen 47 // shared memory, which we transfer to a backing store and blit to the screen
49 // when Windows sends us a WM_PAINT message. 48 // when Windows sends us a WM_PAINT message.
50 // 49 //
51 // How Shutdown Works 50 // How Shutdown Works
52 // 51 //
53 // There are two situations in which this object, a RenderWidgetHost, can be 52 // There are two situations in which this object, a RenderWidgetHost, can be
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // Called if we know the renderer is responsive. When we currently thing the 405 // Called if we know the renderer is responsive. When we currently thing the
407 // renderer is unresponsive, this will clear that state and call 406 // renderer is unresponsive, this will clear that state and call
408 // NotifyRendererResponsive. 407 // NotifyRendererResponsive.
409 void RendererIsResponsive(); 408 void RendererIsResponsive();
410 409
411 // IPC message handlers 410 // IPC message handlers
412 void OnMsgRenderViewReady(); 411 void OnMsgRenderViewReady();
413 void OnMsgRenderViewGone(); 412 void OnMsgRenderViewGone();
414 void OnMsgClose(); 413 void OnMsgClose();
415 void OnMsgRequestMove(const gfx::Rect& pos); 414 void OnMsgRequestMove(const gfx::Rect& pos);
416 void OnMsgPaintRect(const ViewHostMsg_PaintRect_Params& params); 415 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
417 void OnMsgScrollRect(const ViewHostMsg_ScrollRect_Params& params);
418 void OnMsgInputEventAck(const IPC::Message& message); 416 void OnMsgInputEventAck(const IPC::Message& message);
419 void OnMsgFocus(); 417 void OnMsgFocus();
420 void OnMsgBlur(); 418 void OnMsgBlur();
421 virtual void OnMsgFocusedNodeChanged(); 419 virtual void OnMsgFocusedNodeChanged();
422 420
423 void OnMsgSetCursor(const WebCursor& cursor); 421 void OnMsgSetCursor(const WebCursor& cursor);
424 // Using int instead of ViewHostMsg_ImeControl for control's type to avoid 422 // Using int instead of ViewHostMsg_ImeControl for control's type to avoid
425 // having to bring in render_messages.h in a header file. 423 // having to bring in render_messages.h in a header file.
426 void OnMsgImeUpdateStatus(int control, const gfx::Rect& caret_rect); 424 void OnMsgImeUpdateStatus(int control, const gfx::Rect& caret_rect);
427 #if defined(OS_LINUX) 425 #if defined(OS_LINUX)
428 void OnMsgCreatePluginContainer(gfx::PluginWindowHandle id); 426 void OnMsgCreatePluginContainer(gfx::PluginWindowHandle id);
429 void OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id); 427 void OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id);
430 #elif defined(OS_MACOSX) 428 #elif defined(OS_MACOSX)
431 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); 429 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params);
432 void OnMsgGetScreenInfo(gfx::NativeViewId view, 430 void OnMsgGetScreenInfo(gfx::NativeViewId view,
433 WebKit::WebScreenInfo* results); 431 WebKit::WebScreenInfo* results);
434 void OnMsgGetWindowRect(gfx::NativeViewId window_id, gfx::Rect* results); 432 void OnMsgGetWindowRect(gfx::NativeViewId window_id, gfx::Rect* results);
435 void OnMsgGetRootWindowRect(gfx::NativeViewId window_id, gfx::Rect* results); 433 void OnMsgGetRootWindowRect(gfx::NativeViewId window_id, gfx::Rect* results);
436 #endif 434 #endif
437 435
438 // Paints the given bitmap to the current backing store at the given location. 436 // Paints the given bitmap to the current backing store at the given location.
439 void PaintBackingStoreRect(TransportDIB* dib, 437 void PaintBackingStoreRect(TransportDIB* dib,
440 const gfx::Rect& bitmap_rect, 438 const gfx::Rect& bitmap_rect,
441 const std::vector<gfx::Rect>& copy_rects, 439 const std::vector<gfx::Rect>& copy_rects,
442 const gfx::Size& view_size); 440 const gfx::Size& view_size);
443 441
444 // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The 442 // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The
445 // |dib| and its corresponding location |bitmap_rect| in the backing store 443 // |dib| and its corresponding location |bitmap_rect| in the backing store
446 // is the newly painted pixels by the renderer. 444 // is the newly painted pixels by the renderer.
447 void ScrollBackingStoreRect(TransportDIB* dib, 445 void ScrollBackingStoreRect(int dx, int dy, const gfx::Rect& clip_rect,
448 const gfx::Rect& bitmap_rect,
449 int dx, int dy,
450 const gfx::Rect& clip_rect,
451 const gfx::Size& view_size); 446 const gfx::Size& view_size);
452 447
453 // Called by OnMsgInputEventAck() to process a keyboard event ack message. 448 // Called by OnMsgInputEventAck() to process a keyboard event ack message.
454 void ProcessKeyboardEventAck(int type, bool processed); 449 void ProcessKeyboardEventAck(int type, bool processed);
455 450
456 // The View associated with the RenderViewHost. The lifetime of this object 451 // The View associated with the RenderViewHost. The lifetime of this object
457 // is associated with the lifetime of the Render process. If the Renderer 452 // is associated with the lifetime of the Render process. If the Renderer
458 // crashes, its View is destroyed and this pointer becomes NULL, even though 453 // crashes, its View is destroyed and this pointer becomes NULL, even though
459 // render_view_host_ lives on to load another URL (creating a new View while 454 // render_view_host_ lives on to load another URL (creating a new View while
460 // doing so). 455 // doing so).
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // but the Char event generated by alt-2 may also activate a HTML element 561 // but the Char event generated by alt-2 may also activate a HTML element
567 // if its accesskey happens to be "2", then the user may get confused when 562 // if its accesskey happens to be "2", then the user may get confused when
568 // switching back to the original tab, because the content may already be 563 // switching back to the original tab, because the content may already be
569 // changed. 564 // changed.
570 bool suppress_next_char_events_; 565 bool suppress_next_char_events_;
571 566
572 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); 567 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost);
573 }; 568 };
574 569
575 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 570 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_helper.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