summaryrefslogtreecommitdiffstats
path: root/views/drag_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/drag_utils.cc')
-rw-r--r--views/drag_utils.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/views/drag_utils.cc b/views/drag_utils.cc
index 3b9f95b..07e9359 100644
--- a/views/drag_utils.cc
+++ b/views/drag_utils.cc
@@ -10,7 +10,6 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
-#include "gfx/canvas.h"
#include "gfx/canvas_skia.h"
#include "gfx/font.h"
#include "googleurl/src/gurl.h"
@@ -49,8 +48,7 @@ void SetURLAndDragImage(const GURL& url,
button.SetBounds(0, 0, prefsize.width(), prefsize.height());
// Render the image.
- // TODO(beng): Convert to CanvasSkia
- gfx::Canvas canvas(prefsize.width(), prefsize.height(), false);
+ gfx::CanvasSkia canvas(prefsize.width(), prefsize.height(), false);
button.Paint(&canvas, true);
SetDragImageOnDataObject(canvas, prefsize,
gfx::Point(prefsize.width() / 2, prefsize.height() / 2), data);
@@ -70,8 +68,7 @@ void CreateDragImageForFile(const FilePath::StringType& file_name,
// Add +2 here to allow room for the halo.
const int height = font.height() + icon->height() +
kLinkDragImageVPadding + 2;
- // TODO(beng): Convert to CanvasSkia
- gfx::Canvas canvas(width, height, false /* translucent */);
+ gfx::CanvasSkia canvas(width, height, false /* translucent */);
// Paint the icon.
canvas.DrawBitmapInt(*icon, (width - icon->width()) / 2, 0);
@@ -100,7 +97,7 @@ void SetDragImageOnDataObject(const gfx::Canvas& canvas,
const gfx::Point& cursor_offset,
OSExchangeData* data_object) {
SetDragImageOnDataObject(
- canvas.ExtractBitmap(), size, cursor_offset, data_object);
+ canvas.AsCanvasSkia()->ExtractBitmap(), size, cursor_offset, data_object);
}
} // namespace drag_utils