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 "app/gtk_dnd_util.h" | 5 #include "app/gtk_dnd_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/pickle.h" | 8 #include "base/pickle.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" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 for (size_t i = 0; uris[i] != NULL; ++i) { | 219 for (size_t i = 0; uris[i] != NULL; ++i) { |
220 GURL url(uris[i]); | 220 GURL url(uris[i]); |
221 if (url.is_valid()) | 221 if (url.is_valid()) |
222 urls->push_back(url); | 222 urls->push_back(url); |
223 } | 223 } |
224 | 224 |
225 g_strfreev(uris); | 225 g_strfreev(uris); |
226 return true; | 226 return true; |
227 } | 227 } |
228 | 228 |
| 229 GdkDragAction WebDragOpToGdkDragAction(WebKit::WebDragOperationsMask op) { |
| 230 GdkDragAction action = static_cast<GdkDragAction>(0); |
| 231 if (op & WebKit::WebDragOperationCopy) |
| 232 action = static_cast<GdkDragAction>(action | GDK_ACTION_COPY); |
| 233 if (op & WebKit::WebDragOperationLink) |
| 234 action = static_cast<GdkDragAction>(action | GDK_ACTION_LINK); |
| 235 if (op & WebKit::WebDragOperationMove) |
| 236 action = static_cast<GdkDragAction>(action | GDK_ACTION_MOVE); |
| 237 return action; |
| 238 } |
| 239 |
229 } // namespace gtk_dnd_util | 240 } // namespace gtk_dnd_util |
OLD | NEW |