| 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
|
|
|