OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ |
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ |
7 | 7 |
8 #include "chrome/browser/android/offline_pages/prerendering_loader.h" | 8 #include "chrome/browser/android/offline_pages/prerendering_loader.h" |
9 #include "components/offline_pages/background/offliner.h" | 9 #include "components/offline_pages/background/offliner.h" |
10 #include "components/offline_pages/background/offliner_policy.h" | |
fgorski
2016/05/03 22:48:08
forward declare. you are only dealing with a point
Pete Williamson
2016/05/04 00:39:20
Done.
| |
10 #include "components/offline_pages/offline_page_model.h" | 11 #include "components/offline_pages/offline_page_model.h" |
11 | 12 |
12 class PrerenderManager; | 13 class PrerenderManager; |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 class WebContents; | 16 class WebContents; |
16 } // namespace content | 17 } // namespace content |
17 | 18 |
18 namespace offline_pages { | 19 namespace offline_pages { |
19 | 20 |
20 // An Offliner implementation that attempts client-side rendering and saving | 21 // An Offliner implementation that attempts client-side rendering and saving |
21 // of an offline page. It uses the PrerenderingLoader to load the page and | 22 // of an offline page. It uses the PrerenderingLoader to load the page and |
22 // the OfflinePageModel to save it. | 23 // the OfflinePageModel to save it. |
23 class PrerenderingOffliner : public Offliner { | 24 class PrerenderingOffliner : public Offliner { |
24 public: | 25 public: |
25 PrerenderingOffliner(PrerenderManager* prerender_manager, | 26 PrerenderingOffliner(const OfflinerPolicy* policy, |
27 PrerenderManager* prerender_manager, | |
26 OfflinePageModel* offline_page_model); | 28 OfflinePageModel* offline_page_model); |
27 ~PrerenderingOffliner() override; | 29 ~PrerenderingOffliner() override; |
28 | 30 |
29 bool LoadAndSave(const SavePageRequest& request, | 31 bool LoadAndSave(const SavePageRequest& request, |
30 const CompletionCallback& callback) override; | 32 const CompletionCallback& callback) override; |
31 | 33 |
32 void Cancel() override; | 34 void Cancel() override; |
33 | 35 |
34 private: | 36 private: |
35 std::unique_ptr<PrerenderingLoader> loader_; | 37 std::unique_ptr<PrerenderingLoader> loader_; |
36 }; | 38 }; |
37 | 39 |
38 } // namespace offline_pages | 40 } // namespace offline_pages |
39 | 41 |
40 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | 42 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ |
OLD | NEW |