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

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: updates 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 params->can_load_local_resources = entry.GetCanLoadLocalResources(); 259 params->can_load_local_resources = entry.GetCanLoadLocalResources();
260 params->frame_to_navigate = entry.GetFrameToNavigate(); 260 params->frame_to_navigate = entry.GetFrameToNavigate();
261 261
262 if (delegate) 262 if (delegate)
263 delegate->AddNavigationHeaders(params->url, &params->extra_headers); 263 delegate->AddNavigationHeaders(params->url, &params->extra_headers);
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 WebContents* opener) {
270 return WebContentsImpl::CreateWithOpener(
271 params, static_cast<WebContentsImpl*>(opener));
270 } 272 }
271 273
272 WebContents* WebContents::CreateWithSessionStorage( 274 WebContents* WebContents::CreateWithSessionStorage(
273 const WebContents::CreateParams& params, 275 const WebContents::CreateParams& params,
274 const SessionStorageNamespaceMap& session_storage_namespace_map) { 276 const SessionStorageNamespaceMap& session_storage_namespace_map) {
275 WebContentsImpl* new_contents = new WebContentsImpl( 277 WebContentsImpl* new_contents = new WebContentsImpl(
276 params.browser_context, NULL); 278 params.browser_context, NULL);
277 279
278 for (SessionStorageNamespaceMap::const_iterator it = 280 for (SessionStorageNamespaceMap::const_iterator it =
279 session_storage_namespace_map.begin(); 281 session_storage_namespace_map.begin();
(...skipping 3448 matching lines...) Expand 10 before | Expand all | Expand 10 after
3728 } 3730 }
3729 3731
3730 void WebContentsImpl::ClearAllPowerSaveBlockers() { 3732 void WebContentsImpl::ClearAllPowerSaveBlockers() {
3731 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); 3733 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin());
3732 i != power_save_blockers_.end(); ++i) 3734 i != power_save_blockers_.end(); ++i)
3733 STLDeleteValues(&power_save_blockers_[i->first]); 3735 STLDeleteValues(&power_save_blockers_[i->first]);
3734 power_save_blockers_.clear(); 3736 power_save_blockers_.clear();
3735 } 3737 }
3736 3738
3737 } // namespace content 3739 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698