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

Unified Diff: ui/base/clipboard/clipboard_util_mac.h

Issue 1809243004: Add new NSPasteboard utility function and tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from avi. Created 4 years, 9 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
Index: ui/base/clipboard/clipboard_util_mac.h
diff --git a/ui/base/clipboard/clipboard_util_mac.h b/ui/base/clipboard/clipboard_util_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..79a2a6910be3d308c0cee49674ebed8a8cc0e37f
--- /dev/null
+++ b/ui/base/clipboard/clipboard_util_mac.h
@@ -0,0 +1,26 @@
+// Copyright 2016 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_CLIPBOARD_CLIPBOARD_UTIL_MAC_H_
+#define UI_BASE_CLIPBOARD_CLIPBOARD_UTIL_MAC_H_
+
+#import <AppKit/AppKit.h>
+
+#include "base/mac/scoped_nsobject.h"
+#include "ui/base/ui_base_export.h"
+
+namespace ui {
+
+class UI_BASE_EXPORT ClipboardUtil {
+ public:
+ // Returns an NSPasteboardItem that represents the given |url|.
+ // |url| must not be nil.
+ // If |title| is nil, |url| is used in its place.
+ static base::scoped_nsobject<NSPasteboardItem> PasteboardItemFromUrl(
+ NSString* url,
+ NSString* title);
+};
+}
+
+#endif // UI_BASE_CLIPBOARD_CLIPBOARD_UTIL_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698