| 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/mojo_interface_factory.h" | 9 #include "ash/mojo_interface_factory.h" |
| 10 #include "ash/mus/network_connect_delegate_mus.h" | 10 #include "ash/mus/network_connect_delegate_mus.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 bluez::BluezDBusManager::Shutdown(); | 122 bluez::BluezDBusManager::Shutdown(); |
| 123 if (dbus_thread_manager_initialized_) | 123 if (dbus_thread_manager_initialized_) |
| 124 chromeos::DBusThreadManager::Shutdown(); | 124 chromeos::DBusThreadManager::Shutdown(); |
| 125 message_center::MessageCenter::Shutdown(); | 125 message_center::MessageCenter::Shutdown(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void WindowManagerApplication::OnStart() { | 128 void WindowManagerApplication::OnStart() { |
| 129 mojo_interface_factory::RegisterInterfaces( | 129 mojo_interface_factory::RegisterInterfaces( |
| 130 ®istry_, base::ThreadTaskRunnerHandle::Get()); | 130 ®istry_, base::ThreadTaskRunnerHandle::Get()); |
| 131 | 131 |
| 132 aura_init_ = base::MakeUnique<views::AuraInit>( | 132 aura_init_ = base::MakeUnique<views::AuraInit>(); |
| 133 context()->connector(), context()->identity(), "ash_mus_resources.pak", | 133 if (!aura_init_->Init(context()->connector(), context()->identity(), |
| 134 "ash_mus_resources_200.pak", nullptr, | 134 "ash_mus_resources.pak", "ash_mus_resources_200.pak", |
| 135 views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER); | 135 nullptr, |
| 136 views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER)) { |
| 137 context()->QuitNow(); |
| 138 return; |
| 139 } |
| 136 window_manager_ = base::MakeUnique<WindowManager>( | 140 window_manager_ = base::MakeUnique<WindowManager>( |
| 137 context()->connector(), ash_config_, show_primary_host_on_connect_); | 141 context()->connector(), ash_config_, show_primary_host_on_connect_); |
| 138 | 142 |
| 139 std::unique_ptr<aura::WindowTreeClient> window_tree_client = | 143 std::unique_ptr<aura::WindowTreeClient> window_tree_client = |
| 140 base::MakeUnique<aura::WindowTreeClient>( | 144 base::MakeUnique<aura::WindowTreeClient>( |
| 141 context()->connector(), window_manager_.get(), window_manager_.get()); | 145 context()->connector(), window_manager_.get(), window_manager_.get()); |
| 142 const bool automatically_create_display_roots = false; | 146 const bool automatically_create_display_roots = false; |
| 143 window_tree_client->ConnectAsWindowManager( | 147 window_tree_client->ConnectAsWindowManager( |
| 144 automatically_create_display_roots); | 148 automatically_create_display_roots); |
| 145 | 149 |
| 146 const bool init_network_handler = true; | 150 const bool init_network_handler = true; |
| 147 InitWindowManager(std::move(window_tree_client), init_network_handler); | 151 InitWindowManager(std::move(window_tree_client), init_network_handler); |
| 148 } | 152 } |
| 149 | 153 |
| 150 void WindowManagerApplication::OnBindInterface( | 154 void WindowManagerApplication::OnBindInterface( |
| 151 const service_manager::BindSourceInfo& source_info, | 155 const service_manager::BindSourceInfo& source_info, |
| 152 const std::string& interface_name, | 156 const std::string& interface_name, |
| 153 mojo::ScopedMessagePipeHandle interface_pipe) { | 157 mojo::ScopedMessagePipeHandle interface_pipe) { |
| 154 registry_.BindInterface(source_info, interface_name, | 158 registry_.BindInterface(source_info, interface_name, |
| 155 std::move(interface_pipe)); | 159 std::move(interface_pipe)); |
| 156 } | 160 } |
| 157 | 161 |
| 158 } // namespace mus | 162 } // namespace mus |
| 159 } // namespace ash | 163 } // namespace ash |
| OLD | NEW |