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

Side by Side Diff: ash/autoclick/mus/autoclick_application.cc

Issue 2435153004: Change Service contract to pass ServiceInfo instead of Identity (Closed)
Patch Set: . Created 4 years, 1 month 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/autoclick/mus/autoclick_application.h ('k') | ash/mus/window_manager_application.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 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/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "services/service_manager/public/cpp/connector.h" 10 #include "services/service_manager/public/cpp/connector.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 AutoclickControllerCommon* autoclick_controller_common_; 68 AutoclickControllerCommon* autoclick_controller_common_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(AutoclickUI); 70 DISALLOW_COPY_AND_ASSIGN(AutoclickUI);
71 }; 71 };
72 72
73 AutoclickApplication::AutoclickApplication() 73 AutoclickApplication::AutoclickApplication()
74 : launchable_binding_(this), autoclick_binding_(this) {} 74 : launchable_binding_(this), autoclick_binding_(this) {}
75 75
76 AutoclickApplication::~AutoclickApplication() {} 76 AutoclickApplication::~AutoclickApplication() {}
77 77
78 void AutoclickApplication::OnStart(const service_manager::Identity& identity) { 78 void AutoclickApplication::OnStart(const service_manager::ServiceInfo& info) {
79 aura_init_.reset(new views::AuraInit(connector(), "views_mus_resources.pak")); 79 aura_init_.reset(new views::AuraInit(connector(), "views_mus_resources.pak"));
80 window_manager_connection_ = 80 window_manager_connection_ =
81 views::WindowManagerConnection::Create(connector(), identity); 81 views::WindowManagerConnection::Create(connector(), info.identity);
82 autoclick_controller_common_.reset(new AutoclickControllerCommon( 82 autoclick_controller_common_.reset(new AutoclickControllerCommon(
83 base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this)); 83 base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this));
84 } 84 }
85 85
86 bool AutoclickApplication::OnConnect( 86 bool AutoclickApplication::OnConnect(
87 const service_manager::Identity& remote_identity, 87 const service_manager::ServiceInfo& remote_info,
88 service_manager::InterfaceRegistry* registry) { 88 service_manager::InterfaceRegistry* registry) {
89 registry->AddInterface<mash::mojom::Launchable>(this); 89 registry->AddInterface<mash::mojom::Launchable>(this);
90 registry->AddInterface<mojom::AutoclickController>(this); 90 registry->AddInterface<mojom::AutoclickController>(this);
91 return true; 91 return true;
92 } 92 }
93 93
94 void AutoclickApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) { 94 void AutoclickApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) {
95 if (!widget_) { 95 if (!widget_) {
96 widget_.reset(new views::Widget); 96 widget_.reset(new views::Widget);
97 views::Widget::InitParams params( 97 views::Widget::InitParams params(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // TODO(riajiang): Currently not working. Need to know how to generate events 156 // TODO(riajiang): Currently not working. Need to know how to generate events
157 // in mus world (crbug.com/628665). 157 // in mus world (crbug.com/628665).
158 } 158 }
159 159
160 void AutoclickApplication::OnAutoclickCanceled() { 160 void AutoclickApplication::OnAutoclickCanceled() {
161 // Not used in mus. 161 // Not used in mus.
162 } 162 }
163 163
164 } // namespace autoclick 164 } // namespace autoclick
165 } // namespace ash 165 } // namespace ash
OLDNEW
« no previous file with comments | « ash/autoclick/mus/autoclick_application.h ('k') | ash/mus/window_manager_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698