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

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

Issue 7210020: Added prerendering to omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: But not strongly enough. Origin histogram removed. 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_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_OBSERVER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_OBSERVER_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_OBSERVER_H_
7 7
8 #include "content/browser/tab_contents/tab_contents_observer.h" 8 #include "content/browser/tab_contents/tab_contents_observer.h"
9 9
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 28 matching lines...) Expand all
39 // Called when this prerendered TabContents has just been swapped in. 39 // Called when this prerendered TabContents has just been swapped in.
40 void PrerenderSwappedIn(); 40 void PrerenderSwappedIn();
41 41
42 private: 42 private:
43 // Retrieves the PrerenderManager, or NULL, if none was found. 43 // Retrieves the PrerenderManager, or NULL, if none was found.
44 PrerenderManager* MaybeGetPrerenderManager(); 44 PrerenderManager* MaybeGetPrerenderManager();
45 45
46 // Checks with the PrerenderManager if the specified URL has been preloaded, 46 // Checks with the PrerenderManager if the specified URL has been preloaded,
47 // and if so, swap the RenderViewHost with the preload into this TabContents 47 // and if so, swap the RenderViewHost with the preload into this TabContents
48 // object. 48 // object.
49 bool MaybeUsePreloadedPage(const GURL& url, bool has_opener_set); 49 bool MaybeUsePrerenderedPage(const GURL& url, bool has_opener_set);
50 50
51 // Returns whether the TabContents being observed is currently prerendering. 51 // Returns whether the TabContents being observed is currently prerendering.
52 bool IsPrerendering(); 52 bool IsPrerendering();
53 53
54 // System time at which the current load was started for the purpose of 54 // System time at which the current load was started for the purpose of
55 // the perceived page load time (PPLT). 55 // the perceived page load time (PPLT).
56 base::TimeTicks pplt_load_start_; 56 base::TimeTicks pplt_load_start_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(PrerenderObserver); 58 DISALLOW_COPY_AND_ASSIGN(PrerenderObserver);
59 }; 59 };
60 60
61 } // namespace prerender 61 } // namespace prerender
62 62
63 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_OBSERVER_H_ 63 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698