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

Side by Side Diff: chrome/browser/prerender/prerender_contents.cc

Issue 20924002: Try to restore window.opener when opening blocked popups (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/prerender/prerender_contents.h" 5 #include "chrome/browser/prerender/prerender_contents.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 return pending_prerenders_.size(); 475 return pending_prerenders_.size();
476 } 476 }
477 477
478 WebContents* PrerenderContents::CreateWebContents( 478 WebContents* PrerenderContents::CreateWebContents(
479 SessionStorageNamespace* session_storage_namespace) { 479 SessionStorageNamespace* session_storage_namespace) {
480 // TODO(ajwong): Remove the temporary map once prerendering is aware of 480 // TODO(ajwong): Remove the temporary map once prerendering is aware of
481 // multiple session storage namespaces per tab. 481 // multiple session storage namespaces per tab.
482 content::SessionStorageNamespaceMap session_storage_namespace_map; 482 content::SessionStorageNamespaceMap session_storage_namespace_map;
483 session_storage_namespace_map[std::string()] = session_storage_namespace; 483 session_storage_namespace_map[std::string()] = session_storage_namespace;
484 return WebContents::CreateWithSessionStorage( 484 return WebContents::CreateWithSessionStorage(
485 WebContents::CreateParams(profile_), session_storage_namespace_map); 485 WebContents::CreateParams(profile_), session_storage_namespace_map, NULL);
486 } 486 }
487 487
488 void PrerenderContents::NotifyPrerenderStart() { 488 void PrerenderContents::NotifyPrerenderStart() {
489 DCHECK_EQ(FINAL_STATUS_MAX, final_status_); 489 DCHECK_EQ(FINAL_STATUS_MAX, final_status_);
490 FOR_EACH_OBSERVER(Observer, observer_list_, OnPrerenderStart(this)); 490 FOR_EACH_OBSERVER(Observer, observer_list_, OnPrerenderStart(this));
491 } 491 }
492 492
493 void PrerenderContents::NotifyPrerenderStopLoading() { 493 void PrerenderContents::NotifyPrerenderStopLoading() {
494 FOR_EACH_OBSERVER(Observer, observer_list_, OnPrerenderStopLoading(this)); 494 FOR_EACH_OBSERVER(Observer, observer_list_, OnPrerenderStopLoading(this));
495 } 495 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 720
721 bool PrerenderContents::IsCrossSiteNavigationPending() const { 721 bool PrerenderContents::IsCrossSiteNavigationPending() const {
722 if (!prerender_contents_) 722 if (!prerender_contents_)
723 return false; 723 return false;
724 return (prerender_contents_->GetSiteInstance() != 724 return (prerender_contents_->GetSiteInstance() !=
725 prerender_contents_->GetPendingSiteInstance()); 725 prerender_contents_->GetPendingSiteInstance());
726 } 726 }
727 727
728 728
729 } // namespace prerender 729 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698