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