Chromium Code Reviews| 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 PrerenderManager; | |
| 13 | |
| 14 namespace content { | |
| 15 class WebContents; | |
| 16 } // namespace content | |
| 17 | |
| 18 namespace offline_pages { | |
| 19 | |
| 20 // 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 // the OfflinePageModel to save it. | |
| 23 class PrerenderingOffliner : public Offliner { | |
| 24 public: | |
| 25 PrerenderingOffliner( | |
|
fgorski
2016/04/29 05:31:45
Do you run git cl format? Not sure but maybe this
dougarnett
2016/04/29 16:27:23
Done.
| |
| 26 PrerenderManager* prerender_manager, | |
| 27 OfflinePageModel* offline_page_model); | |
| 28 ~PrerenderingOffliner() override; | |
| 29 | |
| 30 bool LoadAndSave( | |
| 31 const SavePageRequest& request, | |
| 32 const CompletionCallback& callback) override; | |
| 33 | |
| 34 void Cancel(); | |
| 35 | |
| 36 private: | |
| 37 std::unique_ptr<PrerenderingLoader> loader_; | |
| 38 // Not owned. | |
| 39 OfflinePageModel* offline_page_model_; | |
| 40 }; | |
| 41 | |
| 42 } // namespace offline_pages | |
| 43 | |
| 44 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | |
| OLD | NEW |