| 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/android/content_settings/popup_blocked_infobar_deleg
ate.h" | 5 #include "chrome/browser/ui/android/content_settings/popup_blocked_infobar_deleg
ate.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.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/infobars/infobar.h" | |
| 10 #include "chrome/browser/infobars/infobar_service.h" | 9 #include "chrome/browser/infobars/infobar_service.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 11 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 13 #include "chrome/common/content_settings.h" | 12 #include "chrome/common/content_settings.h" |
| 14 #include "chrome/common/content_settings_types.h" | 13 #include "chrome/common/content_settings_types.h" |
| 14 #include "components/infobars/core/infobar.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 | 18 |
| 19 | 19 |
| 20 // static | 20 // static |
| 21 void PopupBlockedInfoBarDelegate::Create(content::WebContents* web_contents, | 21 void PopupBlockedInfoBarDelegate::Create(content::WebContents* web_contents, |
| 22 int num_popups) { | 22 int num_popups) { |
| 23 const GURL& url = web_contents->GetURL(); | 23 const GURL& url = web_contents->GetURL(); |
| 24 Profile* profile = | 24 Profile* profile = |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 DCHECK(popup_blocker_helper); | 106 DCHECK(popup_blocker_helper); |
| 107 PopupBlockerTabHelper::PopupIdMap blocked_popups = | 107 PopupBlockerTabHelper::PopupIdMap blocked_popups = |
| 108 popup_blocker_helper->GetBlockedPopupRequests(); | 108 popup_blocker_helper->GetBlockedPopupRequests(); |
| 109 for (PopupBlockerTabHelper::PopupIdMap::iterator it = blocked_popups.begin(); | 109 for (PopupBlockerTabHelper::PopupIdMap::iterator it = blocked_popups.begin(); |
| 110 it != blocked_popups.end(); ++it) | 110 it != blocked_popups.end(); ++it) |
| 111 popup_blocker_helper->ShowBlockedPopup(it->first); | 111 popup_blocker_helper->ShowBlockedPopup(it->first); |
| 112 | 112 |
| 113 return true; | 113 return true; |
| 114 } | 114 } |
| 115 | 115 |
| OLD | NEW |