Chromium Code Reviews| Index: chrome/browser/prerender/prerender_manager.h |
| diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h |
| index 516cffe56c1741f92307b9736ac0b782ab762229..24fd5fab5562520f559f7584fd1168fbcf34d2e0 100644 |
| --- a/chrome/browser/prerender/prerender_manager.h |
| +++ b/chrome/browser/prerender/prerender_manager.h |
| @@ -23,6 +23,7 @@ |
| #include "chrome/browser/prerender/prerender_origin.h" |
| #include "chrome/browser/profiles/profile_keyed_service.h" |
| #include "googleurl/src/gurl.h" |
| +#include "ui/gfx/rect.h" |
| class Profile; |
| class TabContents; |
| @@ -169,6 +170,10 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
| // is prerendering a page. |
| bool IsWebContentsPrerendering(content::WebContents* web_contents) const; |
| + // Returns true if there is a prerendered page for the given URL and it has |
| + // finished loading. Needs to be called before MaybeUsePrerenderedPage. |
| + bool DidPrerenderFinishLoading(const GURL& url); |
|
cbentzel
2012/02/14 01:20:31
const?
The comment about "Needs to be called" is
Jay Civelli
2012/02/14 03:13:51
Done.
cbentzel
2012/02/14 10:33:36
Ah, misinterpretation on my part. I thought you me
dominich
2012/02/14 16:38:59
It will still be swapped, but this lets the Androi
|
| + |
| // Maintaining and querying the set of WebContents belonging to this |
| // PrerenderManager that are currently showing prerendered pages. |
| void MarkWebContentsAsPrerendered(content::WebContents* web_contents); |
| @@ -227,6 +232,13 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
| // Returns true if |url| matches any URLs being prerendered. |
| bool IsPrerendering(const GURL& url) const; |
| + // The default tab bounds are used as the prerenderer tab size when the active |
| + // tab could not be accessed (Android case). |
| + void set_default_tab_bounds(const gfx::Rect& bounds) { |
|
dominich
2012/02/14 01:11:20
Maybe this would be better as part of the Config s
Jay Civelli
2012/02/14 03:13:51
Good idea! Moved to prerender_config.
|
| + default_tab_bounds_ = bounds; |
| + } |
| + gfx::Rect default_tab_bounds() const { return default_tab_bounds_; } |
| + |
| protected: |
| void SetPrerenderContentsFactory( |
| PrerenderContents::Factory* prerender_contents_factory); |
| @@ -445,6 +457,8 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
| scoped_ptr<MostVisitedSites> most_visited_; |
| + gfx::Rect default_tab_bounds_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| }; |