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

Side by Side Diff: ash/touch_hud/mus/touch_hud_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/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_ = views::AuraInit::Create( 72 aura_init_ = base::MakeUnique<views::AuraInit>(
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();
77 } 75 }
78 76
79 void TouchHudApplication::OnBindInterface( 77 void TouchHudApplication::OnBindInterface(
80 const service_manager::BindSourceInfo& source_info, 78 const service_manager::BindSourceInfo& source_info,
81 const std::string& interface_name, 79 const std::string& interface_name,
82 mojo::ScopedMessagePipeHandle interface_pipe) { 80 mojo::ScopedMessagePipeHandle interface_pipe) {
83 registry_.BindInterface(source_info, interface_name, 81 registry_.BindInterface(source_info, interface_name,
84 std::move(interface_pipe)); 82 std::move(interface_pipe));
85 } 83 }
86 84
(...skipping 20 matching lines...) Expand all
107 105
108 void TouchHudApplication::Create( 106 void TouchHudApplication::Create(
109 const service_manager::BindSourceInfo& source_info, 107 const service_manager::BindSourceInfo& source_info,
110 mash::mojom::LaunchableRequest request) { 108 mash::mojom::LaunchableRequest request) {
111 binding_.Close(); 109 binding_.Close();
112 binding_.Bind(std::move(request)); 110 binding_.Bind(std::move(request));
113 } 111 }
114 112
115 } // namespace touch_hud 113 } // namespace touch_hud
116 } // namespace ash 114 } // 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