| 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" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 Session::~Session() {} | 32 Session::~Session() {} |
| 33 | 33 |
| 34 void Session::OnStart() { | 34 void Session::OnStart() { |
| 35 StartWindowManager(); | 35 StartWindowManager(); |
| 36 StartQuickLaunch(); | 36 StartQuickLaunch(); |
| 37 | 37 |
| 38 // Launch a chrome window for dev convience; don't do this in the long term. | 38 // Launch a chrome window for dev convience; don't do this in the long term. |
| 39 context()->connector()->Connect(content::mojom::kBrowserServiceName); | 39 context()->connector()->Connect(content::mojom::kBrowserServiceName); |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool Session::OnConnect(const service_manager::ServiceInfo& remote_info, | |
| 43 service_manager::InterfaceRegistry* registry) { | |
| 44 return true; | |
| 45 } | |
| 46 | |
| 47 void Session::StartWindowManager() { | 42 void Session::StartWindowManager() { |
| 48 StartRestartableService( | 43 StartRestartableService( |
| 49 common::GetWindowManagerServiceName(), | 44 common::GetWindowManagerServiceName(), |
| 50 base::Bind(&Session::StartWindowManager, | 45 base::Bind(&Session::StartWindowManager, |
| 51 base::Unretained(this))); | 46 base::Unretained(this))); |
| 52 } | 47 } |
| 53 | 48 |
| 54 void Session::StartQuickLaunch() { | 49 void Session::StartQuickLaunch() { |
| 55 StartRestartableService( | 50 StartRestartableService( |
| 56 quick_launch::mojom::kServiceName, | 51 quick_launch::mojom::kServiceName, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 69 // manager. | 64 // manager. |
| 70 if (connection) { | 65 if (connection) { |
| 71 connection->SetConnectionLostClosure( | 66 connection->SetConnectionLostClosure( |
| 72 base::Bind(&LogAndCallServiceRestartCallback, url, restart_callback)); | 67 base::Bind(&LogAndCallServiceRestartCallback, url, restart_callback)); |
| 73 connections_[url] = std::move(connection); | 68 connections_[url] = std::move(connection); |
| 74 } | 69 } |
| 75 } | 70 } |
| 76 | 71 |
| 77 } // namespace session | 72 } // namespace session |
| 78 } // namespace main | 73 } // namespace main |
| OLD | NEW |