| OLD | NEW |
| 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/login/public/interfaces/constants.mojom.h" | 12 #include "mash/login/public/interfaces/constants.mojom.h" |
| 12 #include "mash/login/public/interfaces/login.mojom.h" | 13 #include "mash/login/public/interfaces/login.mojom.h" |
| 13 #include "mash/quick_launch/public/interfaces/constants.mojom.h" | 14 #include "mash/quick_launch/public/interfaces/constants.mojom.h" |
| 14 #include "mash/screenlock/public/interfaces/constants.mojom.h" | 15 #include "mash/screenlock/public/interfaces/constants.mojom.h" |
| 15 #include "services/service_manager/public/cpp/connection.h" | 16 #include "services/service_manager/public/cpp/connection.h" |
| 16 #include "services/service_manager/public/cpp/connector.h" | 17 #include "services/service_manager/public/cpp/connector.h" |
| 17 #include "services/service_manager/public/cpp/interface_registry.h" | 18 #include "services/service_manager/public/cpp/interface_registry.h" |
| 18 #include "services/service_manager/public/cpp/service_context.h" | 19 #include "services/service_manager/public/cpp/service_context.h" |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 StopScreenlock(); | 93 StopScreenlock(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 void Session::Create(const service_manager::Identity& remote_identity, | 96 void Session::Create(const service_manager::Identity& remote_identity, |
| 96 mojom::SessionRequest request) { | 97 mojom::SessionRequest request) { |
| 97 bindings_.AddBinding(this, std::move(request)); | 98 bindings_.AddBinding(this, std::move(request)); |
| 98 } | 99 } |
| 99 | 100 |
| 100 void Session::StartWindowManager() { | 101 void Session::StartWindowManager() { |
| 101 StartRestartableService( | 102 StartRestartableService( |
| 102 "ash", | 103 common::GetWindowManagerServiceName(), |
| 103 base::Bind(&Session::StartWindowManager, | 104 base::Bind(&Session::StartWindowManager, |
| 104 base::Unretained(this))); | 105 base::Unretained(this))); |
| 105 } | 106 } |
| 106 | 107 |
| 107 void Session::StartQuickLaunch() { | 108 void Session::StartQuickLaunch() { |
| 108 StartRestartableService( | 109 StartRestartableService( |
| 109 quick_launch::mojom::kServiceName, | 110 quick_launch::mojom::kServiceName, |
| 110 base::Bind(&Session::StartQuickLaunch, | 111 base::Bind(&Session::StartQuickLaunch, |
| 111 base::Unretained(this))); | 112 base::Unretained(this))); |
| 112 } | 113 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 135 // manager. | 136 // manager. |
| 136 if (connection) { | 137 if (connection) { |
| 137 connection->SetConnectionLostClosure( | 138 connection->SetConnectionLostClosure( |
| 138 base::Bind(&LogAndCallServiceRestartCallback, url, restart_callback)); | 139 base::Bind(&LogAndCallServiceRestartCallback, url, restart_callback)); |
| 139 connections_[url] = std::move(connection); | 140 connections_[url] = std::move(connection); |
| 140 } | 141 } |
| 141 } | 142 } |
| 142 | 143 |
| 143 } // namespace session | 144 } // namespace session |
| 144 } // namespace main | 145 } // namespace main |
| OLD | NEW |