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

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

Issue 2434683003: Move NetworkStateNotifier and NetworkConnect from src/ui (Closed)
Patch Set: Created 4 years, 2 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
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"
(...skipping 15 matching lines...) Expand all
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 "ash/mus/network_connect_delegate_mus.h" 33 #include "ash/mus/network_connect_delegate_mus.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_connect.h"
36 #include "chromeos/network/network_handler.h" 37 #include "chromeos/network/network_handler.h"
37 #include "chromeos/system/fake_statistics_provider.h" 38 #include "chromeos/system/fake_statistics_provider.h"
38 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck 39 #include "device/bluetooth/dbus/bluez_dbus_manager.h" // nogncheck
39 #include "ui/chromeos/network/network_connect.h"
40 #endif 40 #endif
41 41
42 namespace ash { 42 namespace ash {
43 namespace mus { 43 namespace mus {
44 44
45 WindowManagerApplication::WindowManagerApplication() 45 WindowManagerApplication::WindowManagerApplication()
46 : screenlock_state_listener_binding_(this) {} 46 : screenlock_state_listener_binding_(this) {}
47 47
48 WindowManagerApplication::~WindowManagerApplication() { 48 WindowManagerApplication::~WindowManagerApplication() {
49 // AcceleratorRegistrarImpl removes an observer in its destructor. Destroy 49 // AcceleratorRegistrarImpl removes an observer in its destructor. Destroy
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // before WindowManager::Init(). 103 // before WindowManager::Init().
104 chromeos::DBusThreadManager::Initialize( 104 chromeos::DBusThreadManager::Initialize(
105 chromeos::DBusThreadManager::PROCESS_ASH); 105 chromeos::DBusThreadManager::PROCESS_ASH);
106 106
107 // See ChromeBrowserMainPartsChromeos for ordering details. 107 // See ChromeBrowserMainPartsChromeos for ordering details.
108 bluez::BluezDBusManager::Initialize( 108 bluez::BluezDBusManager::Initialize(
109 chromeos::DBusThreadManager::Get()->GetSystemBus(), 109 chromeos::DBusThreadManager::Get()->GetSystemBus(),
110 chromeos::DBusThreadManager::Get()->IsUsingFakes()); 110 chromeos::DBusThreadManager::Get()->IsUsingFakes());
111 chromeos::NetworkHandler::Initialize(); 111 chromeos::NetworkHandler::Initialize();
112 network_connect_delegate_.reset(new NetworkConnectDelegateMus()); 112 network_connect_delegate_.reset(new NetworkConnectDelegateMus());
113 ui::NetworkConnect::Initialize(network_connect_delegate_.get()); 113 chromeos::NetworkConnect::Initialize(network_connect_delegate_.get());
114 // TODO(jamescook): Initialize real audio handler. 114 // TODO(jamescook): Initialize real audio handler.
115 chromeos::CrasAudioHandler::InitializeForTesting(); 115 chromeos::CrasAudioHandler::InitializeForTesting();
116 PowerStatus::Initialize(); 116 PowerStatus::Initialize();
117 #endif 117 #endif
118 } 118 }
119 119
120 void WindowManagerApplication::ShutdownComponents() { 120 void WindowManagerApplication::ShutdownComponents() {
121 #if defined(OS_CHROMEOS) 121 #if defined(OS_CHROMEOS)
122 PowerStatus::Shutdown(); 122 PowerStatus::Shutdown();
123 chromeos::CrasAudioHandler::Shutdown(); 123 chromeos::CrasAudioHandler::Shutdown();
124 ui::NetworkConnect::Shutdown(); 124 chromeos::NetworkConnect::Shutdown();
125 network_connect_delegate_.reset(); 125 network_connect_delegate_.reset();
126 chromeos::NetworkHandler::Shutdown(); 126 chromeos::NetworkHandler::Shutdown();
127 bluez::BluezDBusManager::Shutdown(); 127 bluez::BluezDBusManager::Shutdown();
128 chromeos::DBusThreadManager::Shutdown(); 128 chromeos::DBusThreadManager::Shutdown();
129 #endif 129 #endif
130 message_center::MessageCenter::Shutdown(); 130 message_center::MessageCenter::Shutdown();
131 } 131 }
132 132
133 void WindowManagerApplication::OnStart( 133 void WindowManagerApplication::OnStart(
134 const service_manager::Identity& identity) { 134 const service_manager::Identity& identity) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, 202 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed,
203 base::Unretained(this)))); 203 base::Unretained(this))));
204 } 204 }
205 205
206 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { 206 void WindowManagerApplication::ScreenlockStateChanged(bool locked) {
207 window_manager_->SetScreenLocked(locked); 207 window_manager_->SetScreenLocked(locked);
208 } 208 }
209 209
210 } // namespace mus 210 } // namespace mus
211 } // namespace ash 211 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698