| 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/mojo_interface_factory.h" | 10 #include "ash/common/mojo_interface_factory.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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 "ash/mus/network_connect_delegate_mus.h" | 32 #include "ash/mus/network_connect_delegate_mus.h" |
| 33 #include "chromeos/audio/cras_audio_handler.h" | 33 #include "chromeos/audio/cras_audio_handler.h" |
| 34 #include "chromeos/dbus/dbus_thread_manager.h" | 34 #include "chromeos/dbus/dbus_thread_manager.h" |
| 35 #include "chromeos/network/network_connect.h" |
| 35 #include "chromeos/network/network_handler.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 #include "ui/chromeos/network/network_connect.h" | |
| 39 #endif | 39 #endif |
| 40 | 40 |
| 41 namespace ash { | 41 namespace ash { |
| 42 namespace mus { | 42 namespace mus { |
| 43 | 43 |
| 44 WindowManagerApplication::WindowManagerApplication() | 44 WindowManagerApplication::WindowManagerApplication() |
| 45 : screenlock_state_listener_binding_(this) {} | 45 : screenlock_state_listener_binding_(this) {} |
| 46 | 46 |
| 47 WindowManagerApplication::~WindowManagerApplication() { | 47 WindowManagerApplication::~WindowManagerApplication() { |
| 48 // AcceleratorRegistrarImpl removes an observer in its destructor. Destroy | 48 // AcceleratorRegistrarImpl removes an observer in its destructor. Destroy |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // before WindowManager::Init(). | 102 // before WindowManager::Init(). |
| 103 chromeos::DBusThreadManager::Initialize( | 103 chromeos::DBusThreadManager::Initialize( |
| 104 chromeos::DBusThreadManager::PROCESS_ASH); | 104 chromeos::DBusThreadManager::PROCESS_ASH); |
| 105 | 105 |
| 106 // See ChromeBrowserMainPartsChromeos for ordering details. | 106 // See ChromeBrowserMainPartsChromeos for ordering details. |
| 107 bluez::BluezDBusManager::Initialize( | 107 bluez::BluezDBusManager::Initialize( |
| 108 chromeos::DBusThreadManager::Get()->GetSystemBus(), | 108 chromeos::DBusThreadManager::Get()->GetSystemBus(), |
| 109 chromeos::DBusThreadManager::Get()->IsUsingFakes()); | 109 chromeos::DBusThreadManager::Get()->IsUsingFakes()); |
| 110 chromeos::NetworkHandler::Initialize(); | 110 chromeos::NetworkHandler::Initialize(); |
| 111 network_connect_delegate_.reset(new NetworkConnectDelegateMus()); | 111 network_connect_delegate_.reset(new NetworkConnectDelegateMus()); |
| 112 ui::NetworkConnect::Initialize(network_connect_delegate_.get()); | 112 chromeos::NetworkConnect::Initialize(network_connect_delegate_.get()); |
| 113 // TODO(jamescook): Initialize real audio handler. | 113 // TODO(jamescook): Initialize real audio handler. |
| 114 chromeos::CrasAudioHandler::InitializeForTesting(); | 114 chromeos::CrasAudioHandler::InitializeForTesting(); |
| 115 PowerStatus::Initialize(); | 115 PowerStatus::Initialize(); |
| 116 #endif | 116 #endif |
| 117 } | 117 } |
| 118 | 118 |
| 119 void WindowManagerApplication::ShutdownComponents() { | 119 void WindowManagerApplication::ShutdownComponents() { |
| 120 #if defined(OS_CHROMEOS) | 120 #if defined(OS_CHROMEOS) |
| 121 PowerStatus::Shutdown(); | 121 PowerStatus::Shutdown(); |
| 122 chromeos::CrasAudioHandler::Shutdown(); | 122 chromeos::CrasAudioHandler::Shutdown(); |
| 123 ui::NetworkConnect::Shutdown(); | 123 chromeos::NetworkConnect::Shutdown(); |
| 124 network_connect_delegate_.reset(); | 124 network_connect_delegate_.reset(); |
| 125 chromeos::NetworkHandler::Shutdown(); | 125 chromeos::NetworkHandler::Shutdown(); |
| 126 bluez::BluezDBusManager::Shutdown(); | 126 bluez::BluezDBusManager::Shutdown(); |
| 127 chromeos::DBusThreadManager::Shutdown(); | 127 chromeos::DBusThreadManager::Shutdown(); |
| 128 #endif | 128 #endif |
| 129 message_center::MessageCenter::Shutdown(); | 129 message_center::MessageCenter::Shutdown(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void WindowManagerApplication::OnStart( | 132 void WindowManagerApplication::OnStart( |
| 133 const service_manager::Identity& identity) { | 133 const service_manager::Identity& identity) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, | 190 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, |
| 191 base::Unretained(this)))); | 191 base::Unretained(this)))); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { | 194 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { |
| 195 window_manager_->SetScreenLocked(locked); | 195 window_manager_->SetScreenLocked(locked); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace mus | 198 } // namespace mus |
| 199 } // namespace ash | 199 } // namespace ash |
| OLD | NEW |