OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | |
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | |
7 | |
8 #include "chrome/browser/android/offline_pages/prerendering_loader.h" | |
9 #include "components/offline_pages/background/offliner.h" | |
10 #include "components/offline_pages/offline_page_model.h" | |
11 | |
12 class Profile; | |
13 | |
14 namespace content { | |
15 class WebContents; | |
16 } // namespace content | |
17 | |
18 namespace offline_pages { | |
19 | |
20 // An Offliner implementation that uses the PrerenderManager for client-side | |
21 // rendering. This handles loading a page and then saving it to the offline | |
22 // page model. | |
23 class PrerenderingOffliner : public Offliner { | |
Pete Williamson
2016/04/27 23:58:28
How is this different from the PrerenderingLoader?
dougarnett
2016/04/28 00:18:03
Please see if updated comments are better and good
Pete Williamson
2016/04/28 00:28:45
Acknowledged.
| |
24 public: | |
25 // TODO(dougarnett): consider not locking to profile (pass in request). | |
26 PrerenderingOffliner(Profile* profile, OfflinePageModel* offline_page_model); | |
27 ~PrerenderingOffliner() override; | |
28 | |
29 bool LoadAndSave( | |
30 const SavePageRequest& request, | |
31 const CompletionCallback& callback) override; | |
32 | |
33 void Cancel(); | |
34 | |
35 private: | |
36 std::unique_ptr<PrerenderingLoader> loader_; | |
37 // Not owned. | |
38 OfflinePageModel* offline_page_model_; | |
39 }; | |
40 | |
41 } // namespace offline_pages | |
42 | |
43 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | |
OLD | NEW |