Chromium Code Reviews| 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..155663c185d7b60a4fd0388aa862cee76e1031e7 |
| --- /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 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: |
| + // TODO(dougarnett): consider not locking to profile (pass in request). |
|
fgorski
2016/04/28 11:32:20
If you are passing profile/browser context, you do
dougarnett
2016/04/28 20:13:13
The right specific object I need would seem to be
|
| + 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_ |