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

Unified Diff: chrome/browser/prerender/prerender_manager.h

Issue 6915019: Changes to not use the prerendered contents when window.opener needs to be set. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prerender/prerender_manager.h
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h
index f1f46ff28ee356de6ca0f215d9606b287c27abe8..88446acaa0ccd9efbb357776bf7717b54a92c19e 100644
--- a/chrome/browser/prerender/prerender_manager.h
+++ b/chrome/browser/prerender/prerender_manager.h
@@ -72,6 +72,12 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
PRERENDER_MODE_MAX
};
+ struct PrerenderedPageProperties {
cbentzel 2011/05/04 17:10:15 This seems like overkill right now. I'd just have
Shishir 2011/05/05 23:09:54 Then I think we might as well have a bool for now
+ PrerenderedPageProperties() : has_opener_set_(false) { }
+ // Is the page supposed to have the window.opener property set.
+ bool has_opener_set_;
+ };
+
// Owned by a Profile object for the lifetime of the profile.
explicit PrerenderManager(Profile* profile);
@@ -100,8 +106,14 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
// determines whether a preloaded version of the URL can be used,
// and substitutes the prerendered RVH into the TabContents. Returns
// whether or not a prerendered RVH could be used or not.
- bool MaybeUsePreloadedPage(TabContents* tab_contents, const GURL& url);
- bool MaybeUsePreloadedPageOld(TabContents* tab_contents, const GURL& url);
+ bool MaybeUsePreloadedPage(
+ TabContents* tab_contents,
+ const GURL& url,
+ const PrerenderManager::PrerenderedPageProperties& properties);
+ bool MaybeUsePreloadedPageOld(
+ TabContents* tab_contents,
+ const GURL& url,
+ const PrerenderManager::PrerenderedPageProperties& properties);
// Allows PrerenderContents to remove itself when prerendering should
// be cancelled.

Powered by Google App Engine
This is Rietveld 408576698