OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/widget/drop_target_gtk.h" | 5 #include "views/widget/drop_target_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "app/drag_drop_types.h" | 12 #include "app/drag_drop_types.h" |
13 #include "app/gtk_dnd_util.h" | 13 #include "app/gtk_dnd_util.h" |
14 #include "app/os_exchange_data_provider_gtk.h" | |
15 #include "base/file_path.h" | 14 #include "base/file_path.h" |
16 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
17 #include "gfx/point.h" | 16 #include "gfx/point.h" |
18 #include "net/base/net_util.h" | 17 #include "net/base/net_util.h" |
| 18 #include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" |
19 #include "views/widget/root_view.h" | 19 #include "views/widget/root_view.h" |
20 #include "views/widget/widget_gtk.h" | 20 #include "views/widget/widget_gtk.h" |
21 | 21 |
| 22 using ui::OSExchangeData; |
| 23 |
22 namespace { | 24 namespace { |
23 | 25 |
24 std::string GdkAtomToString(GdkAtom atom) { | 26 std::string GdkAtomToString(GdkAtom atom) { |
25 gchar* c_name = gdk_atom_name(atom); | 27 gchar* c_name = gdk_atom_name(atom); |
26 std::string name(c_name); | 28 std::string name(c_name); |
27 g_free(c_name); | 29 g_free(c_name); |
28 return name; | 30 return name; |
29 } | 31 } |
30 | 32 |
31 // Returns true if |name| is a known name of plain text. | 33 // Returns true if |name| is a known name of plain text. |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 gtk_drag_get_data(widget, context, *i, time); | 329 gtk_drag_get_data(widget, context, *i, time); |
328 } | 330 } |
329 } | 331 } |
330 } | 332 } |
331 | 333 |
332 OSExchangeDataProviderGtk& DropTargetGtk::data_provider() const { | 334 OSExchangeDataProviderGtk& DropTargetGtk::data_provider() const { |
333 return static_cast<OSExchangeDataProviderGtk&>(data_->provider()); | 335 return static_cast<OSExchangeDataProviderGtk&>(data_->provider()); |
334 } | 336 } |
335 | 337 |
336 } // namespace views | 338 } // namespace views |
OLD | NEW |