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

Unified Diff: chrome/browser/ui/cocoa/url_drop_target.mm

Issue 1855583002: Refactor more clipboard/bookmark logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp15_dnd
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
« no previous file with comments | « no previous file | components/bookmarks/browser/bookmark_pasteboard_helper_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/url_drop_target.mm
diff --git a/chrome/browser/ui/cocoa/url_drop_target.mm b/chrome/browser/ui/cocoa/url_drop_target.mm
index 55d5e2bd10b3f81b11b81624f12108e453cb8061..00b11c1c9d60a84df24213e6891ea63880c0eacd 100644
--- a/chrome/browser/ui/cocoa/url_drop_target.mm
+++ b/chrome/browser/ui/cocoa/url_drop_target.mm
@@ -6,17 +6,9 @@
#include "chrome/browser/ui/cocoa/drag_util.h"
#import "third_party/mozilla/NSPasteboard+Utils.h"
+#include "ui/base/clipboard/clipboard_util_mac.h"
#include "url/gurl.h"
-namespace {
-
-// Mac WebKit uses this type, declared in
-// WebKit/mac/History/WebURLsWithTitles.h.
-NSString* const kCrWebURLsWithTitlesPboardType =
- @"WebURLsWithTitlesPboardType";
-
-} // namespace
-
@interface URLDropTargetHandler(Private)
// Gets the appropriate drag operation given the |NSDraggingInfo|.
@@ -30,11 +22,10 @@ NSString* const kCrWebURLsWithTitlesPboardType =
@implementation URLDropTargetHandler
+ (NSArray*)handledDragTypes {
- return [NSArray arrayWithObjects:kCrWebURLsWithTitlesPboardType,
- NSURLPboardType,
- NSStringPboardType,
- NSFilenamesPboardType,
- nil];
+ return @[
+ ui::ClipboardUtil::UTIForWebURLsAndTitles(), NSURLPboardType,
+ NSStringPboardType, NSFilenamesPboardType
+ ];
}
- (id)initWithView:(NSView<URLDropTarget>*)view {
« no previous file with comments | « no previous file | components/bookmarks/browser/bookmark_pasteboard_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698