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

Side by Side Diff: mash/task_viewer/task_viewer.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 | « mash/simple_wm/simple_wm.cc ('k') | ui/views/mus/aura_init.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 "mash/task_viewer/task_viewer.h" 5 #include "mash/task_viewer/task_viewer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 void TaskViewer::RemoveWindow(views::Widget* widget) { 288 void TaskViewer::RemoveWindow(views::Widget* widget) {
289 auto it = std::find(windows_.begin(), windows_.end(), widget); 289 auto it = std::find(windows_.begin(), windows_.end(), widget);
290 DCHECK(it != windows_.end()); 290 DCHECK(it != windows_.end());
291 windows_.erase(it); 291 windows_.erase(it);
292 if (windows_.empty()) 292 if (windows_.empty())
293 base::MessageLoop::current()->QuitWhenIdle(); 293 base::MessageLoop::current()->QuitWhenIdle();
294 } 294 }
295 295
296 void TaskViewer::OnStart() { 296 void TaskViewer::OnStart() {
297 aura_init_ = views::AuraInit::Create( 297 aura_init_ = base::MakeUnique<views::AuraInit>(
298 context()->connector(), context()->identity(), "views_mus_resources.pak", 298 context()->connector(), context()->identity(), "views_mus_resources.pak",
299 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); 299 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
300 if (!aura_init_)
301 context()->QuitNow();
302 } 300 }
303 301
304 void TaskViewer::OnBindInterface( 302 void TaskViewer::OnBindInterface(
305 const service_manager::BindSourceInfo& source_info, 303 const service_manager::BindSourceInfo& source_info,
306 const std::string& interface_name, 304 const std::string& interface_name,
307 mojo::ScopedMessagePipeHandle interface_pipe) { 305 mojo::ScopedMessagePipeHandle interface_pipe) {
308 registry_.BindInterface(source_info, interface_name, 306 registry_.BindInterface(source_info, interface_name,
309 std::move(interface_pipe)); 307 std::move(interface_pipe));
310 } 308 }
311 309
(...skipping 22 matching lines...) Expand all
334 service_manager->AddListener(std::move(listener)); 332 service_manager->AddListener(std::move(listener));
335 } 333 }
336 334
337 void TaskViewer::Create(const service_manager::BindSourceInfo& source_info, 335 void TaskViewer::Create(const service_manager::BindSourceInfo& source_info,
338 ::mash::mojom::LaunchableRequest request) { 336 ::mash::mojom::LaunchableRequest request) {
339 bindings_.AddBinding(this, std::move(request)); 337 bindings_.AddBinding(this, std::move(request));
340 } 338 }
341 339
342 } // namespace task_viewer 340 } // namespace task_viewer
343 } // namespace main 341 } // namespace main
OLDNEW
« no previous file with comments | « mash/simple_wm/simple_wm.cc ('k') | ui/views/mus/aura_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698