Remove WebImage as a concrete type.

WebImage is a wrapper for SkBitmap, which we can just use everywhere
so create and pass around SkBitmaps directly, instead of WebImages.

WebImage only has static methods left then, which are mostly used from
outside of blink, though FromData() is used internally as well, so
it seems it should stay in public/platform/ for now.

Image gains Image::AsSkBitmapForCurrentFrame() as a means to convert
the current frame to an SkBitmap without constructing a WebImage.

[email protected], [email protected]
TBR=jam

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ieb71bde672d1acd84ec36a0e991d9ee44adba718
Reviewed-on: https://chromium-review.googlesource.com/1128365
Commit-Queue: danakj <[email protected]>
Reviewed-by: danakj <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Jay Civelli <[email protected]>
Cr-Commit-Position: refs/heads/master@{#573865}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index f6da234..f4fc87df 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -146,7 +146,6 @@
 using blink::WebDragData;
 using blink::WebFrameWidget;
 using blink::WebGestureEvent;
-using blink::WebImage;
 using blink::WebInputEvent;
 using blink::WebInputEventResult;
 using blink::WebInputMethodController;
@@ -2912,16 +2911,15 @@
 void RenderWidget::StartDragging(blink::WebReferrerPolicy policy,
                                  const WebDragData& data,
                                  WebDragOperationsMask mask,
-                                 const WebImage& image,
-                                 const WebPoint& webImageOffset) {
-  blink::WebRect offset_in_window(webImageOffset.x, webImageOffset.y, 0, 0);
+                                 const SkBitmap& drag_image,
+                                 const WebPoint& web_image_offset) {
+  blink::WebRect offset_in_window(web_image_offset.x, web_image_offset.y, 0, 0);
   ConvertViewportToWindow(&offset_in_window);
   DropData drop_data(DropDataBuilder::Build(data));
   drop_data.referrer_policy = policy;
-  gfx::Vector2d imageOffset(offset_in_window.x, offset_in_window.y);
-  Send(new DragHostMsg_StartDragging(routing_id(), drop_data, mask,
-                                     image.GetSkBitmap(), imageOffset,
-                                     possible_drag_event_info_));
+  gfx::Vector2d image_offset(offset_in_window.x, offset_in_window.y);
+  Send(new DragHostMsg_StartDragging(routing_id(), drop_data, mask, drag_image,
+                                     image_offset, possible_drag_event_info_));
 }
 
 uint32_t RenderWidget::GetContentSourceId() {