OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 MOJO_LOADER_LOADER_H_ | 5 #ifndef MOJO_LOADER_LOADER_H_ |
6 #define MOJO_LOADER_LOADER_H_ | 6 #define MOJO_LOADER_LOADER_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "mojo/loader/job.h" | 11 #include "mojo/loader/job.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
| 14 namespace net { |
| 15 class NetworkDelegate; |
| 16 } |
| 17 |
14 namespace mojo { | 18 namespace mojo { |
15 namespace loader { | 19 namespace loader { |
16 | 20 |
17 class Loader { | 21 class Loader { |
18 public: | 22 public: |
19 Loader(base::SingleThreadTaskRunner* network_runner, | 23 Loader(base::SingleThreadTaskRunner* network_runner, |
20 base::SingleThreadTaskRunner* file_runner, | 24 base::SingleThreadTaskRunner* file_runner, |
| 25 scoped_ptr<net::NetworkDelegate> network_delegate, |
21 base::FilePath base_path); | 26 base::FilePath base_path); |
22 ~Loader(); | 27 ~Loader(); |
23 | 28 |
24 scoped_ptr<Job> Load(const GURL& app_url, Job::Delegate* delegate); | 29 scoped_ptr<Job> Load(const GURL& app_url, Job::Delegate* delegate); |
25 | 30 |
26 private: | 31 private: |
27 class Data; | 32 class Data; |
28 | 33 |
29 scoped_ptr<Data> data_; | 34 scoped_ptr<Data> data_; |
30 | 35 |
31 DISALLOW_COPY_AND_ASSIGN(Loader); | 36 DISALLOW_COPY_AND_ASSIGN(Loader); |
32 }; | 37 }; |
33 | 38 |
34 } // namespace loader | 39 } // namespace loader |
35 } // namespace mojo | 40 } // namespace mojo |
36 | 41 |
37 #endif // MOJO_LOADER_LOADER_H_ | 42 #endif // MOJO_LOADER_LOADER_H_ |
OLD | NEW |