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

Side by Side Diff: ash/autoclick/mus/autoclick_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 | « no previous file | ash/mus/window_manager_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 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/autoclick/mus/autoclick_application.h" 5 #include "ash/autoclick/mus/autoclick_application.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 registry_.AddInterface<mash::mojom::Launchable>(base::Bind( 83 registry_.AddInterface<mash::mojom::Launchable>(base::Bind(
84 &AutoclickApplication::BindLaunchableRequest, base::Unretained(this))); 84 &AutoclickApplication::BindLaunchableRequest, base::Unretained(this)));
85 registry_.AddInterface<mojom::AutoclickController>( 85 registry_.AddInterface<mojom::AutoclickController>(
86 base::Bind(&AutoclickApplication::BindAutoclickControllerRequest, 86 base::Bind(&AutoclickApplication::BindAutoclickControllerRequest,
87 base::Unretained(this))); 87 base::Unretained(this)));
88 } 88 }
89 89
90 AutoclickApplication::~AutoclickApplication() {} 90 AutoclickApplication::~AutoclickApplication() {}
91 91
92 void AutoclickApplication::OnStart() { 92 void AutoclickApplication::OnStart() {
93 aura_init_ = base::MakeUnique<views::AuraInit>( 93 aura_init_ = views::AuraInit::Create(
94 context()->connector(), context()->identity(), "views_mus_resources.pak", 94 context()->connector(), context()->identity(), "views_mus_resources.pak",
95 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); 95 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
96 if (!aura_init_) {
97 context()->QuitNow();
98 return;
99 }
96 autoclick_controller_common_.reset(new AutoclickControllerCommon( 100 autoclick_controller_common_.reset(new AutoclickControllerCommon(
97 base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this)); 101 base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this));
98 } 102 }
99 103
100 void AutoclickApplication::OnBindInterface( 104 void AutoclickApplication::OnBindInterface(
101 const service_manager::BindSourceInfo& remote_info, 105 const service_manager::BindSourceInfo& remote_info,
102 const std::string& interface_name, 106 const std::string& interface_name,
103 mojo::ScopedMessagePipeHandle interface_pipe) { 107 mojo::ScopedMessagePipeHandle interface_pipe) {
104 registry_.BindInterface(remote_info, interface_name, 108 registry_.BindInterface(remote_info, interface_name,
105 std::move(interface_pipe)); 109 std::move(interface_pipe));
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // TODO(riajiang): Currently not working. Need to know how to generate events 166 // TODO(riajiang): Currently not working. Need to know how to generate events
163 // in mus world (crbug.com/628665). 167 // in mus world (crbug.com/628665).
164 } 168 }
165 169
166 void AutoclickApplication::OnAutoclickCanceled() { 170 void AutoclickApplication::OnAutoclickCanceled() {
167 // Not used in mus. 171 // Not used in mus.
168 } 172 }
169 173
170 } // namespace autoclick 174 } // namespace autoclick
171 } // namespace ash 175 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/mus/window_manager_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698