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

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

Issue 2804373002: Eliminate Connector::Connect(), Connection, etc. (Closed)
Patch Set: . Created 3 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/session/session.h" 5 #include "mash/session/session.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/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "content/public/common/service_names.mojom.h" 10 #include "content/public/common/service_names.mojom.h"
11 #include "mash/common/config.h" 11 #include "mash/common/config.h"
12 #include "mash/quick_launch/public/interfaces/constants.mojom.h" 12 #include "mash/quick_launch/public/interfaces/constants.mojom.h"
13 #include "services/service_manager/public/cpp/connector.h" 13 #include "services/service_manager/public/cpp/connector.h"
14 #include "services/service_manager/public/cpp/service_context.h" 14 #include "services/service_manager/public/cpp/service_context.h"
15 15
16 namespace mash { 16 namespace mash {
17 namespace session { 17 namespace session {
18 18
19 Session::Session() {} 19 Session::Session() {}
20 Session::~Session() {} 20 Session::~Session() {}
21 21
22 void Session::OnStart() { 22 void Session::OnStart() {
23 StartWindowManager(); 23 StartWindowManager();
24 StartQuickLaunch(); 24 StartQuickLaunch();
25 25
26 // Launch a chrome window for dev convience; don't do this in the long term. 26 // Launch a chrome window for dev convience; don't do this in the long term.
27 context()->connector()->Connect(content::mojom::kPackagedServicesServiceName); 27 context()->connector()->StartService(
28 content::mojom::kPackagedServicesServiceName);
28 } 29 }
29 30
30 void Session::StartWindowManager() { 31 void Session::StartWindowManager() {
31 // TODO(beng): monitor this service for death & bring down the whole system 32 // TODO(beng): monitor this service for death & bring down the whole system
32 // if necessary. 33 // if necessary.
33 context()->connector()->Connect(common::GetWindowManagerServiceName()); 34 context()->connector()->StartService(common::GetWindowManagerServiceName());
34 } 35 }
35 36
36 void Session::StartQuickLaunch() { 37 void Session::StartQuickLaunch() {
37 // TODO(beng): monitor this service for death & bring down the whole system 38 // TODO(beng): monitor this service for death & bring down the whole system
38 // if necessary. 39 // if necessary.
39 context()->connector()->Connect(quick_launch::mojom::kServiceName); 40 context()->connector()->StartService(quick_launch::mojom::kServiceName);
40 } 41 }
41 42
42 } // namespace session 43 } // namespace session
43 } // namespace main 44 } // namespace main
OLDNEW
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.cc ('k') | mash/task_viewer/task_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698