Index: chrome/browser/android/offline_pages/prerendering_offliner.h |
diff --git a/chrome/browser/android/offline_pages/prerendering_offliner.h b/chrome/browser/android/offline_pages/prerendering_offliner.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d5492ac677bf862e7ba54a3451dcd18acee32785 |
--- /dev/null |
+++ b/chrome/browser/android/offline_pages/prerendering_offliner.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ |
+#define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ |
+ |
+#include "chrome/browser/android/offline_pages/prerendering_loader.h" |
+#include "components/offline_pages/background/offliner.h" |
+#include "components/offline_pages/offline_page_model.h" |
+ |
+class Profile; |
+ |
+namespace content { |
+class WebContents; |
+} // namespace content |
+ |
+namespace offline_pages { |
+ |
+// An Offliner implementation that uses the PrerenderManager for client-side |
+// rendering. This handles loading a page and then saving it to the offline |
+// page model. |
+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.
|
+ public: |
+ // TODO(dougarnett): consider not locking to profile (pass in request). |
+ PrerenderingOffliner(Profile* profile, OfflinePageModel* offline_page_model); |
+ ~PrerenderingOffliner() override; |
+ |
+ bool LoadAndSave( |
+ const SavePageRequest& request, |
+ const CompletionCallback& callback) override; |
+ |
+ void Cancel(); |
+ |
+ private: |
+ std::unique_ptr<PrerenderingLoader> loader_; |
+ // Not owned. |
+ OfflinePageModel* offline_page_model_; |
+}; |
+ |
+} // namespace offline_pages |
+ |
+#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ |