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

Side by Side Diff: ash/touch_hud/mus/touch_hud_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/mus/window_manager_application.cc ('k') | mash/catalog_viewer/catalog_viewer.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/touch_hud/mus/touch_hud_application.h" 5 #include "ash/touch_hud/mus/touch_hud_application.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/touch_hud/touch_hud_renderer.h" 8 #include "ash/touch_hud/touch_hud_renderer.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 DISALLOW_COPY_AND_ASSIGN(TouchHudUI); 62 DISALLOW_COPY_AND_ASSIGN(TouchHudUI);
63 }; 63 };
64 64
65 TouchHudApplication::TouchHudApplication() : binding_(this) { 65 TouchHudApplication::TouchHudApplication() : binding_(this) {
66 registry_.AddInterface<mash::mojom::Launchable>( 66 registry_.AddInterface<mash::mojom::Launchable>(
67 base::Bind(&TouchHudApplication::Create, base::Unretained(this))); 67 base::Bind(&TouchHudApplication::Create, base::Unretained(this)));
68 } 68 }
69 TouchHudApplication::~TouchHudApplication() {} 69 TouchHudApplication::~TouchHudApplication() {}
70 70
71 void TouchHudApplication::OnStart() { 71 void TouchHudApplication::OnStart() {
72 aura_init_ = base::MakeUnique<views::AuraInit>( 72 aura_init_ = views::AuraInit::Create(
73 context()->connector(), context()->identity(), "views_mus_resources.pak", 73 context()->connector(), context()->identity(), "views_mus_resources.pak",
74 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); 74 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
75 if (!aura_init_)
76 context()->QuitNow();
75 } 77 }
76 78
77 void TouchHudApplication::OnBindInterface( 79 void TouchHudApplication::OnBindInterface(
78 const service_manager::BindSourceInfo& source_info, 80 const service_manager::BindSourceInfo& source_info,
79 const std::string& interface_name, 81 const std::string& interface_name,
80 mojo::ScopedMessagePipeHandle interface_pipe) { 82 mojo::ScopedMessagePipeHandle interface_pipe) {
81 registry_.BindInterface(source_info, interface_name, 83 registry_.BindInterface(source_info, interface_name,
82 std::move(interface_pipe)); 84 std::move(interface_pipe));
83 } 85 }
84 86
(...skipping 20 matching lines...) Expand all
105 107
106 void TouchHudApplication::Create( 108 void TouchHudApplication::Create(
107 const service_manager::BindSourceInfo& source_info, 109 const service_manager::BindSourceInfo& source_info,
108 mash::mojom::LaunchableRequest request) { 110 mash::mojom::LaunchableRequest request) {
109 binding_.Close(); 111 binding_.Close();
110 binding_.Bind(std::move(request)); 112 binding_.Bind(std::move(request));
111 } 113 }
112 114
113 } // namespace touch_hud 115 } // namespace touch_hud
114 } // namespace ash 116 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager_application.cc ('k') | mash/catalog_viewer/catalog_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698