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

Unified Diff: chrome/browser/extensions/app_notify_channel_ui_impl.cc

Issue 11740034: Rename AppNotifyChannelUIImpl::InfoBar to AppNotifyChannelUIInfoBarDelegate for consistency with ot… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_ui_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/app_notify_channel_ui_impl.cc
===================================================================
--- chrome/browser/extensions/app_notify_channel_ui_impl.cc (revision 175045)
+++ chrome/browser/extensions/app_notify_channel_ui_impl.cc (working copy)
@@ -29,12 +29,14 @@
namespace extensions {
-class AppNotifyChannelUIImpl::InfoBar : public ConfirmInfoBarDelegate {
+namespace {
+
+class AppNotifyChannelUIInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- InfoBar(AppNotifyChannelUIImpl* creator,
- InfoBarService* infobar_service,
- const std::string& app_name);
- virtual ~InfoBar();
+ AppNotifyChannelUIInfoBarDelegate(AppNotifyChannelUIImpl* creator,
+ InfoBarService* infobar_service,
+ const std::string& app_name);
+ virtual ~AppNotifyChannelUIInfoBarDelegate();
// ConfirmInfoBarDelegate.
virtual string16 GetMessageText() const OVERRIDE;
@@ -47,10 +49,10 @@
AppNotifyChannelUIImpl* creator_;
std::string app_name_;
- DISALLOW_COPY_AND_ASSIGN(InfoBar);
+ DISALLOW_COPY_AND_ASSIGN(AppNotifyChannelUIInfoBarDelegate);
};
-AppNotifyChannelUIImpl::InfoBar::InfoBar(
+AppNotifyChannelUIInfoBarDelegate::AppNotifyChannelUIInfoBarDelegate(
AppNotifyChannelUIImpl* creator,
InfoBarService* infobar_service,
const std::string& app_name)
@@ -59,14 +61,15 @@
app_name_(app_name) {
}
-AppNotifyChannelUIImpl::InfoBar::~InfoBar() {}
+AppNotifyChannelUIInfoBarDelegate::~AppNotifyChannelUIInfoBarDelegate() {
+}
-string16 AppNotifyChannelUIImpl::InfoBar::GetMessageText() const {
+string16 AppNotifyChannelUIInfoBarDelegate::GetMessageText() const {
return l10n_util::GetStringFUTF16(IDS_APP_NOTIFICATION_NEED_SIGNIN,
UTF8ToUTF16(app_name_));
}
-string16 AppNotifyChannelUIImpl::InfoBar::GetButtonLabel(
+string16 AppNotifyChannelUIInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
if (button == BUTTON_OK) {
return l10n_util::GetStringUTF16(IDS_APP_NOTIFICATION_NEED_SIGNIN_ACCEPT);
@@ -78,21 +81,23 @@
return string16();
}
-bool AppNotifyChannelUIImpl::InfoBar::Accept() {
+bool AppNotifyChannelUIInfoBarDelegate::Accept() {
creator_->OnInfoBarResult(true);
return true;
}
-bool AppNotifyChannelUIImpl::InfoBar::Cancel() {
+bool AppNotifyChannelUIInfoBarDelegate::Cancel() {
creator_->OnInfoBarResult(false);
return true;
}
-void AppNotifyChannelUIImpl::InfoBar::InfoBarDismissed() {
+void AppNotifyChannelUIInfoBarDelegate::InfoBarDismissed() {
Cancel();
}
+} // namespace
+
AppNotifyChannelUIImpl::AppNotifyChannelUIImpl(
Profile* profile,
content::WebContents* web_contents,
@@ -139,7 +144,7 @@
InfoBarService* infobar_service =
InfoBarService::FromWebContents(web_contents_);
- infobar_service->AddInfoBar(new AppNotifyChannelUIImpl::InfoBar(
+ infobar_service->AddInfoBar(new AppNotifyChannelUIInfoBarDelegate(
this, infobar_service, app_name_));
}
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_ui_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698