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

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

Issue 311313003: DevTools: Fix for Page.captureScreenshot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for mac (again) Created 6 years, 6 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 65fa860df34c83ce8756c018e0a420fcf8e352fb..a252d8db7739c2fe84b2ea90d963c78eb5c38934 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -172,6 +172,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
virtual void RemoveMouseEventCallback(
const MouseEventCallback& callback) OVERRIDE;
virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE;
+ virtual void GetSnapshotFromBrowser(
+ const base::Callback<void(const unsigned char*,size_t)> callback)
+ OVERRIDE;
virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE;
@@ -693,8 +696,18 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// which may get in recursive loops).
void DelayedAutoResized();
+ void WindowOldSnapshotReachedScreen(int snapshot_id);
+
void WindowSnapshotReachedScreen(int snapshot_id);
+ void OnSnapshotDataReceived(int snapshot_id,
+ const unsigned char* png,
+ size_t size);
+
+ void OnSnapshotDataReceivedAsync(
+ int snapshot_id,
+ scoped_refptr<base::RefCountedBytes> png_data);
+
// Send a message to the renderer process to change the accessibility mode.
void SetAccessibilityMode(AccessibilityMode AccessibilityMode);
@@ -862,6 +875,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl
int64 last_input_number_;
+ int next_browser_snapshot_id_;
+ typedef std::map<int,
+ base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap;
+ PendingSnapshotMap pending_browser_snapshots_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
};

Powered by Google App Engine
This is Rietveld 408576698