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

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

Issue 2967943002: Update AuraInit to handle failed initialization (Closed)
Patch Set: Switch to a Create method for AuraInit 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_ = base::MakeUnique<views::AuraInit>( 132 aura_init_ = views::AuraInit::Create(
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 }
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
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