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

Unified Diff: chrome/browser/renderer_host/render_widget_host.cc

Issue 661237: This adds in the ability for Chrome to generate windows with snapshots of all... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_widget_host.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host.cc (revision 45523)
+++ chrome/browser/renderer_host/render_widget_host.cc (working copy)
@@ -127,6 +127,7 @@
IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone)
IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose)
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnMsgPaintAtSizeAck)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnMsgUpdateRect)
IPC_MESSAGE_HANDLER(ViewHostMsg_CreateVideo, OnMsgCreateVideo)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateVideo, OnMsgUpdateVideo)
@@ -280,6 +281,14 @@
view_->SetIsLoading(is_loading);
}
+void RenderWidgetHost::PaintAtSize(TransportDIB::Handle dib_handle,
+ const gfx::Size& size) {
+ // Ask the renderer to create a bitmap regardless of whether it's
+ // hidden, being resized, redrawn, etc., and to scale it by the
+ // scale factor given.
+ Send(new ViewMsg_PaintAtSize(routing_id_, dib_handle, size));
+}
+
BackingStore* RenderWidgetHost::GetBackingStore(bool force_create) {
// We should not be asked to paint while we are hidden. If we are hidden,
// then it means that our consumer failed to call WasRestored. If we're not
@@ -676,6 +685,13 @@
}
}
+void RenderWidgetHost::OnMsgPaintAtSizeAck(
+ const TransportDIB::Handle& dib_handle, const gfx::Size& size) {
+ if (painting_observer_) {
+ painting_observer_->WidgetDidReceivePaintAtSizeAck(this, dib_handle, size);
+ }
+}
+
void RenderWidgetHost::OnMsgUpdateRect(
const ViewHostMsg_UpdateRect_Params& params) {
TimeTicks paint_start = TimeTicks::Now();
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.h ('k') | chrome/browser/renderer_host/render_widget_host_painting_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698