Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: sky/shell/ui/internals.h

Issue 1193763004: Expose the asset_bundle service in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Update for API change Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "mojo/public/cpp/application/service_provider_impl.h"
10 #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"
14
15 namespace mojo {
16 class ApplicationConnection;
17 }
11 18
12 namespace sky { 19 namespace sky {
13 namespace shell { 20 namespace shell {
14 21
15 class Internals : public base::SupportsUserData::Data { 22 class Internals
23 : public base::SupportsUserData::Data,
24 public mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker> {
16 public: 25 public:
17 virtual ~Internals(); 26 virtual ~Internals();
18 27
19 static void Create(Dart_Isolate isolate, 28 static void Create(Dart_Isolate isolate,
20 mojo::ServiceProviderPtr service_provider); 29 mojo::ServiceProviderPtr platform_service_provider);
21 30
22 mojo::Handle TakeServicesProvidedByEmbedder(); 31 mojo::Handle TakeServicesProvidedByEmbedder();
23 32
24 private: 33 private:
25 explicit Internals(mojo::ServiceProviderPtr service_provider); 34 explicit Internals(mojo::ServiceProviderPtr platform_service_provider);
35
36 // |mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker>| implementation:
37 void Create(
38 mojo::ApplicationConnection* connection,
39 mojo::InterfaceRequest<mojo::asset_bundle::AssetUnpacker>) override;
26 40
27 mojo::ServiceProviderPtr service_provider_; 41 mojo::ServiceProviderPtr service_provider_;
42 mojo::ServiceProviderImpl service_provider_impl_;
43 mojo::ServiceProviderPtr platform_service_provider_;
28 44
29 MOJO_DISALLOW_COPY_AND_ASSIGN(Internals); 45 MOJO_DISALLOW_COPY_AND_ASSIGN(Internals);
30 }; 46 };
31 47
32 } // namespace shell 48 } // namespace shell
33 } // namespace sky 49 } // namespace sky
34 50
35 #endif // SKY_SHELL_UI_INTERNALS_H_ 51 #endif // SKY_SHELL_UI_INTERNALS_H_
OLDNEW
« sky/shell/BUILD.gn ('K') | « sky/shell/BUILD.gn ('k') | sky/shell/ui/internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698