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

Side by Side Diff: content/browser/web_contents/web_contents_impl.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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 265
266 } // namespace 266 } // namespace
267 267
268 WebContents* WebContents::Create(const WebContents::CreateParams& params) { 268 WebContents* WebContents::Create(const WebContents::CreateParams& params) {
269 return WebContentsImpl::CreateWithOpener(params, NULL); 269 return WebContentsImpl::CreateWithOpener(params, NULL);
270 } 270 }
271 271
272 WebContents* WebContents::CreateWithSessionStorage( 272 WebContents* WebContents::CreateWithSessionStorage(
273 const WebContents::CreateParams& params, 273 const WebContents::CreateParams& params,
274 const SessionStorageNamespaceMap& session_storage_namespace_map) { 274 const SessionStorageNamespaceMap& session_storage_namespace_map,
275 WebContents* opener) {
275 WebContentsImpl* new_contents = new WebContentsImpl( 276 WebContentsImpl* new_contents = new WebContentsImpl(
276 params.browser_context, NULL); 277 params.browser_context, static_cast<WebContentsImpl*>(opener));
277 278
278 for (SessionStorageNamespaceMap::const_iterator it = 279 for (SessionStorageNamespaceMap::const_iterator it =
279 session_storage_namespace_map.begin(); 280 session_storage_namespace_map.begin();
280 it != session_storage_namespace_map.end(); 281 it != session_storage_namespace_map.end();
281 ++it) { 282 ++it) {
282 new_contents->GetController() 283 new_contents->GetController()
283 .SetSessionStorageNamespace(it->first, it->second.get()); 284 .SetSessionStorageNamespace(it->first, it->second.get());
284 } 285 }
285 286
286 new_contents->Init(params); 287 new_contents->Init(params);
(...skipping 3441 matching lines...) Expand 10 before | Expand all | Expand 10 after
3728 } 3729 }
3729 3730
3730 void WebContentsImpl::ClearAllPowerSaveBlockers() { 3731 void WebContentsImpl::ClearAllPowerSaveBlockers() {
3731 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); 3732 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin());
3732 i != power_save_blockers_.end(); ++i) 3733 i != power_save_blockers_.end(); ++i)
3733 STLDeleteValues(&power_save_blockers_[i->first]); 3734 STLDeleteValues(&power_save_blockers_[i->first]);
3734 power_save_blockers_.clear(); 3735 power_save_blockers_.clear();
3735 } 3736 }
3736 3737
3737 } // namespace content 3738 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698