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

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

Issue 2455653005: Revert "Revert of [NoStatePrefetch] Kill renderer after preload scanning (patchset #12 id:240001 of… (Closed)
Patch Set: rebased Created 4 years, 1 month 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 <memory> 10 #include <memory>
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // but not yet deleted. 261 // but not yet deleted.
262 PrerenderContents* GetPrerenderContents( 262 PrerenderContents* GetPrerenderContents(
263 const content::WebContents* web_contents) const; 263 const content::WebContents* web_contents) const;
264 264
265 // Returns the PrerenderContents object for a given child_id, route_id pair, 265 // Returns the PrerenderContents object for a given child_id, route_id pair,
266 // otherwise returns NULL. Note that the PrerenderContents may have been 266 // otherwise returns NULL. Note that the PrerenderContents may have been
267 // Destroy()ed, but not yet deleted. 267 // Destroy()ed, but not yet deleted.
268 virtual PrerenderContents* GetPrerenderContentsForRoute( 268 virtual PrerenderContents* GetPrerenderContentsForRoute(
269 int child_id, int route_id) const; 269 int child_id, int route_id) const;
270 270
271 // Returns the PrerenderContents object that is found in active prerenders to
272 // match the |render_process_id|. Otherwise returns a nullptr.
273 PrerenderContents* GetPrerenderContentsForProcess(
274 int render_process_id) const;
275
271 // Returns a list of all WebContents being prerendered. 276 // Returns a list of all WebContents being prerendered.
272 std::vector<content::WebContents*> GetAllPrerenderingContents() const; 277 std::vector<content::WebContents*> GetAllPrerenderingContents() const;
273 278
274 // Checks whether |url| has been recently navigated to. 279 // Checks whether |url| has been recently navigated to.
275 bool HasRecentlyBeenNavigatedTo(Origin origin, const GURL& url); 280 bool HasRecentlyBeenNavigatedTo(Origin origin, const GURL& url);
276 281
277 // Returns true iff the scheme of the URL given is valid for prerendering. 282 // Returns true iff the scheme of the URL given is valid for prerendering.
278 static bool DoesURLHaveValidScheme(const GURL& url); 283 static bool DoesURLHaveValidScheme(const GURL& url);
279 284
280 // Returns true iff the scheme of the subresource URL given is valid for 285 // Returns true iff the scheme of the subresource URL given is valid for
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 std::unique_ptr<TimeOverride> time_override_; 613 std::unique_ptr<TimeOverride> time_override_;
609 614
610 base::WeakPtrFactory<PrerenderManager> weak_factory_; 615 base::WeakPtrFactory<PrerenderManager> weak_factory_;
611 616
612 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 617 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
613 }; 618 };
614 619
615 } // namespace prerender 620 } // namespace prerender
616 621
617 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 622 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_final_status.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698