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

Side by Side Diff: chrome/browser/notifications/notification_permission_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/notifications/notification_permission_infobar_delegate. h" 5 #include "chrome/browser/notifications/notification_permission_infobar_delegate. h"
6 6
7 #include "chrome/browser/android/android_theme_resources.h" 7 #include "chrome/browser/android/android_theme_resources.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "components/infobars/core/infobar.h" 10 #include "components/infobars/core/infobar.h"
(...skipping 21 matching lines...) Expand all
32 : PermissionInfobarDelegate(requesting_frame, 32 : PermissionInfobarDelegate(requesting_frame,
33 content::PermissionType::NOTIFICATIONS, 33 content::PermissionType::NOTIFICATIONS,
34 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, 34 CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
35 callback), 35 callback),
36 requesting_frame_(requesting_frame), 36 requesting_frame_(requesting_frame),
37 display_languages_(display_languages) {} 37 display_languages_(display_languages) {}
38 38
39 NotificationPermissionInfobarDelegate::~NotificationPermissionInfobarDelegate() 39 NotificationPermissionInfobarDelegate::~NotificationPermissionInfobarDelegate()
40 {} 40 {}
41 41
42 infobars::InfoBarDelegate::InfoBarIdentifier
43 NotificationPermissionInfobarDelegate::GetIdentifier() const {
44 return NOTIFICATION_PERMISSION_INFOBAR_DELEGATE;
45 }
46
42 int NotificationPermissionInfobarDelegate::GetIconId() const { 47 int NotificationPermissionInfobarDelegate::GetIconId() const {
43 return IDR_ANDROID_INFOBAR_NOTIFICATIONS; 48 return IDR_ANDROID_INFOBAR_NOTIFICATIONS;
44 } 49 }
45 50
46 base::string16 NotificationPermissionInfobarDelegate::GetMessageText() const { 51 base::string16 NotificationPermissionInfobarDelegate::GetMessageText() const {
47 return l10n_util::GetStringFUTF16( 52 return l10n_util::GetStringFUTF16(
48 IDS_NOTIFICATION_PERMISSIONS, 53 IDS_NOTIFICATION_PERMISSIONS,
49 url_formatter::FormatUrlForSecurityDisplay(requesting_frame_.GetOrigin(), 54 url_formatter::FormatUrlForSecurityDisplay(requesting_frame_.GetOrigin(),
50 display_languages_)); 55 display_languages_));
51 } 56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698