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

Unified Diff: ui/aura/env.cc

Issue 2739213003: aura-mus: wire up drag and drop. (Closed)
Patch Set: sky comments Created 3 years, 9 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/aura/env.h ('k') | ui/aura/mus/drag_drop_controller_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/env.cc
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index e9ec9d79859d331f3f96cd9d9e51474c026fe812..cf3c2ac3d56364217afcd57e77482beaea21862d 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -13,6 +13,7 @@
#include "ui/aura/env_observer.h"
#include "ui/aura/input_state_lookup.h"
#include "ui/aura/mus/mus_types.h"
+#include "ui/aura/mus/os_exchange_data_provider_mus.h"
#include "ui/aura/mus/window_port_mus.h"
#include "ui/aura/mus/window_tree_client.h"
#include "ui/aura/window.h"
@@ -75,6 +76,9 @@ class Env::ActiveFocusClientWindowObserver : public WindowObserver {
// Env, public:
Env::~Env() {
+ if (RunningInsideMus())
+ ui::OSExchangeDataProviderFactory::SetFactory(nullptr);
+
for (EnvObserver& observer : observers_)
observer.OnWillDestroyEnv();
DCHECK_EQ(this, lazy_tls_ptr.Pointer()->Get());
@@ -192,8 +196,11 @@ Env::Env(Mode mode)
}
void Env::Init() {
- if (RunningInsideMus())
+ if (RunningInsideMus()) {
+ ui::OSExchangeDataProviderFactory::SetFactory(this);
return;
+ }
+
#if defined(USE_OZONE)
// The ozone platform can provide its own event source. So initialize the
// platform before creating the default event source. If running inside mus
@@ -243,4 +250,8 @@ ui::EventTargeter* Env::GetEventTargeter() {
return NULL;
}
+std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() {
+ return base::MakeUnique<aura::OSExchangeDataProviderMus>();
+}
+
} // namespace aura
« no previous file with comments | « ui/aura/env.h ('k') | ui/aura/mus/drag_drop_controller_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698