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

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

Issue 2338063002: chromeos: Refactor D-Bus client type enum and stub vs. fake naming (Closed)
Patch Set: review comments 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') | no next file with comments »
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 13 matching lines...) Expand all
24 #include "services/ui/public/cpp/window_tree_client.h" 24 #include "services/ui/public/cpp/window_tree_client.h"
25 #include "ui/aura/env.h" 25 #include "ui/aura/env.h"
26 #include "ui/events/event.h" 26 #include "ui/events/event.h"
27 #include "ui/message_center/message_center.h" 27 #include "ui/message_center/message_center.h"
28 #include "ui/views/mus/aura_init.h" 28 #include "ui/views/mus/aura_init.h"
29 #include "ui/views/mus/surface_context_factory.h" 29 #include "ui/views/mus/surface_context_factory.h"
30 30
31 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
32 #include "ash/common/system/chromeos/power/power_status.h" 32 #include "ash/common/system/chromeos/power/power_status.h"
33 #include "chromeos/audio/cras_audio_handler.h" 33 #include "chromeos/audio/cras_audio_handler.h"
34 #include "chromeos/dbus/dbus_client_types.h"
34 #include "chromeos/dbus/dbus_thread_manager.h" 35 #include "chromeos/dbus/dbus_thread_manager.h"
35 #include "chromeos/system/fake_statistics_provider.h" 36 #include "chromeos/system/fake_statistics_provider.h"
36 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck 37 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck
37 #endif 38 #endif
38 39
39 namespace ash { 40 namespace ash {
40 namespace mus { 41 namespace mus {
41 namespace { 42 namespace {
42 43
43 void InitializeComponents() { 44 void InitializeComponents() {
44 message_center::MessageCenter::Initialize(); 45 message_center::MessageCenter::Initialize();
45 #if defined(OS_CHROMEOS) 46 #if defined(OS_CHROMEOS)
46 // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but 47 // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but
47 // before WindowManager::Init(). 48 // before WindowManager::Init().
48 chromeos::DBusThreadManager::Initialize(); 49 chromeos::DBusThreadManager::Initialize();
49 50
50 // See ChromeBrowserMainPartsChromeos for ordering details. 51 // See ChromeBrowserMainPartsChromeos for ordering details.
51 bluez::BluezDBusManager::Initialize( 52 bluez::BluezDBusManager::Initialize(
52 chromeos::DBusThreadManager::Get()->GetSystemBus(), 53 chromeos::DBusThreadManager::Get()->GetSystemBus(),
53 chromeos::DBusThreadManager::Get()->IsUsingStub( 54 chromeos::DBusThreadManager::Get()->IsUsingFake(
54 chromeos::DBusClientBundle::BLUETOOTH)); 55 chromeos::DBusClientType::BLUETOOTH));
55 // TODO(jamescook): Initialize real audio handler. 56 // TODO(jamescook): Initialize real audio handler.
56 chromeos::CrasAudioHandler::InitializeForTesting(); 57 chromeos::CrasAudioHandler::InitializeForTesting();
57 PowerStatus::Initialize(); 58 PowerStatus::Initialize();
58 #endif 59 #endif
59 } 60 }
60 61
61 void ShutdownComponents() { 62 void ShutdownComponents() {
62 #if defined(OS_CHROMEOS) 63 #if defined(OS_CHROMEOS)
63 PowerStatus::Shutdown(); 64 PowerStatus::Shutdown();
64 chromeos::CrasAudioHandler::Shutdown(); 65 chromeos::CrasAudioHandler::Shutdown();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, 201 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed,
201 base::Unretained(this)))); 202 base::Unretained(this))));
202 } 203 }
203 204
204 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { 205 void WindowManagerApplication::ScreenlockStateChanged(bool locked) {
205 window_manager_->SetScreenLocked(locked); 206 window_manager_->SetScreenLocked(locked);
206 } 207 }
207 208
208 } // namespace mus 209 } // namespace mus
209 } // namespace ash 210 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/test/ash_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698