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

Side by Side Diff: mash/init/init.cc

Issue 2503063003: Add service name constant for UI service. (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 | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc ('k') | mash/login/login.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 "mash/init/init.h" 5 #include "mash/init/init.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "mash/login/public/interfaces/login.mojom.h" 10 #include "mash/login/public/interfaces/login.mojom.h"
11 #include "services/service_manager/public/cpp/connection.h" 11 #include "services/service_manager/public/cpp/connection.h"
12 #include "services/service_manager/public/cpp/connector.h" 12 #include "services/service_manager/public/cpp/connector.h"
13 #include "services/service_manager/public/cpp/interface_registry.h" 13 #include "services/service_manager/public/cpp/interface_registry.h"
14 #include "services/service_manager/public/cpp/service_context.h" 14 #include "services/service_manager/public/cpp/service_context.h"
15 #include "services/ui/public/interfaces/constants.mojom.h"
15 16
16 namespace mash { 17 namespace mash {
17 namespace init { 18 namespace init {
18 19
19 Init::Init() {} 20 Init::Init() {}
20 Init::~Init() {} 21 Init::~Init() {}
21 22
22 void Init::OnStart() { 23 void Init::OnStart() {
23 context()->connector()->Connect("ui"); 24 context()->connector()->Connect(ui::mojom::kServiceName);
24 StartTracing(); 25 StartTracing();
25 StartLogin(); 26 StartLogin();
26 } 27 }
27 28
28 bool Init::OnConnect(const service_manager::ServiceInfo& remote_info, 29 bool Init::OnConnect(const service_manager::ServiceInfo& remote_info,
29 service_manager::InterfaceRegistry* registry) { 30 service_manager::InterfaceRegistry* registry) {
30 registry->AddInterface<mojom::Init>(this); 31 registry->AddInterface<mojom::Init>(this);
31 return true; 32 return true;
32 } 33 }
33 34
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 67
67 void Init::StartLogin() { 68 void Init::StartLogin() {
68 login_connection_ = context()->connector()->Connect("login"); 69 login_connection_ = context()->connector()->Connect("login");
69 mash::login::mojom::LoginPtr login; 70 mash::login::mojom::LoginPtr login;
70 login_connection_->GetInterface(&login); 71 login_connection_->GetInterface(&login);
71 login->ShowLoginUI(); 72 login->ShowLoginUI();
72 } 73 }
73 74
74 } // namespace init 75 } // namespace init
75 } // namespace main 76 } // namespace main
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc ('k') | mash/login/login.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698