Index: chrome/browser/ui/views/extensions/browser_action_drag_data.cc |
diff --git a/chrome/browser/ui/views/extensions/browser_action_drag_data.cc b/chrome/browser/ui/views/extensions/browser_action_drag_data.cc |
index f054f1164d7f1946f96153e1ef85c3c309da1ff1..15e0fb2b225ccebc5b5c77def6261deb86b11339 100644 |
--- a/chrome/browser/ui/views/extensions/browser_action_drag_data.cc |
+++ b/chrome/browser/ui/views/extensions/browser_action_drag_data.cc |
@@ -10,8 +10,12 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "ui/base/clipboard/clipboard.h" |
-const char* BrowserActionDragData::kClipboardFormatString = |
- "chromium/x-browser-actions"; |
+namespace { |
+ |
+// The MIME type for the clipboard format for BrowserActionDragData. |
+const char* kClipboardFormatString = "chromium/x-browser-actions"; |
dcheng
2014/07/17 19:58:02
Minor nit: const char kClipboardFormatString[]
Devlin
2014/07/17 20:43:34
Sure, done.
|
+ |
+} |
BrowserActionDragData::BrowserActionDragData() |
: profile_(NULL), index_(static_cast<size_t>(-1)) { |
@@ -22,7 +26,23 @@ BrowserActionDragData::BrowserActionDragData( |
: profile_(NULL), id_(id), index_(index) { |
} |
-bool BrowserActionDragData::IsFromProfile(Profile* profile) const { |
+bool BrowserActionDragData::GetDropFormats( |
+ int* formats, std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { |
dcheng
2014/07/17 19:58:03
Given that |formats| isn't used here at all, proba
Devlin
2014/07/17 20:43:34
Mmkay. Originally I had it just so it shadowed th
|
+ custom_formats->insert(GetBrowserActionCustomFormat()); |
+ return true; |
+} |
+ |
+bool BrowserActionDragData::AreDropTypesRequired() { |
+ return true; |
+} |
+ |
+bool BrowserActionDragData::CanDrop(const ui::OSExchangeData& data, |
+ const Profile* profile) { |
+ BrowserActionDragData drop_data; |
+ return drop_data.Read(data) && drop_data.IsFromProfile(profile); |
+} |
+ |
+bool BrowserActionDragData::IsFromProfile(const Profile* profile) const { |
return profile_ == profile; |
} |