| 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/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::kBrowserServiceName); | 27 context()->connector()->Connect(content::mojom::kPackagedServicesServiceName); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void Session::StartWindowManager() { | 30 void Session::StartWindowManager() { |
| 31 // TODO(beng): monitor this service for death & bring down the whole system | 31 // TODO(beng): monitor this service for death & bring down the whole system |
| 32 // if necessary. | 32 // if necessary. |
| 33 context()->connector()->Connect(common::GetWindowManagerServiceName()); | 33 context()->connector()->Connect(common::GetWindowManagerServiceName()); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void Session::StartQuickLaunch() { | 36 void Session::StartQuickLaunch() { |
| 37 // TODO(beng): monitor this service for death & bring down the whole system | 37 // TODO(beng): monitor this service for death & bring down the whole system |
| 38 // if necessary. | 38 // if necessary. |
| 39 context()->connector()->Connect(quick_launch::mojom::kServiceName); | 39 context()->connector()->Connect(quick_launch::mojom::kServiceName); |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // namespace session | 42 } // namespace session |
| 43 } // namespace main | 43 } // namespace main |
| OLD | NEW |