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

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

Issue 7210020: Added prerendering to omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove TODO Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // RenderViewHost that the prerender request came from and is used to 81 // RenderViewHost that the prerender request came from and is used to
82 // set the initial window size of the RenderViewHost used for prerendering. 82 // set the initial window size of the RenderViewHost used for prerendering.
83 // Returns true if the URL was added, false if it was not. 83 // Returns true if the URL was added, false if it was not.
84 // If |child_route_id_pair| itself is prerendering, adds the preloads as 84 // If |child_route_id_pair| itself is prerendering, adds the preloads as
85 // a pending preload. 85 // a pending preload.
86 bool AddPreload( 86 bool AddPreload(
87 const std::pair<int, int>& child_route_id_pair, 87 const std::pair<int, int>& child_route_id_pair,
88 const GURL& url, 88 const GURL& url,
89 const GURL& referrer); 89 const GURL& referrer);
90 90
91 // Starts a prerender for |url| if valid. As the prerender request is coming
92 // from a source without a RenderViewHost (ie, the omnibox) we don't have a
93 // child or route id, or a referrer. This method uses sensible values for
94 // those.
95 bool AddPrerenderWithNoTag(const GURL& url);
cbentzel 2011/06/20 18:06:01 Can you be consistent about the AddPreload/AddPrer
dominich 2011/06/20 18:40:00 Done.
96
91 // Destroy all preloads for the given child route id pair and assign a final 97 // Destroy all preloads for the given child route id pair and assign a final
92 // status to them. 98 // status to them.
93 virtual void DestroyPreloadForChildRouteIdPair( 99 virtual void DestroyPreloadForChildRouteIdPair(
94 const std::pair<int, int>& child_route_id_pair, 100 const std::pair<int, int>& child_route_id_pair,
95 FinalStatus final_status); 101 FinalStatus final_status);
96 102
97 // For a given TabContents that wants to navigate to the URL supplied, 103 // For a given TabContents that wants to navigate to the URL supplied,
98 // determines whether a preloaded version of the URL can be used, 104 // determines whether a preloaded version of the URL can be used,
99 // and substitutes the prerendered RVH into the TabContents. Returns 105 // and substitutes the prerendered RVH into the TabContents. Returns
100 // whether or not a prerendered RVH could be used or not. 106 // whether or not a prerendered RVH could be used or not.
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 ScopedRunnableMethodFactory<PrerenderManager> runnable_method_factory_; 348 ScopedRunnableMethodFactory<PrerenderManager> runnable_method_factory_;
343 349
344 ScopedVector<OnCloseTabContentsDeleter> on_close_tab_contents_deleters_; 350 ScopedVector<OnCloseTabContentsDeleter> on_close_tab_contents_deleters_;
345 351
346 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 352 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
347 }; 353 };
348 354
349 } // namespace prerender 355 } // namespace prerender
350 356
351 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 357 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698