| 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 #ifndef MASH_BROWSER_BROWSER_H_ | 5 #ifndef MASH_BROWSER_BROWSER_H_ |
| 6 #define MASH_BROWSER_BROWSER_H_ | 6 #define MASH_BROWSER_BROWSER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "mash/public/interfaces/launchable.mojom.h" | 11 #include "mash/public/interfaces/launchable.mojom.h" |
| 12 #include "mojo/public/cpp/bindings/binding_set.h" | 12 #include "mojo/public/cpp/bindings/binding_set.h" |
| 13 #include "services/service_manager/public/cpp/binder_registry.h" |
| 13 #include "services/service_manager/public/cpp/interface_factory.h" | 14 #include "services/service_manager/public/cpp/interface_factory.h" |
| 14 #include "services/service_manager/public/cpp/service.h" | 15 #include "services/service_manager/public/cpp/service.h" |
| 15 #include "services/tracing/public/cpp/provider.h" | 16 #include "services/tracing/public/cpp/provider.h" |
| 16 | 17 |
| 17 namespace navigation { | 18 namespace navigation { |
| 18 class View; | 19 class View; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace views { | 22 namespace views { |
| 22 class AuraInit; | 23 class AuraInit; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 37 // browser windows, the application terminates. The Browser object does not | 38 // browser windows, the application terminates. The Browser object does not |
| 38 // own these widgets. | 39 // own these widgets. |
| 39 void AddWindow(views::Widget* window); | 40 void AddWindow(views::Widget* window); |
| 40 void RemoveWindow(views::Widget* window); | 41 void RemoveWindow(views::Widget* window); |
| 41 | 42 |
| 42 std::unique_ptr<navigation::View> CreateView(); | 43 std::unique_ptr<navigation::View> CreateView(); |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 // service_manager::Service: | 46 // service_manager::Service: |
| 46 void OnStart() override; | 47 void OnStart() override; |
| 47 bool OnConnect(const service_manager::ServiceInfo& remote_info, | 48 void OnBindInterface(const service_manager::ServiceInfo& source_info, |
| 48 service_manager::InterfaceRegistry* registry) override; | 49 const std::string& interface_name, |
| 50 mojo::ScopedMessagePipeHandle interface_pipe) override; |
| 49 | 51 |
| 50 // mojom::Launchable: | 52 // mojom::Launchable: |
| 51 void Launch(uint32_t what, mojom::LaunchMode how) override; | 53 void Launch(uint32_t what, mojom::LaunchMode how) override; |
| 52 | 54 |
| 53 // service_manager::InterfaceFactory<mojom::Launchable>: | 55 // service_manager::InterfaceFactory<mojom::Launchable>: |
| 54 void Create(const service_manager::Identity& remote_identity, | 56 void Create(const service_manager::Identity& remote_identity, |
| 55 mojom::LaunchableRequest request) override; | 57 mojom::LaunchableRequest request) override; |
| 56 | 58 |
| 57 mojo::BindingSet<mojom::Launchable> bindings_; | 59 mojo::BindingSet<mojom::Launchable> bindings_; |
| 58 std::vector<views::Widget*> windows_; | 60 std::vector<views::Widget*> windows_; |
| 59 | 61 |
| 62 service_manager::BinderRegistry registry_; |
| 63 |
| 60 tracing::Provider tracing_; | 64 tracing::Provider tracing_; |
| 61 std::unique_ptr<views::AuraInit> aura_init_; | 65 std::unique_ptr<views::AuraInit> aura_init_; |
| 62 | 66 |
| 63 DISALLOW_COPY_AND_ASSIGN(Browser); | 67 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 64 }; | 68 }; |
| 65 | 69 |
| 66 } // namespace browser | 70 } // namespace browser |
| 67 } // namespace mash | 71 } // namespace mash |
| 68 | 72 |
| 69 #endif // MASH_BROWSER_BROWSER_H_ | 73 #endif // MASH_BROWSER_BROWSER_H_ |
| OLD | NEW |