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