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

Unified Diff: content/port/browser/render_view_host_delegate_view.h

Issue 21777003: DevTools: [Android] implement RenderWidgetHostViewAndroid::CopyFromCompositingSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix clang bots. Created 7 years, 4 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/port/browser/render_view_host_delegate_view.h
diff --git a/content/port/browser/render_view_host_delegate_view.h b/content/port/browser/render_view_host_delegate_view.h
index 5e5d9b4d11e0598832c0090e0d3a838a1fb1ec5b..eb6482f31c4a3e9b042040689a733af4d3ca7159 100644
--- a/content/port/browser/render_view_host_delegate_view.h
+++ b/content/port/browser/render_view_host_delegate_view.h
@@ -68,6 +68,16 @@ class CONTENT_EXPORT RenderViewHostDelegateView {
// retrieved by doing a Shift-Tab.
virtual void TakeFocus(bool reverse) {}
+ // Captures screenshot and compresses pixels using given |format|,
+ // |quality| and |scale|.
+ // - |format| should be one of of "jpeg", "png" and "webp"
+ // - |quality| is in range [0, 100], is format-specific
+ // - |scale| is from range (0, 1]
+ virtual bool GrabSnapshot(const std::string& format,
+ int quality,
+ double scale,
+ std::vector<uint8>* data) = 0;
+
protected:
virtual ~RenderViewHostDelegateView() {}
};

Powered by Google App Engine
This is Rietveld 408576698