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

Side by Side Diff: ui/views/drag_utils.cc

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/drag_utils.h" 5 #include "ui/views/drag_utils.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 #include "grit/ui_resources.h" 11 #include "grit/ui_resources.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 SetDragImageOnDataObject(canvas, gfx::Size(width, height), 88 SetDragImageOnDataObject(canvas, gfx::Size(width, height),
89 gfx::Point(width / 2, kLinkDragImageVPadding), 89 gfx::Point(width / 2, kLinkDragImageVPadding),
90 data_object); 90 data_object);
91 } 91 }
92 92
93 void SetDragImageOnDataObject(const gfx::Canvas& canvas, 93 void SetDragImageOnDataObject(const gfx::Canvas& canvas,
94 const gfx::Size& size, 94 const gfx::Size& size,
95 const gfx::Point& cursor_offset, 95 const gfx::Point& cursor_offset,
96 ui::OSExchangeData* data_object) { 96 ui::OSExchangeData* data_object) {
97 SetDragImageOnDataObject( 97 SetDragImageOnDataObject(canvas.ExtractBitmap(), size, cursor_offset,
98 canvas.AsCanvasSkia()->ExtractBitmap(), size, cursor_offset, data_object); 98 data_object);
99 } 99 }
100 100
101 } // namespace drag_utils 101 } // namespace drag_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698