OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_ASSET_BUNDLE_ASSET_UNPACKER_IMPL_H_ | 5 #ifndef SERVICES_ASSET_BUNDLE_ASSET_UNPACKER_IMPL_H_ |
6 #define SERVICES_ASSET_BUNDLE_ASSET_UNPACKER_IMPL_H_ | 6 #define SERVICES_ASSET_BUNDLE_ASSET_UNPACKER_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/task_runner.h" | 9 #include "base/task_runner.h" |
10 #include "mojo/public/cpp/bindings/interface_request.h" | 10 #include "mojo/public/cpp/bindings/interface_request.h" |
11 #include "mojo/public/cpp/bindings/strong_binding.h" | 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
12 #include "mojo/public/cpp/system/data_pipe.h" | 12 #include "mojo/public/cpp/system/data_pipe.h" |
13 #include "mojo/services/asset_bundle/public/interfaces/asset_bundle.mojom.h" | 13 #include "mojo/services/asset_bundle/interfaces/asset_bundle.mojom.h" |
14 | 14 |
15 namespace mojo { | 15 namespace mojo { |
16 namespace asset_bundle { | 16 namespace asset_bundle { |
17 | 17 |
18 class AssetUnpackerImpl : public AssetUnpacker { | 18 class AssetUnpackerImpl : public AssetUnpacker { |
19 public: | 19 public: |
20 AssetUnpackerImpl(InterfaceRequest<AssetUnpacker> request, | 20 AssetUnpackerImpl(InterfaceRequest<AssetUnpacker> request, |
21 scoped_refptr<base::TaskRunner> worker_runner); | 21 scoped_refptr<base::TaskRunner> worker_runner); |
22 ~AssetUnpackerImpl() override; | 22 ~AssetUnpackerImpl() override; |
23 | 23 |
24 // AssetUnpacker implementation | 24 // AssetUnpacker implementation |
25 void UnpackZipStream(ScopedDataPipeConsumerHandle zipped_assets, | 25 void UnpackZipStream(ScopedDataPipeConsumerHandle zipped_assets, |
26 InterfaceRequest<AssetBundle> asset_bundle) override; | 26 InterfaceRequest<AssetBundle> asset_bundle) override; |
27 | 27 |
28 private: | 28 private: |
29 StrongBinding<AssetUnpacker> binding_; | 29 StrongBinding<AssetUnpacker> binding_; |
30 | 30 |
31 scoped_refptr<base::TaskRunner> worker_runner_; | 31 scoped_refptr<base::TaskRunner> worker_runner_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(AssetUnpackerImpl); | 33 DISALLOW_COPY_AND_ASSIGN(AssetUnpackerImpl); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace asset_bundle | 36 } // namespace asset_bundle |
37 } // namespace mojo | 37 } // namespace mojo |
38 | 38 |
39 #endif // SERVICES_ASSET_BUNDLE_ASSET_UNPACKER_IMPL_H_ | 39 #endif // SERVICES_ASSET_BUNDLE_ASSET_UNPACKER_IMPL_H_ |
OLD | NEW |