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

Side by Side Diff: services/asset_bundle/asset_bundle_impl.h

Issue 1206673006: Don't use base::WorkerPool in the asset_bundle app. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: move comment Created 5 years, 5 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
« no previous file with comments | « no previous file | services/asset_bundle/asset_bundle_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BUNDLE_IMPL_H_ 5 #ifndef SERVICES_ASSET_BUNDLE_ASSET_BUNDLE_IMPL_H_
6 #define SERVICES_ASSET_BUNDLE_ASSET_BUNDLE_IMPL_H_ 6 #define SERVICES_ASSET_BUNDLE_ASSET_BUNDLE_IMPL_H_
7 7
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/task_runner.h"
11 #include "mojo/public/cpp/bindings/interface_request.h" 12 #include "mojo/public/cpp/bindings/interface_request.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h" 13 #include "mojo/public/cpp/bindings/strong_binding.h"
13 #include "mojo/public/cpp/system/data_pipe.h" 14 #include "mojo/public/cpp/system/data_pipe.h"
14 #include "mojo/services/asset_bundle/public/interfaces/asset_bundle.mojom.h" 15 #include "mojo/services/asset_bundle/public/interfaces/asset_bundle.mojom.h"
15 16
16 namespace mojo { 17 namespace mojo {
17 namespace asset_bundle { 18 namespace asset_bundle {
18 19
19 class AssetBundleImpl : public AssetBundle { 20 class AssetBundleImpl : public AssetBundle {
20 public: 21 public:
21 AssetBundleImpl(InterfaceRequest<AssetBundle> request, 22 AssetBundleImpl(InterfaceRequest<AssetBundle> request,
22 scoped_ptr<base::ScopedTempDir> asset_dir); 23 scoped_ptr<base::ScopedTempDir> asset_dir,
24 scoped_refptr<base::TaskRunner> worker_runner);
23 ~AssetBundleImpl() override; 25 ~AssetBundleImpl() override;
24 26
25 // AssetBundle implementation 27 // AssetBundle implementation
26 void GetAsStream( 28 void GetAsStream(
27 const String& asset_name, 29 const String& asset_name,
28 const Callback<void(ScopedDataPipeConsumerHandle)>& callback) override; 30 const Callback<void(ScopedDataPipeConsumerHandle)>& callback) override;
29 31
30 private: 32 private:
31 StrongBinding<AssetBundle> binding_; 33 StrongBinding<AssetBundle> binding_;
32 scoped_ptr<base::ScopedTempDir> asset_dir_; 34 scoped_ptr<base::ScopedTempDir> asset_dir_;
35 scoped_refptr<base::TaskRunner> worker_runner_;
33 36
34 DISALLOW_COPY_AND_ASSIGN(AssetBundleImpl); 37 DISALLOW_COPY_AND_ASSIGN(AssetBundleImpl);
35 }; 38 };
36 39
37 } // namespace asset_bundle 40 } // namespace asset_bundle
38 } // namespace mojo 41 } // namespace mojo
39 42
40 #endif // SERVICES_ASSET_BUNDLE_ASSET_BUNDLE_IMPL_H_ 43 #endif // SERVICES_ASSET_BUNDLE_ASSET_BUNDLE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | services/asset_bundle/asset_bundle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698