| OLD | NEW |
| 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 11 matching lines...) Expand all Loading... |
| 22 requesting_frame, user_gesture, profile, callback)))); | 22 requesting_frame, user_gesture, profile, callback)))); |
| 23 } | 23 } |
| 24 | 24 |
| 25 NotificationPermissionInfoBarDelegate::NotificationPermissionInfoBarDelegate( | 25 NotificationPermissionInfoBarDelegate::NotificationPermissionInfoBarDelegate( |
| 26 const GURL& requesting_frame, | 26 const GURL& requesting_frame, |
| 27 bool user_gesture, | 27 bool user_gesture, |
| 28 Profile* profile, | 28 Profile* profile, |
| 29 const PermissionSetCallback& callback) | 29 const PermissionSetCallback& callback) |
| 30 : PermissionInfoBarDelegate(requesting_frame, | 30 : PermissionInfoBarDelegate(requesting_frame, |
| 31 content::PermissionType::NOTIFICATIONS, | 31 content::PermissionType::NOTIFICATIONS, |
| 32 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, | |
| 33 user_gesture, | 32 user_gesture, |
| 34 profile, | 33 profile, |
| 35 callback) {} | 34 callback) {} |
| 36 | 35 |
| 37 NotificationPermissionInfoBarDelegate::~NotificationPermissionInfoBarDelegate() | 36 NotificationPermissionInfoBarDelegate::~NotificationPermissionInfoBarDelegate() |
| 38 {} | 37 {} |
| 39 | 38 |
| 40 infobars::InfoBarDelegate::InfoBarIdentifier | 39 infobars::InfoBarDelegate::InfoBarIdentifier |
| 41 NotificationPermissionInfoBarDelegate::GetIdentifier() const { | 40 NotificationPermissionInfoBarDelegate::GetIdentifier() const { |
| 42 return NOTIFICATION_PERMISSION_INFOBAR_DELEGATE; | 41 return NOTIFICATION_PERMISSION_INFOBAR_DELEGATE; |
| 43 } | 42 } |
| 44 | 43 |
| 45 int NotificationPermissionInfoBarDelegate::GetIconId() const { | 44 int NotificationPermissionInfoBarDelegate::GetIconId() const { |
| 46 return IDR_ANDROID_INFOBAR_NOTIFICATIONS; | 45 return IDR_ANDROID_INFOBAR_NOTIFICATIONS; |
| 47 } | 46 } |
| 48 | 47 |
| 49 int NotificationPermissionInfoBarDelegate::GetMessageResourceId() const { | 48 int NotificationPermissionInfoBarDelegate::GetMessageResourceId() const { |
| 50 return IDS_NOTIFICATION_PERMISSIONS; | 49 return IDS_NOTIFICATION_PERMISSIONS; |
| 51 } | 50 } |
| OLD | NEW |