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

Unified Diff: ui/base/dragdrop/cocoa_dnd_util.h

Issue 8418033: Push one function from the Mac drag/drop util code to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/url_drop_target.mm ('k') | ui/base/dragdrop/cocoa_dnd_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/cocoa_dnd_util.h
diff --git a/ui/base/dragdrop/cocoa_dnd_util.h b/ui/base/dragdrop/cocoa_dnd_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..9277856af18a808e111146dcf9349aa66939291e
--- /dev/null
+++ b/ui/base/dragdrop/cocoa_dnd_util.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_DRAGDROP_MAC_DND_UTIL_H_
+#define UI_BASE_DRAGDROP_MAC_DND_UTIL_H_
+#pragma once
+
+#import <Cocoa/Cocoa.h>
+
+#include <vector>
+
+#include "base/string16.h"
+#include "ui/base/ui_export.h"
+
+class GURL;
+
+namespace ui {
+
+// Populates the |url| and |title| with URL data in |pboard|. There may be more
+// than one, but we only handle dropping the first. |url| must not be |NULL|;
+// |title| is an optional parameter. Returns |YES| if URL data was obtained from
+// the pasteboard, |NO| otherwise. If |convert_filenames| is |YES|, the function
+// will also attempt to convert filenames in |pboard| to file URLs.
+UI_EXPORT BOOL PopulateURLAndTitleFromPasteboard(GURL* url,
+ string16* title,
+ NSPasteboard* pboard,
+ BOOL convert_filenames);
+
+} // namespace ui
+
+#endif // UI_BASE_DRAGDROP_MAC_DND_UTIL_H_
« no previous file with comments | « chrome/browser/ui/cocoa/url_drop_target.mm ('k') | ui/base/dragdrop/cocoa_dnd_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698