Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3165)

Unified Diff: chrome/browser/android/offline_pages/prerendering_offliner.h

Issue 1915983008: Adds shells of classes (PrerenderingOffliner and PrerenderingLoader) to intergrate from Background … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback updates and added comments on Loader methods Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..06526fbb8d5a6bb83e74dd35d189d6353b78d482
--- /dev/null
+++ b/chrome/browser/android/offline_pages/prerendering_offliner.h
@@ -0,0 +1,44 @@
+// 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 PrerenderManager;
+
+namespace content {
+class WebContents;
+} // namespace content
+
+namespace offline_pages {
+
+// An Offliner implementation that attempts client-side rendering and saving
+// of an offline page. It uses the PrerenderingLoader to load the page and
+// the OfflinePageModel to save it.
+class PrerenderingOffliner : public Offliner {
+ public:
+ 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.
+ PrerenderManager* prerender_manager,
+ 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_

Powered by Google App Engine
This is Rietveld 408576698