OLD | NEW |
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_GTK_DND_UTIL_H_ | 5 #ifndef UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ |
6 #define UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ | 6 #define UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 UI_EXPORT void SetSourceTargetListFromCodeMask(GtkWidget* source, | 61 UI_EXPORT void SetSourceTargetListFromCodeMask(GtkWidget* source, |
62 int code_mask); | 62 int code_mask); |
63 | 63 |
64 // Set the accepted targets list for |dest|. The |target_codes| array should | 64 // Set the accepted targets list for |dest|. The |target_codes| array should |
65 // be sorted in preference order and should be terminated with -1. | 65 // be sorted in preference order and should be terminated with -1. |
66 UI_EXPORT void SetDestTargetList(GtkWidget* dest, const int* target_codes); | 66 UI_EXPORT void SetDestTargetList(GtkWidget* dest, const int* target_codes); |
67 | 67 |
68 // Write a URL to the selection in the given type. | 68 // Write a URL to the selection in the given type. |
69 UI_EXPORT void WriteURLWithName(GtkSelectionData* selection_data, | 69 UI_EXPORT void WriteURLWithName(GtkSelectionData* selection_data, |
70 const GURL& url, | 70 const GURL& url, |
71 string16 title, | 71 base::string16 title, |
72 int type); | 72 int type); |
73 | 73 |
74 // Extracts data of type CHROME_NAMED_URL from |selection_data| into | 74 // Extracts data of type CHROME_NAMED_URL from |selection_data| into |
75 // |url| and |title|. Returns true if the url/title were safely extracted | 75 // |url| and |title|. Returns true if the url/title were safely extracted |
76 // and the url is valid. | 76 // and the url is valid. |
77 UI_EXPORT bool ExtractNamedURL(GtkSelectionData* selection_data, | 77 UI_EXPORT bool ExtractNamedURL(GtkSelectionData* selection_data, |
78 GURL* url, | 78 GURL* url, |
79 string16* title); | 79 base::string16* title); |
80 | 80 |
81 // Extracts data of type TEXT_URI_LIST from |selection_data| into |urls|. | 81 // Extracts data of type TEXT_URI_LIST from |selection_data| into |urls|. |
82 UI_EXPORT bool ExtractURIList(GtkSelectionData* selection_data, | 82 UI_EXPORT bool ExtractURIList(GtkSelectionData* selection_data, |
83 std::vector<GURL>* urls); | 83 std::vector<GURL>* urls); |
84 | 84 |
85 // Extracts a Netscape URL (url\ntitle) from |selection_data|. | 85 // Extracts a Netscape URL (url\ntitle) from |selection_data|. |
86 UI_EXPORT bool ExtractNetscapeURL(GtkSelectionData* selection_data, | 86 UI_EXPORT bool ExtractNetscapeURL(GtkSelectionData* selection_data, |
87 GURL* url, | 87 GURL* url, |
88 string16* title); | 88 base::string16* title); |
89 | 89 |
90 } // namespace ui | 90 } // namespace ui |
91 | 91 |
92 #endif // UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ | 92 #endif // UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ |
OLD | NEW |