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

Unified Diff: ui/base/dragdrop/os_exchange_data_provider_aurax11.cc

Issue 2011833003: Implement ui::ClipboardMus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch cleanup. Created 4 years, 7 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/dragdrop/os_exchange_data_provider_aurax11.cc
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc b/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
index e2bba47010817ff4a1abbbbb0ad93fa87c0fbe82..8fa56b89711f70d658e683dd32bcdf4f45ab3059 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
@@ -31,18 +31,16 @@ const char kRendererTaint[] = "chromium/x-renderer-taint";
const char kNetscapeURL[] = "_NETSCAPE_URL";
-const char* kAtomsToCache[] = {
- kString,
- kText,
- kUtf8String,
- kDndSelection,
- Clipboard::kMimeTypeURIList,
- kMimeTypeMozillaURL,
- kNetscapeURL,
- Clipboard::kMimeTypeText,
- kRendererTaint,
- NULL
-};
+const char* kAtomsToCache[] = {kString,
+ kText,
+ kUtf8String,
+ kDndSelection,
+ Clipboard::kMimeTypeURIList,
+ Clipboard::kMimeTypeMozillaURL,
+ kNetscapeURL,
+ Clipboard::kMimeTypeText,
+ kRendererTaint,
+ NULL};
sky 2016/05/26 23:10:27 nullptr
} // namespace
@@ -156,7 +154,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url,
scoped_refptr<base::RefCountedMemory> mem(
base::RefCountedBytes::TakeVector(&data));
- format_map_.Insert(atom_cache_.GetAtom(kMimeTypeMozillaURL), mem);
+ format_map_.Insert(atom_cache_.GetAtom(Clipboard::kMimeTypeMozillaURL),
+ mem);
// Set a string fallback as well.
SetString(spec);
@@ -255,7 +254,7 @@ bool OSExchangeDataProviderAuraX11::GetURLAndTitle(
// but that doesn't match the assumptions of the rest of the system which
// expect single types.
- if (data.GetType() == atom_cache_.GetAtom(kMimeTypeMozillaURL)) {
+ if (data.GetType() == atom_cache_.GetAtom(Clipboard::kMimeTypeMozillaURL)) {
// Mozilla URLs are (UTF16: URL, newline, title).
base::string16 unparsed;
data.AssignTo(&unparsed);
@@ -362,7 +361,7 @@ bool OSExchangeDataProviderAuraX11::HasURL(
// Windows does and stuffs all the data into one mime type.
ui::SelectionData data(format_map_.GetFirstOf(requested_types));
if (data.IsValid()) {
- if (data.GetType() == atom_cache_.GetAtom(kMimeTypeMozillaURL)) {
+ if (data.GetType() == atom_cache_.GetAtom(Clipboard::kMimeTypeMozillaURL)) {
// File managers shouldn't be using this type, so this is a URL.
return true;
} else if (data.GetType() == atom_cache_.GetAtom(
@@ -423,7 +422,7 @@ void OSExchangeDataProviderAuraX11::SetFileContents(
const std::string& file_contents) {
DCHECK(!filename.empty());
DCHECK(format_map_.end() ==
- format_map_.find(atom_cache_.GetAtom(kMimeTypeMozillaURL)));
+ format_map_.find(atom_cache_.GetAtom(Clipboard::kMimeTypeMozillaURL)));
file_contents_name_ = filename;

Powered by Google App Engine
This is Rietveld 408576698