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

Side by Side Diff: ash/autoclick/mus/autoclick_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 | « 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_ = views::AuraInit::Create( 93 aura_init_ = base::MakeUnique<views::AuraInit>(
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 }
100 autoclick_controller_common_.reset(new AutoclickControllerCommon( 96 autoclick_controller_common_.reset(new AutoclickControllerCommon(
101 base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this)); 97 base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this));
102 } 98 }
103 99
104 void AutoclickApplication::OnBindInterface( 100 void AutoclickApplication::OnBindInterface(
105 const service_manager::BindSourceInfo& remote_info, 101 const service_manager::BindSourceInfo& remote_info,
106 const std::string& interface_name, 102 const std::string& interface_name,
107 mojo::ScopedMessagePipeHandle interface_pipe) { 103 mojo::ScopedMessagePipeHandle interface_pipe) {
108 registry_.BindInterface(remote_info, interface_name, 104 registry_.BindInterface(remote_info, interface_name,
109 std::move(interface_pipe)); 105 std::move(interface_pipe));
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // TODO(riajiang): Currently not working. Need to know how to generate events 162 // TODO(riajiang): Currently not working. Need to know how to generate events
167 // in mus world (crbug.com/628665). 163 // in mus world (crbug.com/628665).
168 } 164 }
169 165
170 void AutoclickApplication::OnAutoclickCanceled() { 166 void AutoclickApplication::OnAutoclickCanceled() {
171 // Not used in mus. 167 // Not used in mus.
172 } 168 }
173 169
174 } // namespace autoclick 170 } // namespace autoclick
175 } // namespace ash 171 } // 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