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

Unified Diff: ui/views/mus/window_manager_connection.cc

Issue 1871253002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot.merge Created 4 years, 8 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/views/mus/aura_init.cc ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/window_manager_connection.cc
diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
index fc41913602fc323bfe27f4fd90d519d7d7512a0c..0f8698e79d64c1df557bf6668d5d19013e5b9dad 100644
--- a/ui/views/mus/window_manager_connection.cc
+++ b/ui/views/mus/window_manager_connection.cc
@@ -13,6 +13,7 @@
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/shell/public/cpp/connection.h"
#include "mojo/shell/public/cpp/connector.h"
+#include "ui/events/devices/device_data_manager.h"
#include "ui/views/mus/native_widget_mus.h"
#include "ui/views/mus/screen_mus.h"
#include "ui/views/views_delegate.h"
@@ -76,6 +77,11 @@ WindowManagerConnection::WindowManagerConnection(mojo::Connector* connector)
screen_.reset(new ScreenMus(this));
screen_->Init(connector);
+ // TODO(sad): We should have a DeviceDataManager implementation that talks to
+ // a mojo service to learn about the input-devices on the system.
+ // http://crbug.com/601981
+ ui::DeviceDataManager::CreateInstance();
+
ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind(
&WindowManagerConnection::CreateNativeWidgetMus,
base::Unretained(this),
@@ -86,6 +92,8 @@ WindowManagerConnection::~WindowManagerConnection() {
// ~WindowTreeConnection calls back to us (we're the WindowTreeDelegate),
// destroy it while we are still valid.
window_tree_connection_.reset();
+
+ ui::DeviceDataManager::DeleteInstance();
}
void WindowManagerConnection::OnEmbed(mus::Window* root) {}
« no previous file with comments | « ui/views/mus/aura_init.cc ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698