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

Unified Diff: ash/mus/window_manager_application.cc

Issue 2116153002: Initialize DBus in mojo:ash on chrome os (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, move init later 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 | « ash/mus/bridge/wm_shell_mus.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager_application.cc
diff --git a/ash/mus/window_manager_application.cc b/ash/mus/window_manager_application.cc
index aeef95ed4512e610ed0b56c110f3f89a4004870c..ac84148f8013453e2925532f4c65dfb6f9d00a15 100644
--- a/ash/mus/window_manager_application.cc
+++ b/ash/mus/window_manager_application.cc
@@ -23,6 +23,10 @@
#include "ui/events/event.h"
#include "ui/views/mus/aura_init.h"
+#if defined(OS_CHROMEOS)
+#include "chromeos/dbus/dbus_thread_manager.h"
+#endif
+
namespace ash {
namespace mus {
@@ -40,6 +44,10 @@ WindowManagerApplication::~WindowManagerApplication() {
// Destroy the WindowManager while still valid. This way we ensure
// OnWillDestroyRootWindowController() is called (if it hasn't been already).
window_manager_.reset();
+
+#if defined(OS_CHROMEOS)
+ chromeos::DBusThreadManager::Shutdown();
+#endif
}
void WindowManagerApplication::OnAcceleratorRegistrarDestroyed(
@@ -49,6 +57,11 @@ void WindowManagerApplication::OnAcceleratorRegistrarDestroyed(
void WindowManagerApplication::InitWindowManager(
::ui::WindowTreeClient* window_tree_client) {
+#if defined(OS_CHROMEOS)
+ // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but
+ // before WindowManager::Init().
+ chromeos::DBusThreadManager::Initialize();
+#endif
window_manager_->Init(window_tree_client);
window_manager_->AddObserver(this);
}
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698