| OLD | NEW |
| 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 15 matching lines...) Expand all Loading... |
| 26 #include "ui/aura/env.h" | 26 #include "ui/aura/env.h" |
| 27 #include "ui/events/event.h" | 27 #include "ui/events/event.h" |
| 28 #include "ui/message_center/message_center.h" | 28 #include "ui/message_center/message_center.h" |
| 29 #include "ui/views/mus/aura_init.h" | 29 #include "ui/views/mus/aura_init.h" |
| 30 #include "ui/views/mus/surface_context_factory.h" | 30 #include "ui/views/mus/surface_context_factory.h" |
| 31 | 31 |
| 32 #if defined(OS_CHROMEOS) | 32 #if defined(OS_CHROMEOS) |
| 33 #include "ash/common/system/chromeos/power/power_status.h" | 33 #include "ash/common/system/chromeos/power/power_status.h" |
| 34 #include "chromeos/audio/cras_audio_handler.h" | 34 #include "chromeos/audio/cras_audio_handler.h" |
| 35 #include "chromeos/dbus/dbus_thread_manager.h" | 35 #include "chromeos/dbus/dbus_thread_manager.h" |
| 36 #include "chromeos/network/network_handler.h" |
| 36 #include "chromeos/system/fake_statistics_provider.h" | 37 #include "chromeos/system/fake_statistics_provider.h" |
| 37 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck | 38 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck |
| 38 #endif | 39 #endif |
| 39 | 40 |
| 40 namespace ash { | 41 namespace ash { |
| 41 namespace mus { | 42 namespace mus { |
| 42 namespace { | 43 namespace { |
| 43 | 44 |
| 44 void InitializeComponents() { | 45 void InitializeComponents() { |
| 45 message_center::MessageCenter::Initialize(); | 46 message_center::MessageCenter::Initialize(); |
| 46 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
| 47 // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but | 48 // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but |
| 48 // before WindowManager::Init(). | 49 // before WindowManager::Init(). |
| 49 chromeos::DBusThreadManager::Initialize( | 50 chromeos::DBusThreadManager::Initialize( |
| 50 chromeos::DBusThreadManager::PROCESS_ASH); | 51 chromeos::DBusThreadManager::PROCESS_ASH); |
| 51 | 52 |
| 52 // See ChromeBrowserMainPartsChromeos for ordering details. | 53 // See ChromeBrowserMainPartsChromeos for ordering details. |
| 53 bluez::BluezDBusManager::Initialize( | 54 bluez::BluezDBusManager::Initialize( |
| 54 chromeos::DBusThreadManager::Get()->GetSystemBus(), | 55 chromeos::DBusThreadManager::Get()->GetSystemBus(), |
| 55 chromeos::DBusThreadManager::Get()->IsUsingFakes()); | 56 chromeos::DBusThreadManager::Get()->IsUsingFakes()); |
| 57 chromeos::NetworkHandler::Initialize(); |
| 56 // TODO(jamescook): Initialize real audio handler. | 58 // TODO(jamescook): Initialize real audio handler. |
| 57 chromeos::CrasAudioHandler::InitializeForTesting(); | 59 chromeos::CrasAudioHandler::InitializeForTesting(); |
| 58 PowerStatus::Initialize(); | 60 PowerStatus::Initialize(); |
| 59 #endif | 61 #endif |
| 60 } | 62 } |
| 61 | 63 |
| 62 void ShutdownComponents() { | 64 void ShutdownComponents() { |
| 63 #if defined(OS_CHROMEOS) | 65 #if defined(OS_CHROMEOS) |
| 64 PowerStatus::Shutdown(); | 66 PowerStatus::Shutdown(); |
| 65 chromeos::CrasAudioHandler::Shutdown(); | 67 chromeos::CrasAudioHandler::Shutdown(); |
| 68 chromeos::NetworkHandler::Shutdown(); |
| 66 bluez::BluezDBusManager::Shutdown(); | 69 bluez::BluezDBusManager::Shutdown(); |
| 67 chromeos::DBusThreadManager::Shutdown(); | 70 chromeos::DBusThreadManager::Shutdown(); |
| 68 #endif | 71 #endif |
| 69 message_center::MessageCenter::Shutdown(); | 72 message_center::MessageCenter::Shutdown(); |
| 70 } | 73 } |
| 71 | 74 |
| 72 } // namespace | 75 } // namespace |
| 73 | 76 |
| 74 WindowManagerApplication::WindowManagerApplication() | 77 WindowManagerApplication::WindowManagerApplication() |
| 75 : screenlock_state_listener_binding_(this) {} | 78 : screenlock_state_listener_binding_(this) {} |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, | 212 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, |
| 210 base::Unretained(this)))); | 213 base::Unretained(this)))); |
| 211 } | 214 } |
| 212 | 215 |
| 213 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { | 216 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { |
| 214 window_manager_->SetScreenLocked(locked); | 217 window_manager_->SetScreenLocked(locked); |
| 215 } | 218 } |
| 216 | 219 |
| 217 } // namespace mus | 220 } // namespace mus |
| 218 } // namespace ash | 221 } // namespace ash |
| OLD | NEW |