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

Side by Side Diff: views/drag_utils_gtk.cc

Issue 6200005: Move OSExchangeData from src/app to src/ui/base/dragdrop... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « views/drag_utils.cc ('k') | views/drag_utils_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/drag_utils.h" 5 #include "views/drag_utils.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/os_exchange_data.h"
10 #include "app/os_exchange_data_provider_gtk.h"
11 #include "base/logging.h" 9 #include "base/logging.h"
12 #include "gfx/canvas.h" 10 #include "gfx/canvas.h"
13 #include "gfx/gtk_util.h" 11 #include "gfx/gtk_util.h"
14 #include "gfx/point.h" 12 #include "gfx/point.h"
15 #include "gfx/size.h" 13 #include "gfx/size.h"
16 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
15 #include "ui/base/dragdrop/os_exchange_data.h"
16 #include "ui/base/dragdrop/os_exchange_data_provider_gtk.h"
17
18 using ui::OSExchangeData;
19 using ui::OSExchangeDataProviderGtk;
17 20
18 namespace drag_utils { 21 namespace drag_utils {
19 22
20 void SetDragImageOnDataObject(const SkBitmap& bitmap, 23 void SetDragImageOnDataObject(const SkBitmap& bitmap,
21 const gfx::Size& size, 24 const gfx::Size& size,
22 const gfx::Point& cursor_offset, 25 const gfx::Point& cursor_offset,
23 OSExchangeData* data_object) { 26 OSExchangeData* data_object) {
24 OSExchangeDataProviderGtk& provider( 27 OSExchangeDataProviderGtk& provider(
25 static_cast<OSExchangeDataProviderGtk&>(data_object->provider())); 28 static_cast<OSExchangeDataProviderGtk&>(data_object->provider()));
26 29
(...skipping 10 matching lines...) Expand all
37 gdk_pixbuf_copy_area(canvas_pixbuf, 0, 0, size.width(), size.height(), pixbuf, 40 gdk_pixbuf_copy_area(canvas_pixbuf, 0, 0, size.width(), size.height(), pixbuf,
38 0, 0); 41 0, 0);
39 g_object_unref(canvas_pixbuf); 42 g_object_unref(canvas_pixbuf);
40 43
41 // Set the drag data on to the provider. 44 // Set the drag data on to the provider.
42 provider.SetDragImage(pixbuf, cursor_offset); 45 provider.SetDragImage(pixbuf, cursor_offset);
43 g_object_unref(pixbuf); 46 g_object_unref(pixbuf);
44 } 47 }
45 48
46 } // namespace drag_utils 49 } // namespace drag_utils
OLDNEW
« no previous file with comments | « views/drag_utils.cc ('k') | views/drag_utils_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698