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

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: rebase again 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 // TabContentsWrapper we're created for. 54 // TabContentsWrapper we're created for.
55 TabContentsWrapper* tab_; 55 TabContentsWrapper* tab_;
56 56
57 // System time at which the current load was started for the purpose of 57 // System time at which the current load was started for the purpose of
58 // the perceived page load time (PPLT). 58 // the perceived page load time (PPLT).
59 base::TimeTicks pplt_load_start_; 59 base::TimeTicks pplt_load_start_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(PrerenderObserver); 61 DISALLOW_COPY_AND_ASSIGN(PrerenderObserver);
62 }; 62 };
63 63
64 } // namespace prerender 64 } // namespace prerender
65 65
66 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_OBSERVER_H_ 66 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_manager_unittest.cc ('k') | chrome/browser/prerender/prerender_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698