| 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 60cca7c752765ef0687868539dd2900191d0d945..4e90a82e3ff7c493ee1623d921046360111b7fa8 100644 | 
| --- a/content/browser/renderer_host/render_widget_host_impl.h | 
| +++ b/content/browser/renderer_host/render_widget_host_impl.h | 
| @@ -53,10 +53,6 @@ struct FrameHostMsg_HittestData_Params; | 
| struct ViewHostMsg_SelectionBounds_Params; | 
| struct ViewHostMsg_UpdateRect_Params; | 
|  | 
| -namespace base { | 
| -class RefCountedBytes; | 
| -} | 
| - | 
| namespace blink { | 
| class WebInputEvent; | 
| class WebMouseEvent; | 
| @@ -70,6 +66,7 @@ class PowerSaveBlocker; | 
| #endif | 
|  | 
| namespace gfx { | 
| +class Image; | 
| class Range; | 
| } | 
|  | 
| @@ -208,9 +205,12 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost, | 
| void NotifyScreenInfoChanged(); | 
|  | 
| // Forces redraw in the renderer and when the update reaches the browser | 
| -  // grabs snapshot from the compositor. Returns PNG-encoded snapshot. | 
| +  // 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. | 
| using GetSnapshotFromBrowserCallback = | 
| -      base::Callback<void(const unsigned char*, size_t)>; | 
| +      base::Callback<void(const gfx::Image&)>; | 
| void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); | 
|  | 
| const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; | 
| @@ -701,13 +701,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost, | 
|  | 
| 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); | 
| +  void OnSnapshotReceived(int snapshot_id, const gfx::Image& image); | 
|  | 
| // 1. Grants permissions to URL (if any) | 
| // 2. Grants permissions to filenames | 
|  |