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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2732923002: Add fromSurface optional parameter to devtools Page.CaptureScreenshot (Closed)
Patch Set: Remove switches include Created 3 years, 9 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: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 11dddf13c0f1ebfe7a95f53baaa4490f5c19f65c..993a11a258335d71586bfbdafb7e9d0f45e995dd 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -49,6 +49,7 @@
#include "ui/events/latency_info.h"
#include "ui/gfx/native_widget_types.h"
+class SkBitmap;
struct FrameHostMsg_HittestData_Params;
struct ViewHostMsg_SelectionBounds_Params;
struct ViewHostMsg_UpdateRect_Params;
@@ -209,6 +210,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
base::Callback<void(const gfx::Image&)>;
void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback);
+ using GetSurfaceSnapshotFromBrowserCallback =
+ base::Callback<void(const SkBitmap&)>;
+ void GetSurfaceSnapshotFromBrowser(
dgozman 2017/03/08 19:21:36 Can we unify this with the other method by always
dvallet 2017/03/09 06:19:47 Done.
+ const GetSurfaceSnapshotFromBrowserCallback& callback);
+
const NativeWebKeyboardEvent* GetLastKeyboardEvent() const;
// Sets the View of this RenderWidgetHost.
@@ -695,6 +701,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
void WindowSnapshotReachedScreen(int snapshot_id);
+ void OnSnapshotFromSurfaceReceived(int snapshot_id,
+ int retry_count,
+ const SkBitmap& bitmap,
+ ReadbackResponse response);
+
void OnSnapshotReceived(int snapshot_id, const gfx::Image& image);
// 1. Grants permissions to URL (if any)
@@ -859,6 +870,10 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
using PendingSnapshotMap = std::map<int, GetSnapshotFromBrowserCallback>;
PendingSnapshotMap pending_browser_snapshots_;
+ using PendingSnapshotFromSurfaceMap =
+ std::map<int, GetSurfaceSnapshotFromBrowserCallback>;
+ PendingSnapshotFromSurfaceMap pending_surface_browser_snapshots_;
+
// Indicates whether a RenderFramehost has ownership, in which case this
// object does not self destroy.
bool owned_by_render_frame_host_;

Powered by Google App Engine
This is Rietveld 408576698