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

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

Issue 2973103002: Revert of Update AuraInit to handle failed initialization (Closed)
Patch Set: Created 3 years, 5 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/autoclick/mus/autoclick_application.cc ('k') | ash/touch_hud/mus/touch_hud_application.cc » ('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/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
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 &registry_, base::ThreadTaskRunnerHandle::Get()); 130 &registry_, base::ThreadTaskRunnerHandle::Get());
131 131
132 aura_init_ = views::AuraInit::Create( 132 aura_init_ = base::MakeUnique<views::AuraInit>(
133 context()->connector(), context()->identity(), "ash_mus_resources.pak", 133 context()->connector(), context()->identity(), "ash_mus_resources.pak",
134 "ash_mus_resources_200.pak", nullptr, 134 "ash_mus_resources_200.pak", nullptr,
135 views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER); 135 views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER);
136 if (!aura_init_) {
137 context()->QuitNow();
138 return;
139 }
140 window_manager_ = base::MakeUnique<WindowManager>( 136 window_manager_ = base::MakeUnique<WindowManager>(
141 context()->connector(), ash_config_, show_primary_host_on_connect_); 137 context()->connector(), ash_config_, show_primary_host_on_connect_);
142 138
143 std::unique_ptr<aura::WindowTreeClient> window_tree_client = 139 std::unique_ptr<aura::WindowTreeClient> window_tree_client =
144 base::MakeUnique<aura::WindowTreeClient>( 140 base::MakeUnique<aura::WindowTreeClient>(
145 context()->connector(), window_manager_.get(), window_manager_.get()); 141 context()->connector(), window_manager_.get(), window_manager_.get());
146 const bool automatically_create_display_roots = false; 142 const bool automatically_create_display_roots = false;
147 window_tree_client->ConnectAsWindowManager( 143 window_tree_client->ConnectAsWindowManager(
148 automatically_create_display_roots); 144 automatically_create_display_roots);
149 145
150 const bool init_network_handler = true; 146 const bool init_network_handler = true;
151 InitWindowManager(std::move(window_tree_client), init_network_handler); 147 InitWindowManager(std::move(window_tree_client), init_network_handler);
152 } 148 }
153 149
154 void WindowManagerApplication::OnBindInterface( 150 void WindowManagerApplication::OnBindInterface(
155 const service_manager::BindSourceInfo& source_info, 151 const service_manager::BindSourceInfo& source_info,
156 const std::string& interface_name, 152 const std::string& interface_name,
157 mojo::ScopedMessagePipeHandle interface_pipe) { 153 mojo::ScopedMessagePipeHandle interface_pipe) {
158 registry_.BindInterface(source_info, interface_name, 154 registry_.BindInterface(source_info, interface_name,
159 std::move(interface_pipe)); 155 std::move(interface_pipe));
160 } 156 }
161 157
162 } // namespace mus 158 } // namespace mus
163 } // namespace ash 159 } // namespace ash
OLDNEW
« no previous file with comments | « ash/autoclick/mus/autoclick_application.cc ('k') | ash/touch_hud/mus/touch_hud_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698