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

Side by Side Diff: ash/mus/window_manager_application.cc

Issue 2319783002: mash: Allow a subset of D-Bus clients to be created in DBusThreadManager (Closed)
Patch Set: cleanup Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/test/ash_test_helper.cc » ('j') | chromeos/dbus/dbus_client_bundle.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/mus/window_manager_application.h" 5 #include "ash/mus/window_manager_application.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 12 matching lines...) Expand all
23 #include "services/ui/public/cpp/window_tree_client.h" 23 #include "services/ui/public/cpp/window_tree_client.h"
24 #include "ui/aura/env.h" 24 #include "ui/aura/env.h"
25 #include "ui/events/event.h" 25 #include "ui/events/event.h"
26 #include "ui/message_center/message_center.h" 26 #include "ui/message_center/message_center.h"
27 #include "ui/views/mus/aura_init.h" 27 #include "ui/views/mus/aura_init.h"
28 #include "ui/views/mus/surface_context_factory.h" 28 #include "ui/views/mus/surface_context_factory.h"
29 29
30 #if defined(OS_CHROMEOS) 30 #if defined(OS_CHROMEOS)
31 #include "ash/common/system/chromeos/power/power_status.h" 31 #include "ash/common/system/chromeos/power/power_status.h"
32 #include "chromeos/audio/cras_audio_handler.h" 32 #include "chromeos/audio/cras_audio_handler.h"
33 #include "chromeos/dbus/dbus_client_bundle.h"
33 #include "chromeos/dbus/dbus_thread_manager.h" 34 #include "chromeos/dbus/dbus_thread_manager.h"
34 #include "chromeos/system/fake_statistics_provider.h" 35 #include "chromeos/system/fake_statistics_provider.h"
35 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck 36 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck
36 #endif 37 #endif
37 38
38 namespace ash { 39 namespace ash {
39 namespace mus { 40 namespace mus {
40 namespace { 41 namespace {
41 42
42 void InitializeComponents() { 43 void InitializeComponents() {
43 message_center::MessageCenter::Initialize(); 44 message_center::MessageCenter::Initialize();
44 #if defined(OS_CHROMEOS) 45 #if defined(OS_CHROMEOS)
46 // TODO(crbug.com/629707): Use mojo API for bluetooth and shill.
47 const chromeos::DBusClientTypeMask clients =
48 chromeos::DBusClientBundle::BLUETOOTH | chromeos::DBusClientBundle::CRAS |
49 chromeos::DBusClientBundle::GSM_SMS |
50 chromeos::DBusClientBundle::POWER_MANAGER |
51 chromeos::DBusClientBundle::SESSION_MANAGER |
52 chromeos::DBusClientBundle::SHILL | chromeos::DBusClientBundle::SMS |
53 chromeos::DBusClientBundle::SYSTEM_CLOCK |
54 chromeos::DBusClientBundle::UPDATE_ENGINE;
45 // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but 55 // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but
46 // before WindowManager::Init(). 56 // before WindowManager::Init().
47 chromeos::DBusThreadManager::Initialize(); 57 chromeos::DBusThreadManager::Initialize(clients);
48 58
49 // See ChromeBrowserMainPartsChromeos for ordering details. 59 // See ChromeBrowserMainPartsChromeos for ordering details.
50 bluez::BluezDBusManager::Initialize( 60 bluez::BluezDBusManager::Initialize(
51 chromeos::DBusThreadManager::Get()->GetSystemBus(), 61 chromeos::DBusThreadManager::Get()->GetSystemBus(),
52 chromeos::DBusThreadManager::Get()->IsUsingStub( 62 chromeos::DBusThreadManager::Get()->IsUsingFake(
53 chromeos::DBusClientBundle::BLUETOOTH)); 63 chromeos::DBusClientBundle::BLUETOOTH));
54 // TODO(jamescook): Initialize real audio handler. 64 // TODO(jamescook): Initialize real audio handler.
55 chromeos::CrasAudioHandler::InitializeForTesting(); 65 chromeos::CrasAudioHandler::InitializeForTesting();
56 PowerStatus::Initialize(); 66 PowerStatus::Initialize();
57 #endif 67 #endif
58 } 68 }
59 69
60 void ShutdownComponents() { 70 void ShutdownComponents() {
61 #if defined(OS_CHROMEOS) 71 #if defined(OS_CHROMEOS)
62 PowerStatus::Shutdown(); 72 PowerStatus::Shutdown();
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, 183 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed,
174 base::Unretained(this)))); 184 base::Unretained(this))));
175 } 185 }
176 186
177 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { 187 void WindowManagerApplication::ScreenlockStateChanged(bool locked) {
178 window_manager_->SetScreenLocked(locked); 188 window_manager_->SetScreenLocked(locked);
179 } 189 }
180 190
181 } // namespace mus 191 } // namespace mus
182 } // namespace ash 192 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/test/ash_test_helper.cc » ('j') | chromeos/dbus/dbus_client_bundle.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698