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

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

Issue 2650903003: Revert of [devtools] Support different encodings for Page.CaptureScreenshot. (Closed)
Patch Set: Created 3 years, 11 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 bc3bb3de2e364450b275804334b761b1bb39c4dc..1011c3510eed01517a4c9c52119e17c430649f5a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -53,6 +53,10 @@
struct ViewHostMsg_SelectionBounds_Params;
struct ViewHostMsg_UpdateRect_Params;
+namespace base {
+class RefCountedBytes;
+}
+
namespace blink {
class WebInputEvent;
class WebMouseEvent;
@@ -66,7 +70,6 @@
#endif
namespace gfx {
-class Image;
class Range;
}
@@ -206,12 +209,9 @@
void NotifyScreenInfoChanged();
// Forces redraw in the renderer and when the update reaches the browser
- // grabs snapshot from the compositor. On MacOS, the snapshot is taken from
- // the Cocoa view for end-to-end testing purposes. Returns a gfx::Image that
- // is backed by an NSImage on MacOS or by an SkBitmap otherwise. The
- // gfx::Image may be empty if the snapshot failed.
+ // grabs snapshot from the compositor. Returns PNG-encoded snapshot.
using GetSnapshotFromBrowserCallback =
- base::Callback<void(const gfx::Image&)>;
+ base::Callback<void(const unsigned char*, size_t)>;
void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback);
const NativeWebKeyboardEvent* GetLastKeyboardEvent() const;
@@ -702,7 +702,13 @@
void WindowSnapshotReachedScreen(int snapshot_id);
- void OnSnapshotReceived(int snapshot_id, const gfx::Image& image);
+ void OnSnapshotDataReceived(int snapshot_id,
+ const unsigned char* png,
+ size_t size);
+
+ void OnSnapshotDataReceivedAsync(
+ int snapshot_id,
+ scoped_refptr<base::RefCountedBytes> png_data);
// 1. Grants permissions to URL (if any)
// 2. Grants permissions to filenames
« no previous file with comments | « content/browser/devtools/protocol/page_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