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

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

Issue 2633293005: Converts mash to use Shell (Closed)
Patch Set: feedback Created 3 years, 11 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 | « ash/mus/window_manager.cc ('k') | ash/mus/window_manager_observer.h » ('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/mojo_interface_factory.h" 10 #include "ash/common/mojo_interface_factory.h"
11 #include "ash/common/system/chromeos/power/power_status.h" 11 #include "ash/common/system/chromeos/power/power_status.h"
12 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
13 #include "ash/mus/network_connect_delegate_mus.h" 13 #include "ash/mus/network_connect_delegate_mus.h"
14 #include "ash/mus/window_manager.h" 14 #include "ash/mus/window_manager.h"
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/threading/thread_task_runner_handle.h" 17 #include "base/threading/thread_task_runner_handle.h"
18 #include "chromeos/audio/cras_audio_handler.h" 18 #include "chromeos/audio/cras_audio_handler.h"
19 #include "chromeos/dbus/dbus_thread_manager.h" 19 #include "chromeos/dbus/dbus_thread_manager.h"
20 #include "chromeos/network/network_connect.h" 20 #include "chromeos/network/network_connect.h"
21 #include "chromeos/network/network_handler.h" 21 #include "chromeos/network/network_handler.h"
22 #include "chromeos/system/fake_statistics_provider.h" 22 #include "chromeos/system/fake_statistics_provider.h"
23 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck 23 #include "device/bluetooth/bluetooth_adapter_factory.h"
24 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
24 #include "services/service_manager/public/cpp/connection.h" 25 #include "services/service_manager/public/cpp/connection.h"
25 #include "services/service_manager/public/cpp/connector.h" 26 #include "services/service_manager/public/cpp/connector.h"
26 #include "services/service_manager/public/cpp/service_context.h" 27 #include "services/service_manager/public/cpp/service_context.h"
27 #include "services/tracing/public/cpp/provider.h" 28 #include "services/tracing/public/cpp/provider.h"
28 #include "services/ui/common/accelerator_util.h" 29 #include "services/ui/common/accelerator_util.h"
29 #include "services/ui/public/cpp/gpu/gpu.h" 30 #include "services/ui/public/cpp/gpu/gpu.h"
30 #include "ui/aura/env.h" 31 #include "ui/aura/env.h"
31 #include "ui/aura/mus/mus_context_factory.h" 32 #include "ui/aura/mus/mus_context_factory.h"
32 #include "ui/aura/mus/window_tree_client.h" 33 #include "ui/aura/mus/window_tree_client.h"
33 #include "ui/events/event.h" 34 #include "ui/events/event.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 88
88 // See ChromeBrowserMainPartsChromeos for ordering details. 89 // See ChromeBrowserMainPartsChromeos for ordering details.
89 bluez::BluezDBusManager::Initialize( 90 bluez::BluezDBusManager::Initialize(
90 chromeos::DBusThreadManager::Get()->GetSystemBus(), 91 chromeos::DBusThreadManager::Get()->GetSystemBus(),
91 chromeos::DBusThreadManager::Get()->IsUsingFakes()); 92 chromeos::DBusThreadManager::Get()->IsUsingFakes());
92 chromeos::NetworkHandler::Initialize(); 93 chromeos::NetworkHandler::Initialize();
93 network_connect_delegate_.reset(new NetworkConnectDelegateMus()); 94 network_connect_delegate_.reset(new NetworkConnectDelegateMus());
94 chromeos::NetworkConnect::Initialize(network_connect_delegate_.get()); 95 chromeos::NetworkConnect::Initialize(network_connect_delegate_.get());
95 // TODO(jamescook): Initialize real audio handler. 96 // TODO(jamescook): Initialize real audio handler.
96 chromeos::CrasAudioHandler::InitializeForTesting(); 97 chromeos::CrasAudioHandler::InitializeForTesting();
97 PowerStatus::Initialize();
98 } 98 }
99 99
100 void WindowManagerApplication::ShutdownComponents() { 100 void WindowManagerApplication::ShutdownComponents() {
101 PowerStatus::Shutdown(); 101 // NOTE: PowerStatus is shutdown by Shell.
102 chromeos::CrasAudioHandler::Shutdown(); 102 chromeos::CrasAudioHandler::Shutdown();
103 chromeos::NetworkConnect::Shutdown(); 103 chromeos::NetworkConnect::Shutdown();
104 network_connect_delegate_.reset(); 104 network_connect_delegate_.reset();
105 chromeos::NetworkHandler::Shutdown(); 105 chromeos::NetworkHandler::Shutdown();
106 device::BluetoothAdapterFactory::Shutdown();
106 bluez::BluezDBusManager::Shutdown(); 107 bluez::BluezDBusManager::Shutdown();
107 chromeos::DBusThreadManager::Shutdown(); 108 chromeos::DBusThreadManager::Shutdown();
108 message_center::MessageCenter::Shutdown(); 109 message_center::MessageCenter::Shutdown();
109 } 110 }
110 111
111 void WindowManagerApplication::OnStart() { 112 void WindowManagerApplication::OnStart() {
112 aura_init_ = base::MakeUnique<views::AuraInit>( 113 aura_init_ = base::MakeUnique<views::AuraInit>(
113 context()->connector(), context()->identity(), "ash_mus_resources.pak", 114 context()->connector(), context()->identity(), "ash_mus_resources.pak",
114 "ash_mus_resources_200.pak", nullptr, 115 "ash_mus_resources_200.pak", nullptr,
115 views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER); 116 views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER);
(...skipping 24 matching lines...) Expand all
140 const service_manager::ServiceInfo& remote_info, 141 const service_manager::ServiceInfo& remote_info,
141 service_manager::InterfaceRegistry* registry) { 142 service_manager::InterfaceRegistry* registry) {
142 // Register services used in both classic ash and mash. 143 // Register services used in both classic ash and mash.
143 mojo_interface_factory::RegisterInterfaces( 144 mojo_interface_factory::RegisterInterfaces(
144 registry, base::ThreadTaskRunnerHandle::Get()); 145 registry, base::ThreadTaskRunnerHandle::Get());
145 return true; 146 return true;
146 } 147 }
147 148
148 } // namespace mus 149 } // namespace mus
149 } // namespace ash 150 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager.cc ('k') | ash/mus/window_manager_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698