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

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: Remove static in test by creating forwarding clipboard subclass. Created 4 years, 6 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 | « ui/base/clipboard/custom_data_helper_mac.mm ('k') | ui/base/test/test_clipboard.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..60486709d1c9b4d33b3221205d19d010131681a2 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,
+ 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;
« no previous file with comments | « ui/base/clipboard/custom_data_helper_mac.mm ('k') | ui/base/test/test_clipboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698