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

Side by Side Diff: chrome/browser/android/offline_pages/prerendering_loader.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: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(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_LOADER_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_LOADER_H_
7
8 #include "base/callback.h"
9 #include "components/offline_pages/background/offliner.h"
10
11 class GURL;
12 class PrerenderManager;
13 class Profile;
14
15 namespace content {
16 class WebContents;
17 class SessionStorageNamespace;
18 } // namespace content
19
20 namespace gfx {
21 class Size;
22 } // namespace gfx
23
24 namespace offline_pages {
25
26 // An Offliner implementation that uses the PrerenderManager for client-side
27 // rendering. This handles loading a page and then saving it to the offline
28 // page model.
29 class PrerenderingLoader {
30 public:
31 typedef base::Callback<void(
32 Offliner::CompletionStatus,
33 content::WebContents*)> LoadPageCallback;
34
35 explicit PrerenderingLoader(Profile* profile);
36 ~PrerenderingLoader();
37
38 bool LoadPage(
39 const GURL url,
40 content::SessionStorageNamespace* session_storage_namespace,
41 const gfx::Size& size,
42 const LoadPageCallback& callback);
43
44 void StopLoad();
45
46 private:
47 // Not owned.
48 Profile* profile_;
49 PrerenderManager* manager_;
50 };
51
52 } // namespace offline_pages
53
54 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698