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

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

Issue 2452313002: Revert of [NoStatePrefetch] Kill renderer after preload scanning (Closed)
Patch Set: 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
276 // Returns a list of all WebContents being prerendered. 271 // Returns a list of all WebContents being prerendered.
277 std::vector<content::WebContents*> GetAllPrerenderingContents() const; 272 std::vector<content::WebContents*> GetAllPrerenderingContents() const;
278 273
279 // Checks whether |url| has been recently navigated to. 274 // Checks whether |url| has been recently navigated to.
280 bool HasRecentlyBeenNavigatedTo(Origin origin, const GURL& url); 275 bool HasRecentlyBeenNavigatedTo(Origin origin, const GURL& url);
281 276
282 // Returns true iff the scheme of the URL given is valid for prerendering. 277 // Returns true iff the scheme of the URL given is valid for prerendering.
283 static bool DoesURLHaveValidScheme(const GURL& url); 278 static bool DoesURLHaveValidScheme(const GURL& url);
284 279
285 // Returns true iff the scheme of the subresource URL given is valid for 280 // 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
613 std::unique_ptr<TimeOverride> time_override_; 608 std::unique_ptr<TimeOverride> time_override_;
614 609
615 base::WeakPtrFactory<PrerenderManager> weak_factory_; 610 base::WeakPtrFactory<PrerenderManager> weak_factory_;
616 611
617 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 612 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
618 }; 613 };
619 614
620 } // namespace prerender 615 } // namespace prerender
621 616
622 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 617 #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