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 virtual ~Internals(); | 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 | 30 |
31 mojo::Handle TakeServicesProvidedByEmbedder(); | 31 mojo::Handle TakeServicesProvidedByEmbedder(); |
32 | 32 |
33 private: | 33 private: |
34 explicit Internals(mojo::ServiceProviderPtr platform_service_provider); | 34 explicit Internals(mojo::ServiceProviderPtr platform_service_provider); |
35 | 35 |
36 // |mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker>| implementation: | 36 // |mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker>| implementation: |
37 void Create( | 37 void Create( |
38 mojo::ApplicationConnection* connection, | 38 mojo::ApplicationConnection* connection, |
39 mojo::InterfaceRequest<mojo::asset_bundle::AssetUnpacker>) override; | 39 mojo::InterfaceRequest<mojo::asset_bundle::AssetUnpacker>) override; |
40 | 40 |
41 mojo::ServiceProviderPtr service_provider_; | 41 mojo::ServiceProviderPtr service_provider_; |
42 mojo::ServiceProviderImpl service_provider_impl_; | 42 mojo::ServiceProviderImpl service_provider_impl_; |
43 mojo::ServiceProviderPtr platform_service_provider_; | 43 mojo::ServiceProviderPtr platform_service_provider_; |
44 | 44 |
45 MOJO_DISALLOW_COPY_AND_ASSIGN(Internals); | 45 MOJO_DISALLOW_COPY_AND_ASSIGN(Internals); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace shell | 48 } // namespace shell |
49 } // namespace sky | 49 } // namespace sky |
50 | 50 |
51 #endif // SKY_SHELL_UI_INTERNALS_H_ | 51 #endif // SKY_SHELL_UI_INTERNALS_H_ |
OLD | NEW |