| 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 10 matching lines...) Expand all Loading... |
| 21 #include "services/ui/public/cpp/gpu_service.h" | 21 #include "services/ui/public/cpp/gpu_service.h" |
| 22 #include "services/ui/public/cpp/window.h" | 22 #include "services/ui/public/cpp/window.h" |
| 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/dbus_thread_manager_ash.h" |
| 31 #include "ash/common/system/chromeos/power/power_status.h" | 32 #include "ash/common/system/chromeos/power/power_status.h" |
| 32 #include "chromeos/audio/cras_audio_handler.h" | 33 #include "chromeos/audio/cras_audio_handler.h" |
| 34 #include "chromeos/dbus/dbus_client_bundle.h" |
| 33 #include "chromeos/dbus/dbus_thread_manager.h" | 35 #include "chromeos/dbus/dbus_thread_manager.h" |
| 34 #include "chromeos/system/fake_statistics_provider.h" | 36 #include "chromeos/system/fake_statistics_provider.h" |
| 35 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck | 37 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck |
| 36 #endif | 38 #endif |
| 37 | 39 |
| 38 namespace ash { | 40 namespace ash { |
| 39 namespace mus { | 41 namespace mus { |
| 40 namespace { | 42 namespace { |
| 41 | 43 |
| 42 void InitializeComponents() { | 44 void InitializeComponents() { |
| 43 message_center::MessageCenter::Initialize(); | 45 message_center::MessageCenter::Initialize(); |
| 44 #if defined(OS_CHROMEOS) | 46 #if defined(OS_CHROMEOS) |
| 47 // TODO(crbug.com/629707): Use mojo API for bluetooth and shill. |
| 48 const chromeos::DBusClientTypeMask clients = |
| 49 chromeos::DBusClientBundle::BLUETOOTH | chromeos::DBusClientBundle::CRAS | |
| 50 chromeos::DBusClientBundle::GSM_SMS | |
| 51 chromeos::DBusClientBundle::POWER_MANAGER | |
| 52 chromeos::DBusClientBundle::SESSION_MANAGER | |
| 53 chromeos::DBusClientBundle::SHILL | chromeos::DBusClientBundle::SMS | |
| 54 chromeos::DBusClientBundle::SYSTEM_CLOCK | |
| 55 chromeos::DBusClientBundle::UPDATE_ENGINE; |
| 45 // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but | 56 // Must occur after mojo::ApplicationRunner has initialized AtExitManager, but |
| 46 // before WindowManager::Init(). | 57 // before WindowManager::Init(). |
| 47 chromeos::DBusThreadManager::Initialize(); | 58 chromeos::DBusThreadManager::Initialize(clients); |
| 59 //JAMES leak |
| 60 new DBusThreadManagerAsh(); |
| 48 | 61 |
| 49 // See ChromeBrowserMainPartsChromeos for ordering details. | 62 // See ChromeBrowserMainPartsChromeos for ordering details. |
| 50 bluez::BluezDBusManager::Initialize( | 63 bluez::BluezDBusManager::Initialize( |
| 51 chromeos::DBusThreadManager::Get()->GetSystemBus(), | 64 chromeos::DBusThreadManager::Get()->GetSystemBus(), |
| 52 chromeos::DBusThreadManager::Get()->IsUsingStub( | 65 chromeos::DBusThreadManager::Get()->IsUsingFake( |
| 53 chromeos::DBusClientBundle::BLUETOOTH)); | 66 chromeos::DBusClientBundle::BLUETOOTH)); |
| 54 // TODO(jamescook): Initialize real audio handler. | 67 // TODO(jamescook): Initialize real audio handler. |
| 55 chromeos::CrasAudioHandler::InitializeForTesting(); | 68 chromeos::CrasAudioHandler::InitializeForTesting(); |
| 56 PowerStatus::Initialize(); | 69 PowerStatus::Initialize(); |
| 57 #endif | 70 #endif |
| 58 } | 71 } |
| 59 | 72 |
| 60 void ShutdownComponents() { | 73 void ShutdownComponents() { |
| 61 #if defined(OS_CHROMEOS) | 74 #if defined(OS_CHROMEOS) |
| 62 PowerStatus::Shutdown(); | 75 PowerStatus::Shutdown(); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, | 201 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, |
| 189 base::Unretained(this)))); | 202 base::Unretained(this)))); |
| 190 } | 203 } |
| 191 | 204 |
| 192 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { | 205 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { |
| 193 window_manager_->SetScreenLocked(locked); | 206 window_manager_->SetScreenLocked(locked); |
| 194 } | 207 } |
| 195 | 208 |
| 196 } // namespace mus | 209 } // namespace mus |
| 197 } // namespace ash | 210 } // namespace ash |
| OLD | NEW |