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

Side by Side Diff: chrome/browser/android/offline_pages/prerender_adapter.h

Issue 2608553002: [OfflinePages] Improve visiblity/handling of "Loading not started" case (Closed)
Patch Set: Addes ! low-end device default to test Setup Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/prerender_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDER_ADAPTER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDER_ADAPTER_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDER_ADAPTER_H_ 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDER_ADAPTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "chrome/browser/prerender/prerender_handle.h" 10 #include "chrome/browser/prerender/prerender_handle.h"
(...skipping 30 matching lines...) Expand all
41 virtual void OnPrerenderStop() = 0; 41 virtual void OnPrerenderStop() = 0;
42 42
43 protected: 43 protected:
44 Observer(); 44 Observer();
45 virtual ~Observer(); 45 virtual ~Observer();
46 }; 46 };
47 47
48 explicit PrerenderAdapter(PrerenderAdapter::Observer* observer); 48 explicit PrerenderAdapter(PrerenderAdapter::Observer* observer);
49 ~PrerenderAdapter() override; 49 ~PrerenderAdapter() override;
50 50
51 // Returns whether prerendering is enabled and configured.
52 virtual bool CanPrerender() const;
53
54 // Starts prerendering |url| for offlining. There must be no active 51 // Starts prerendering |url| for offlining. There must be no active
55 // prerender request when calling this. Returns whether it was able 52 // prerender request when calling this. Returns whether it was able
56 // to start the prerendering operation. 53 // to start the prerendering operation.
57 virtual bool StartPrerender( 54 virtual bool StartPrerender(
58 content::BrowserContext* browser_context, 55 content::BrowserContext* browser_context,
59 const GURL& url, 56 const GURL& url,
60 content::SessionStorageNamespace* session_storage_namespace, 57 content::SessionStorageNamespace* session_storage_namespace,
61 const gfx::Size& size); 58 const gfx::Size& size);
62 59
63 // Returns a pointer to the prerendered WebContents. This should only be 60 // Returns a pointer to the prerendered WebContents. This should only be
(...skipping 30 matching lines...) Expand all
94 91
95 // Observer of active handle events. Not owned. 92 // Observer of active handle events. Not owned.
96 PrerenderAdapter::Observer* observer_; 93 PrerenderAdapter::Observer* observer_;
97 94
98 DISALLOW_COPY_AND_ASSIGN(PrerenderAdapter); 95 DISALLOW_COPY_AND_ASSIGN(PrerenderAdapter);
99 }; 96 };
100 97
101 } // namespace offline_pages 98 } // namespace offline_pages
102 99
103 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDER_ADAPTER_H_ 100 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDER_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/prerender_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698