OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_BASE_DRAGDROP_MAC_DND_UTIL_H_ |
| 6 #define UI_BASE_DRAGDROP_MAC_DND_UTIL_H_ |
| 7 #pragma once |
| 8 |
| 9 #import <Cocoa/Cocoa.h> |
| 10 |
| 11 #include <vector> |
| 12 |
| 13 #include "base/string16.h" |
| 14 #include "ui/base/ui_export.h" |
| 15 |
| 16 class GURL; |
| 17 |
| 18 namespace ui { |
| 19 |
| 20 // Populates the |url| and |title| with URL data in |pboard|. There may be more |
| 21 // than one, but we only handle dropping the first. |url| must not be |NULL|; |
| 22 // |title| is an optional parameter. Returns |YES| if URL data was obtained from |
| 23 // the pasteboard, |NO| otherwise. If |convert_filenames| is |YES|, the function |
| 24 // will also attempt to convert filenames in |pboard| to file URLs. |
| 25 UI_EXPORT BOOL PopulateURLAndTitleFromPasteboard(GURL* url, |
| 26 string16* title, |
| 27 NSPasteboard* pboard, |
| 28 BOOL convert_filenames); |
| 29 |
| 30 } // namespace ui |
| 31 |
| 32 #endif // UI_BASE_DRAGDROP_MAC_DND_UTIL_H_ |
OLD | NEW |