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

Unified Diff: ash/mus/sysui_application.cc

Issue 1685313002: ash/mash: Fix launching ash as a mus-app in chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/shell_delegate_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/sysui_application.cc
diff --git a/ash/mus/sysui_application.cc b/ash/mus/sysui_application.cc
index 094e8d19f83d97ddab61418c80d07ce3219ab115..7b4a53a4404862a8eb5b029211fedd597b5154f2 100644
--- a/ash/mus/sysui_application.cc
+++ b/ash/mus/sysui_application.cc
@@ -26,6 +26,13 @@
#include "ui/views/mus/window_manager_connection.h"
#include "ui/views/views_delegate.h"
+#if defined(OS_CHROMEOS)
+#include "chromeos/audio/cras_audio_handler.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "device/bluetooth/dbus/bluez_dbus_manager.h"
+#include "ui/events/devices/device_data_manager.h"
+#endif
+
using views::ViewsDelegate;
namespace ash {
@@ -161,7 +168,8 @@ class AshInit {
ash::AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus));
ash_delegate_ = new ShellDelegateMus;
- message_center::MessageCenter::Initialize();
+
+ InitializeComponents();
ash::ShellInitParams init_params;
init_params.delegate = ash_delegate_;
@@ -194,6 +202,20 @@ class AshInit {
->SetWallpaperImage(wallpaper, wallpaper::WALLPAPER_LAYOUT_TILE);
}
+ void InitializeComponents() {
+ message_center::MessageCenter::Initialize();
+
+#if defined(OS_CHROMEOS)
+ ui::DeviceDataManager::CreateInstance();
+ chromeos::DBusThreadManager::Initialize();
+ bluez::BluezDBusManager::Initialize(
+ chromeos::DBusThreadManager::Get()->GetSystemBus(),
+ chromeos::DBusThreadManager::Get()->IsUsingStub(
+ chromeos::DBusClientBundle::BLUETOOTH));
+ chromeos::CrasAudioHandler::InitializeForTesting();
+#endif
+ }
+
private:
scoped_refptr<base::SequencedWorkerPool> worker_pool_;
scoped_ptr<views::AuraInit> aura_init_;
« no previous file with comments | « ash/mus/shell_delegate_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698