Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit again Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698