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

Unified Diff: content/browser/tab_contents/tab_contents.cc

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: Addressing Sreeram's comments. Created 9 years, 7 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: content/browser/tab_contents/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 02b63861cec2a743bbec06526d4d02d320fab3e2..53dfde4e6fc60785e2535b0c628622031d986794 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1020,6 +1020,7 @@ void TabContents::SetContentRestrictions(int restrictions) {
void TabContents::OnDidStartProvisionalLoadForFrame(int64 frame_id,
bool is_main_frame,
+ bool has_opener_set,
const GURL& url) {
bool is_error_page = (url.spec() == chrome::kUnreachableWebDataURL);
GURL validated_url(url);
@@ -1034,11 +1035,12 @@ void TabContents::OnDidStartProvisionalLoadForFrame(int64 frame_id,
if (is_main_frame) {
// Notify observers about the provisional change in the main frame URL.
FOR_EACH_OBSERVER(TabContentsObserver, observers_,
- ProvisionalChangeToMainFrameUrl(url));
+ ProvisionalChangeToMainFrameUrl(url, has_opener_set));
}
}
void TabContents::OnDidRedirectProvisionalLoad(int32 page_id,
+ bool has_opener_set,
const GURL& source_url,
const GURL& target_url) {
// TODO(creis): Remove this method and have the pre-rendering code listen to
@@ -1054,7 +1056,8 @@ void TabContents::OnDidRedirectProvisionalLoad(int32 page_id,
// Notify observers about the provisional change in the main frame URL.
FOR_EACH_OBSERVER(TabContentsObserver, observers_,
- ProvisionalChangeToMainFrameUrl(target_url));
+ ProvisionalChangeToMainFrameUrl(target_url,
+ has_opener_set));
}
void TabContents::OnDidFailProvisionalLoadWithError(

Powered by Google App Engine
This is Rietveld 408576698