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