| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SKY_SHELL_UI_INTERNALS_H_ | 5 #ifndef SKY_SHELL_UI_INTERNALS_H_ |
| 6 #define SKY_SHELL_UI_INTERNALS_H_ | 6 #define SKY_SHELL_UI_INTERNALS_H_ |
| 7 | 7 |
| 8 #include "base/supports_user_data.h" | 8 #include "base/supports_user_data.h" |
| 9 #include "dart/runtime/include/dart_api.h" | 9 #include "dart/runtime/include/dart_api.h" |
| 10 #include "mojo/public/cpp/application/interface_factory.h" | 10 #include "mojo/public/cpp/application/interface_factory.h" |
| 11 #include "mojo/public/cpp/application/service_provider_impl.h" | 11 #include "mojo/public/cpp/application/service_provider_impl.h" |
| 12 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 12 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
| 13 #include "mojo/services/asset_bundle/public/interfaces/asset_bundle.mojom.h" | 13 #include "mojo/services/asset_bundle/public/interfaces/asset_bundle.mojom.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 class ApplicationConnection; | 16 class ApplicationConnection; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace sky { | 19 namespace sky { |
| 20 namespace shell { | 20 namespace shell { |
| 21 | 21 |
| 22 class Internals | 22 class Internals |
| 23 : public base::SupportsUserData::Data, | 23 : public base::SupportsUserData::Data, |
| 24 public mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker> { | 24 public mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker> { |
| 25 public: | 25 public: |
| 26 ~Internals() override; | 26 ~Internals() override; |
| 27 | 27 |
| 28 static void Create(Dart_Isolate isolate, | 28 static void Create(Dart_Isolate isolate, |
| 29 mojo::ServiceProviderPtr platform_service_provider); | 29 mojo::ServiceProviderPtr platform_service_provider, |
| 30 mojo::asset_bundle::AssetBundlePtr root_bundle); |
| 30 | 31 |
| 31 mojo::Handle TakeServicesProvidedByEmbedder(); | 32 mojo::Handle TakeServicesProvidedByEmbedder(); |
| 33 mojo::Handle TakeRootBundleHandle(); |
| 32 | 34 |
| 33 private: | 35 private: |
| 34 explicit Internals(mojo::ServiceProviderPtr platform_service_provider); | 36 explicit Internals(mojo::ServiceProviderPtr platform_service_provider, |
| 37 mojo::asset_bundle::AssetBundlePtr root_bundle); |
| 35 | 38 |
| 36 // |mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker>| implementation: | 39 // |mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker>| implementation: |
| 37 void Create( | 40 void Create( |
| 38 mojo::ApplicationConnection* connection, | 41 mojo::ApplicationConnection* connection, |
| 39 mojo::InterfaceRequest<mojo::asset_bundle::AssetUnpacker>) override; | 42 mojo::InterfaceRequest<mojo::asset_bundle::AssetUnpacker>) override; |
| 40 | 43 |
| 44 mojo::asset_bundle::AssetBundlePtr root_bundle_; |
| 41 mojo::ServiceProviderPtr service_provider_; | 45 mojo::ServiceProviderPtr service_provider_; |
| 42 mojo::ServiceProviderImpl service_provider_impl_; | 46 mojo::ServiceProviderImpl service_provider_impl_; |
| 43 mojo::ServiceProviderPtr platform_service_provider_; | 47 mojo::ServiceProviderPtr platform_service_provider_; |
| 44 | 48 |
| 45 MOJO_DISALLOW_COPY_AND_ASSIGN(Internals); | 49 MOJO_DISALLOW_COPY_AND_ASSIGN(Internals); |
| 46 }; | 50 }; |
| 47 | 51 |
| 48 } // namespace shell | 52 } // namespace shell |
| 49 } // namespace sky | 53 } // namespace sky |
| 50 | 54 |
| 51 #endif // SKY_SHELL_UI_INTERNALS_H_ | 55 #endif // SKY_SHELL_UI_INTERNALS_H_ |
| OLD | NEW |