| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 return; | 45 return; |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 | 48 |
| 49 infobar_service->AddInfoBar(infobar.Pass()); | 49 infobar_service->AddInfoBar(infobar.Pass()); |
| 50 } | 50 } |
| 51 | 51 |
| 52 PopupBlockedInfoBarDelegate::~PopupBlockedInfoBarDelegate() { | 52 PopupBlockedInfoBarDelegate::~PopupBlockedInfoBarDelegate() { |
| 53 } | 53 } |
| 54 | 54 |
| 55 infobars::InfoBarDelegate::InfoBarIdentifier |
| 56 PopupBlockedInfoBarDelegate::GetIdentifier() const { |
| 57 return POPUP_BLOCKED_INFOBAR_DELEGATE_ID; |
| 58 } |
| 59 |
| 55 int PopupBlockedInfoBarDelegate::GetIconId() const { | 60 int PopupBlockedInfoBarDelegate::GetIconId() const { |
| 56 return IDR_BLOCKED_POPUPS; | 61 return IDR_BLOCKED_POPUPS; |
| 57 } | 62 } |
| 58 | 63 |
| 59 PopupBlockedInfoBarDelegate* | 64 PopupBlockedInfoBarDelegate* |
| 60 PopupBlockedInfoBarDelegate::AsPopupBlockedInfoBarDelegate() { | 65 PopupBlockedInfoBarDelegate::AsPopupBlockedInfoBarDelegate() { |
| 61 return this; | 66 return this; |
| 62 } | 67 } |
| 63 | 68 |
| 64 PopupBlockedInfoBarDelegate::PopupBlockedInfoBarDelegate( | 69 PopupBlockedInfoBarDelegate::PopupBlockedInfoBarDelegate( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 PopupBlockerTabHelper::FromWebContents(web_contents); | 109 PopupBlockerTabHelper::FromWebContents(web_contents); |
| 105 DCHECK(popup_blocker_helper); | 110 DCHECK(popup_blocker_helper); |
| 106 PopupBlockerTabHelper::PopupIdMap blocked_popups = | 111 PopupBlockerTabHelper::PopupIdMap blocked_popups = |
| 107 popup_blocker_helper->GetBlockedPopupRequests(); | 112 popup_blocker_helper->GetBlockedPopupRequests(); |
| 108 for (PopupBlockerTabHelper::PopupIdMap::iterator it = blocked_popups.begin(); | 113 for (PopupBlockerTabHelper::PopupIdMap::iterator it = blocked_popups.begin(); |
| 109 it != blocked_popups.end(); ++it) | 114 it != blocked_popups.end(); ++it) |
| 110 popup_blocker_helper->ShowBlockedPopup(it->first); | 115 popup_blocker_helper->ShowBlockedPopup(it->first); |
| 111 | 116 |
| 112 return true; | 117 return true; |
| 113 } | 118 } |
| OLD | NEW |