| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/app/mash/mash_runner.h" | 5 #include "chrome/app/mash/mash_runner.h" |
| 6 | 6 |
| 7 #include "ash/mus/window_manager_application.h" | 7 #include "ash/mus/window_manager_application.h" |
| 8 #include "ash/sysui/sysui_application.h" | 8 #include "ash/sysui/sysui_application.h" |
| 9 #include "ash/touch_hud/mus/touch_hud_application.h" | 9 #include "ash/touch_hud/mus/touch_hud_application.h" |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 DefaultService() {} | 52 DefaultService() {} |
| 53 ~DefaultService() override {} | 53 ~DefaultService() override {} |
| 54 | 54 |
| 55 // shell::Service: | 55 // shell::Service: |
| 56 bool OnConnect(shell::Connection* connection) override { | 56 bool OnConnect(shell::Connection* connection) override { |
| 57 connection->AddInterface<ServiceFactory>(this); | 57 connection->AddInterface<ServiceFactory>(this); |
| 58 return true; | 58 return true; |
| 59 } | 59 } |
| 60 | 60 |
| 61 // shell::InterfaceFactory<ServiceFactory> | 61 // shell::InterfaceFactory<ServiceFactory> |
| 62 void Create(shell::Connection* connection, | 62 void Create(const shell::Identity& remote_identity, |
| 63 mojo::InterfaceRequest<ServiceFactory> request) override { | 63 mojo::InterfaceRequest<ServiceFactory> request) override { |
| 64 service_factory_bindings_.AddBinding(this, std::move(request)); | 64 service_factory_bindings_.AddBinding(this, std::move(request)); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // ServiceFactory: | 67 // ServiceFactory: |
| 68 void CreateService(shell::mojom::ServiceRequest request, | 68 void CreateService(shell::mojom::ServiceRequest request, |
| 69 const mojo::String& mojo_name) override { | 69 const mojo::String& mojo_name) override { |
| 70 if (service_) { | 70 if (service_) { |
| 71 LOG(ERROR) << "request to create additional service " << mojo_name; | 71 LOG(ERROR) << "request to create additional service " << mojo_name; |
| 72 return; | 72 return; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 std::unique_ptr<base::MessageLoop> message_loop; | 231 std::unique_ptr<base::MessageLoop> message_loop; |
| 232 #if defined(OS_LINUX) | 232 #if defined(OS_LINUX) |
| 233 base::AtExitManager exit_manager; | 233 base::AtExitManager exit_manager; |
| 234 #endif | 234 #endif |
| 235 if (!IsChild()) | 235 if (!IsChild()) |
| 236 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); | 236 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
| 237 MashRunner mash_runner; | 237 MashRunner mash_runner; |
| 238 mash_runner.Run(); | 238 mash_runner.Run(); |
| 239 return 0; | 239 return 0; |
| 240 } | 240 } |
| OLD | NEW |