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

Side by Side Diff: chrome/browser/prerender/prerender_manager.h

Issue 1854643002: Implement PrerenderManager::AddPrerenderForOffline() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses pasko's comments 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PRERENDER_PRERENDER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 // Adds a prerender for Instant Search |url| if valid. The 145 // Adds a prerender for Instant Search |url| if valid. The
146 // |session_storage_namespace| matches the namespace of the active tab at the 146 // |session_storage_namespace| matches the namespace of the active tab at the
147 // time the prerender is generated. Returns a caller-owned PrerenderHandle* or 147 // time the prerender is generated. Returns a caller-owned PrerenderHandle* or
148 // NULL. 148 // NULL.
149 PrerenderHandle* AddPrerenderForInstant( 149 PrerenderHandle* AddPrerenderForInstant(
150 const GURL& url, 150 const GURL& url,
151 content::SessionStorageNamespace* session_storage_namespace, 151 content::SessionStorageNamespace* session_storage_namespace,
152 const gfx::Size& size); 152 const gfx::Size& size);
153 153
154 // Adds a prerender from an external request that will always prerender.
pasko 2016/04/05 11:49:56 This is not an "external request", calling it such
gabadie 2016/04/05 13:35:24 My bad. Done.
155 PrerenderHandle* AddPrerenderForOffline(
156 const GURL& url,
157 content::SessionStorageNamespace* session_storage_namespace,
158 const gfx::Size& size);
159
154 // Cancels all active prerenders. 160 // Cancels all active prerenders.
155 void CancelAllPrerenders(); 161 void CancelAllPrerenders();
156 162
157 // If |url| matches a valid prerendered page and |params| are compatible, try 163 // If |url| matches a valid prerendered page and |params| are compatible, try
158 // to swap it and merge browsing histories. Returns |true| and updates 164 // to swap it and merge browsing histories. Returns |true| and updates
159 // |params->target_contents| if a prerendered page is swapped in, |false| 165 // |params->target_contents| if a prerendered page is swapped in, |false|
160 // otherwise. 166 // otherwise.
161 bool MaybeUsePrerenderedPage(const GURL& url, 167 bool MaybeUsePrerenderedPage(const GURL& url,
162 chrome::NavigateParams* params); 168 chrome::NavigateParams* params);
163 169
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // Set of process hosts being prerendered. 567 // Set of process hosts being prerendered.
562 typedef std::set<content::RenderProcessHost*> PrerenderProcessSet; 568 typedef std::set<content::RenderProcessHost*> PrerenderProcessSet;
563 PrerenderProcessSet prerender_process_hosts_; 569 PrerenderProcessSet prerender_process_hosts_;
564 570
565 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 571 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
566 }; 572 };
567 573
568 } // namespace prerender 574 } // namespace prerender
569 575
570 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 576 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698