| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/blocked_content/popup_blocker_tab_helper.h" | 5 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/content_settings/host_content_settings_map.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 chrome::NavigateParams nav_params( | 102 chrome::NavigateParams nav_params( |
| 103 Profile::FromBrowserContext(web_contents()->GetBrowserContext()), | 103 Profile::FromBrowserContext(web_contents()->GetBrowserContext()), |
| 104 target_url, | 104 target_url, |
| 105 content::PAGE_TRANSITION_LINK); | 105 content::PAGE_TRANSITION_LINK); |
| 106 nav_params.referrer = referrer; | 106 nav_params.referrer = referrer; |
| 107 nav_params.source_contents = web_contents(); | 107 nav_params.source_contents = web_contents(); |
| 108 nav_params.is_renderer_initiated = true; | 108 nav_params.is_renderer_initiated = true; |
| 109 nav_params.tabstrip_add_types = TabStripModel::ADD_ACTIVE; | 109 nav_params.tabstrip_add_types = TabStripModel::ADD_ACTIVE; |
| 110 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 110 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 111 nav_params.user_gesture = user_gesture; | 111 nav_params.user_gesture = user_gesture; |
| 112 nav_params.should_copy_session_storage_namespace = true; |
| 113 nav_params.should_set_opener = !opener_suppressed; |
| 112 web_contents()->GetView()->GetContainerBounds(&nav_params.window_bounds); | 114 web_contents()->GetView()->GetContainerBounds(&nav_params.window_bounds); |
| 113 if (features.xSet) | 115 if (features.xSet) |
| 114 nav_params.window_bounds.set_x(features.x); | 116 nav_params.window_bounds.set_x(features.x); |
| 115 if (features.ySet) | 117 if (features.ySet) |
| 116 nav_params.window_bounds.set_y(features.y); | 118 nav_params.window_bounds.set_y(features.y); |
| 117 if (features.widthSet) | 119 if (features.widthSet) |
| 118 nav_params.window_bounds.set_width(features.width); | 120 nav_params.window_bounds.set_width(features.width); |
| 119 if (features.heightSet) | 121 if (features.heightSet) |
| 120 nav_params.window_bounds.set_height(features.height); | 122 nav_params.window_bounds.set_height(features.height); |
| 121 | 123 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 151 std::map<int32, GURL> PopupBlockerTabHelper::GetBlockedPopupRequests() { | 153 std::map<int32, GURL> PopupBlockerTabHelper::GetBlockedPopupRequests() { |
| 152 std::map<int32, GURL> result; | 154 std::map<int32, GURL> result; |
| 153 for (IDMap<BlockedRequest, IDMapOwnPointer>::const_iterator iter( | 155 for (IDMap<BlockedRequest, IDMapOwnPointer>::const_iterator iter( |
| 154 &blocked_popups_); | 156 &blocked_popups_); |
| 155 !iter.IsAtEnd(); | 157 !iter.IsAtEnd(); |
| 156 iter.Advance()) { | 158 iter.Advance()) { |
| 157 result[iter.GetCurrentKey()] = iter.GetCurrentValue()->params.url; | 159 result[iter.GetCurrentKey()] = iter.GetCurrentValue()->params.url; |
| 158 } | 160 } |
| 159 return result; | 161 return result; |
| 160 } | 162 } |
| OLD | NEW |