| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_options_menu_model.h" | 5 #include "chrome/browser/notifications/notification_options_menu_model.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 const string16 settings_label = l10n_util::GetStringUTF16( | 49 const string16 settings_label = l10n_util::GetStringUTF16( |
| 50 IDS_NOTIFICATIONS_SETTINGS_BUTTON); | 50 IDS_NOTIFICATIONS_SETTINGS_BUTTON); |
| 51 AddItem(kOpenContentSettingsCommand, settings_label); | 51 AddItem(kOpenContentSettingsCommand, settings_label); |
| 52 } | 52 } |
| 53 | 53 |
| 54 NotificationOptionsMenuModel::~NotificationOptionsMenuModel() { | 54 NotificationOptionsMenuModel::~NotificationOptionsMenuModel() { |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool NotificationOptionsMenuModel::IsLabelForCommandIdDynamic(int command_id) | 57 bool NotificationOptionsMenuModel::IsItemForCommandIdDynamic(int command_id) |
| 58 const { | 58 const { |
| 59 return command_id == kTogglePermissionCommand || | 59 return command_id == kTogglePermissionCommand || |
| 60 command_id == kToggleExtensionCommand; | 60 command_id == kToggleExtensionCommand; |
| 61 } | 61 } |
| 62 | 62 |
| 63 string16 NotificationOptionsMenuModel::GetLabelForCommandId(int command_id) | 63 string16 NotificationOptionsMenuModel::GetLabelForCommandId(int command_id) |
| 64 const { | 64 const { |
| 65 // TODO(tfarina,johnnyg): Removed this code if we decide to close | 65 // TODO(tfarina,johnnyg): Removed this code if we decide to close |
| 66 // notifications after permissions are revoked. | 66 // notifications after permissions are revoked. |
| 67 if (command_id == kTogglePermissionCommand || | 67 if (command_id == kTogglePermissionCommand || |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 #endif // OS_WIN | 159 #endif // OS_WIN |
| 160 } | 160 } |
| 161 break; | 161 break; |
| 162 } | 162 } |
| 163 default: | 163 default: |
| 164 NOTREACHED(); | 164 NOTREACHED(); |
| 165 break; | 165 break; |
| 166 } | 166 } |
| 167 } | 167 } |
| OLD | NEW |