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

Side by Side Diff: ui/base/dragdrop/drag_utils.h

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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) 2011 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 #ifndef UI_BASE_DRAGDROP_DRAG_UTILS_H_ 5 #ifndef UI_BASE_DRAGDROP_DRAG_UTILS_H_
6 #define UI_BASE_DRAGDROP_DRAG_UTILS_H_ 6 #define UI_BASE_DRAGDROP_DRAG_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "ui/base/ui_export.h" 12 #include "ui/base/ui_export.h"
13 13
14 class GURL; 14 class GURL;
15 class SkBitmap; 15 class SkBitmap;
16 16
17 namespace gfx { 17 namespace gfx {
18 class Canvas; 18 class CanvasSkia;
Ben Goodger (Google) 2012/03/06 15:46:58 ????
19 class Point; 19 class Point;
20 class Size; 20 class Size;
21 } 21 }
22 22
23 namespace ui { 23 namespace ui {
24 class OSExchangeData; 24 class OSExchangeData;
25 } 25 }
26 using ui::OSExchangeData; 26 using ui::OSExchangeData;
27 27
28 namespace drag_utils { 28 namespace drag_utils {
29 29
30 // Creates a dragging image to be displayed when the user drags a file from 30 // Creates a dragging image to be displayed when the user drags a file from
31 // Chrome (via the download manager, for example). The drag image is set into 31 // Chrome (via the download manager, for example). The drag image is set into
32 // the supplied data_object. 'file_name' can be a full path, but the directory 32 // the supplied data_object. 'file_name' can be a full path, but the directory
33 // portion will be truncated in the drag image. 33 // portion will be truncated in the drag image.
34 UI_EXPORT void CreateDragImageForFile(const FilePath& file_name, 34 UI_EXPORT void CreateDragImageForFile(const FilePath& file_name,
35 const SkBitmap* icon, 35 const SkBitmap* icon,
36 ui::OSExchangeData* data_object); 36 ui::OSExchangeData* data_object);
37 37
38 // Sets the drag image on data_object from the supplied canvas. width/height 38 // Sets the drag image on data_object from the supplied canvas. width/height
39 // are the size of the image to use, and the offsets give the location of 39 // are the size of the image to use, and the offsets give the location of
40 // the hotspot for the drag image. 40 // the hotspot for the drag image.
41 UI_EXPORT void SetDragImageOnDataObject(const gfx::Canvas& canvas, 41 UI_EXPORT void SetDragImageOnDataObject(const gfx::CanvasSkia& canvas,
42 const gfx::Size& size, 42 const gfx::Size& size,
43 const gfx::Point& cursor_offset, 43 const gfx::Point& cursor_offset,
44 ui::OSExchangeData* data_object); 44 ui::OSExchangeData* data_object);
45 45
46 // Sets the drag image on data_object from the supplied bitmap. width/height 46 // Sets the drag image on data_object from the supplied bitmap. width/height
47 // are the size of the image to use, and the offsets give the location of 47 // are the size of the image to use, and the offsets give the location of
48 // the hotspot for the drag image. 48 // the hotspot for the drag image.
49 UI_EXPORT void SetDragImageOnDataObject(const SkBitmap& bitmap, 49 UI_EXPORT void SetDragImageOnDataObject(const SkBitmap& bitmap,
50 const gfx::Size& size, 50 const gfx::Size& size,
51 const gfx::Point& cursor_offset, 51 const gfx::Point& cursor_offset,
52 ui::OSExchangeData* data_object); 52 ui::OSExchangeData* data_object);
53 53
54 } // namespace drag_utils 54 } // namespace drag_utils
55 55
56 #endif // UI_BASE_DRAGDROP_DRAG_UTILS_H_ 56 #endif // UI_BASE_DRAGDROP_DRAG_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698