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

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

Issue 2179813003: Allow OSExchangeData::Provider to be overridden at run time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac + win Created 4 years, 5 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 60486709d1c9b4d33b3221205d19d010131681a2..a0f13fa6e39945c614d2e43762996de87b024900 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
@@ -107,8 +107,10 @@ SelectionFormatMap OSExchangeDataProviderAuraX11::GetFormatMap() const {
return selection_owner_.selection_format_map();
}
-OSExchangeData::Provider* OSExchangeDataProviderAuraX11::Clone() const {
- OSExchangeDataProviderAuraX11* ret = new OSExchangeDataProviderAuraX11();
+std::unique_ptr<OSExchangeData::Provider>
+OSExchangeDataProviderAuraX11::Clone() const {
+ std::unique_ptr<OSExchangeDataProviderAuraX11> ret(
+ new OSExchangeDataProviderAuraX11());
ret->format_map_ = format_map_;
return ret;
}
@@ -543,12 +545,4 @@ std::vector< ::Atom> OSExchangeDataProviderAuraX11::GetTargets() const {
return format_map_.GetTypes();
}
-///////////////////////////////////////////////////////////////////////////////
-// OSExchangeData, public:
-
-// static
-OSExchangeData::Provider* OSExchangeData::CreateProvider() {
- return new OSExchangeDataProviderAuraX11();
-}
-
} // namespace ui
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_aurax11.h ('k') | ui/base/dragdrop/os_exchange_data_provider_builder_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698