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

Unified Diff: content/browser/web_contents/web_contents_view_aura.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
« no previous file with comments | « components/bookmarks/browser/bookmark_node_data_unittest.cc ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index cff51f58318d8e337de2785b473d86d9068e52ef..f426d94a08353978cb790a8e3a4fc122509bbdac 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -60,6 +60,7 @@
#include "ui/base/dragdrop/drag_utils.h"
#include "ui/base/dragdrop/drop_target_event.h"
#include "ui/base/dragdrop/os_exchange_data.h"
+#include "ui/base/dragdrop/os_exchange_data_provider_factory.h"
#include "ui/base/hit_test.h"
#include "ui/compositor/layer.h"
#include "ui/display/screen.h"
@@ -833,10 +834,12 @@ void WebContentsViewAura::StartDragging(
ui::TouchSelectionController* selection_controller = GetSelectionController();
if (selection_controller)
selection_controller->HideAndDisallowShowingAutomatically();
- ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider();
- PrepareDragData(drop_data, provider, web_contents_);
+ std::unique_ptr<ui::OSExchangeData::Provider> provider =
+ ui::OSExchangeDataProviderFactory::CreateProvider();
+ PrepareDragData(drop_data, provider.get(), web_contents_);
- ui::OSExchangeData data(provider); // takes ownership of |provider|.
+ ui::OSExchangeData data(
+ std::move(provider)); // takes ownership of |provider|.
if (!image.isNull())
drag_utils::SetDragImageOnDataObject(image, image_offset, &data);
« no previous file with comments | « components/bookmarks/browser/bookmark_node_data_unittest.cc ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698