| 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 <memory> | 5 #include <memory> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "mash/public/interfaces/launchable.mojom.h" | 10 #include "mash/public/interfaces/launchable.mojom.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // service_manager::Service: | 35 // service_manager::Service: |
| 36 void OnStart() override { | 36 void OnStart() override { |
| 37 tracing_.Initialize(context()->connector(), context()->identity().name()); | 37 tracing_.Initialize(context()->connector(), context()->identity().name()); |
| 38 aura_init_ = base::MakeUnique<views::AuraInit>( | 38 aura_init_ = base::MakeUnique<views::AuraInit>( |
| 39 context()->connector(), context()->identity(), | 39 context()->connector(), context()->identity(), |
| 40 "views_mus_resources.pak", std::string(), nullptr, | 40 "views_mus_resources.pak", std::string(), nullptr, |
| 41 views::AuraInit::Mode::AURA_MUS); | 41 views::AuraInit::Mode::AURA_MUS); |
| 42 } | 42 } |
| 43 void OnBindInterface(const service_manager::ServiceInfo& source_info, | 43 void OnBindInterface(const service_manager::BindSourceInfo& source_info, |
| 44 const std::string& interface_name, | 44 const std::string& interface_name, |
| 45 mojo::ScopedMessagePipeHandle interface_pipe) override { | 45 mojo::ScopedMessagePipeHandle interface_pipe) override { |
| 46 registry_.BindInterface(source_info.identity, interface_name, | 46 registry_.BindInterface(source_info.identity, interface_name, |
| 47 std::move(interface_pipe)); | 47 std::move(interface_pipe)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 // mash::mojom::Launchable: | 50 // mash::mojom::Launchable: |
| 51 void Launch(uint32_t what, mash::mojom::LaunchMode how) override { | 51 void Launch(uint32_t what, mash::mojom::LaunchMode how) override { |
| 52 views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE); | 52 views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE); |
| 53 } | 53 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 65 tracing::Provider tracing_; | 65 tracing::Provider tracing_; |
| 66 std::unique_ptr<views::AuraInit> aura_init_; | 66 std::unique_ptr<views::AuraInit> aura_init_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(ViewsExamples); | 68 DISALLOW_COPY_AND_ASSIGN(ViewsExamples); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 MojoResult ServiceMain(MojoHandle service_request_handle) { | 71 MojoResult ServiceMain(MojoHandle service_request_handle) { |
| 72 return service_manager::ServiceRunner(new ViewsExamples) | 72 return service_manager::ServiceRunner(new ViewsExamples) |
| 73 .Run(service_request_handle); | 73 .Run(service_request_handle); |
| 74 } | 74 } |
| OLD | NEW |