OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |