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

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

Issue 2511233002: Add the beginning of a simple window manager that we'll support on Windows. (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
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 "mash/common/config.h"
10 #include "mash/login/public/interfaces/login.mojom.h" 11 #include "mash/login/public/interfaces/login.mojom.h"
11 #include "services/service_manager/public/cpp/connection.h" 12 #include "services/service_manager/public/cpp/connection.h"
12 #include "services/service_manager/public/cpp/connector.h" 13 #include "services/service_manager/public/cpp/connector.h"
13 #include "services/service_manager/public/cpp/interface_registry.h" 14 #include "services/service_manager/public/cpp/interface_registry.h"
14 #include "services/service_manager/public/cpp/service_context.h" 15 #include "services/service_manager/public/cpp/service_context.h"
15 16
16 namespace { 17 namespace {
17 18
18 void LogAndCallServiceRestartCallback(const std::string& url, 19 void LogAndCallServiceRestartCallback(const std::string& url,
19 const base::Closure& callback) { 20 const base::Closure& callback) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 StopScreenlock(); 87 StopScreenlock();
87 } 88 }
88 89
89 void Session::Create(const service_manager::Identity& remote_identity, 90 void Session::Create(const service_manager::Identity& remote_identity,
90 mojom::SessionRequest request) { 91 mojom::SessionRequest request) {
91 bindings_.AddBinding(this, std::move(request)); 92 bindings_.AddBinding(this, std::move(request));
92 } 93 }
93 94
94 void Session::StartWindowManager() { 95 void Session::StartWindowManager() {
95 StartRestartableService( 96 StartRestartableService(
96 "ash", 97 common::GetWindowManagerServiceName(),
97 base::Bind(&Session::StartWindowManager, 98 base::Bind(&Session::StartWindowManager,
98 base::Unretained(this))); 99 base::Unretained(this)));
99 } 100 }
100 101
101 void Session::StartQuickLaunch() { 102 void Session::StartQuickLaunch() {
102 StartRestartableService( 103 StartRestartableService(
103 "quick_launch", 104 "quick_launch",
104 base::Bind(&Session::StartQuickLaunch, 105 base::Bind(&Session::StartQuickLaunch,
105 base::Unretained(this))); 106 base::Unretained(this)));
106 } 107 }
(...skipping 22 matching lines...) Expand all
129 // manager. 130 // manager.
130 if (connection) { 131 if (connection) {
131 connection->SetConnectionLostClosure( 132 connection->SetConnectionLostClosure(
132 base::Bind(&LogAndCallServiceRestartCallback, url, restart_callback)); 133 base::Bind(&LogAndCallServiceRestartCallback, url, restart_callback));
133 connections_[url] = std::move(connection); 134 connections_[url] = std::move(connection);
134 } 135 }
135 } 136 }
136 137
137 } // namespace session 138 } // namespace session
138 } // namespace main 139 } // namespace main
OLDNEW
« no previous file with comments | « mash/session/BUILD.gn ('k') | mash/wm/BUILD.gn » ('j') | mash/wm/wm.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698