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

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

Issue 190693002: Migrate Telemetry from beginWindowSnapshotPNG to Page.captureScreenshot (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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 7080894ea63d423c31651db54342fc0e2fb3521a..0eae44042eec26004b4ee8f551d1f46e0fb026e1 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -173,6 +173,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;
@@ -507,12 +510,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// Don't check whether we expected a resize ack during layout tests.
static void DisableResizeAckCheckForTesting();
- void WindowSnapshotAsyncCallback(
- int routing_id,
- int snapshot_id,
- gfx::Size snapshot_size,
- scoped_refptr<base::RefCountedBytes> png_data);
-
// LatencyComponents generated in the renderer must have component IDs
// provided to them by the browser process. This function adds the correct
// component ID where necessary.
@@ -707,6 +704,14 @@ class CONTENT_EXPORT RenderWidgetHostImpl
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);
@@ -876,6 +881,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);
};
« no previous file with comments | « content/browser/devtools/renderer_overrides_handler.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698