| 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/content_settings/host_content_settings_map_factory.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" | 10 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 PopupNotificationVisibilityChanged(false); | 135 PopupNotificationVisibilityChanged(false); |
| 136 } | 136 } |
| 137 | 137 |
| 138 size_t PopupBlockerTabHelper::GetBlockedPopupsCount() const { | 138 size_t PopupBlockerTabHelper::GetBlockedPopupsCount() const { |
| 139 return blocked_popups_.size(); | 139 return blocked_popups_.size(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 PopupBlockerTabHelper::PopupIdMap | 142 PopupBlockerTabHelper::PopupIdMap |
| 143 PopupBlockerTabHelper::GetBlockedPopupRequests() { | 143 PopupBlockerTabHelper::GetBlockedPopupRequests() { |
| 144 PopupIdMap result; | 144 PopupIdMap result; |
| 145 for (IDMap<BlockedRequest, IDMapOwnPointer>::const_iterator iter( | 145 for (IDMap<std::unique_ptr<BlockedRequest>>::const_iterator iter( |
| 146 &blocked_popups_); | 146 &blocked_popups_); |
| 147 !iter.IsAtEnd(); | 147 !iter.IsAtEnd(); |
| 148 iter.Advance()) { | 148 iter.Advance()) { |
| 149 result[iter.GetCurrentKey()] = iter.GetCurrentValue()->params.url; | 149 result[iter.GetCurrentKey()] = iter.GetCurrentValue()->params.url; |
| 150 } | 150 } |
| 151 return result; | 151 return result; |
| 152 } | 152 } |
| OLD | NEW |