| 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/ui/cocoa/apps/quit_with_apps_controller_mac.h" | 5 #include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/i18n/number_formatting.h" | 8 #include "base/i18n/number_formatting.h" |
| 9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 rich_notification_data.buttons.push_back(suppression_button_info); | 66 rich_notification_data.buttons.push_back(suppression_button_info); |
| 67 } | 67 } |
| 68 | 68 |
| 69 notification_.reset(new Notification( | 69 notification_.reset(new Notification( |
| 70 message_center::NOTIFICATION_TYPE_SIMPLE, | 70 message_center::NOTIFICATION_TYPE_SIMPLE, |
| 71 GURL(kQuitWithAppsOriginUrl), | 71 GURL(kQuitWithAppsOriginUrl), |
| 72 l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_TITLE), | 72 l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_TITLE), |
| 73 l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_EXPLANATION), | 73 l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_EXPLANATION), |
| 74 ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 74 ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 75 IDR_PRODUCT_LOGO_128), | 75 IDR_PRODUCT_LOGO_128), |
| 76 blink::WebTextDirectionDefault, | |
| 77 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, | 76 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
| 78 kQuitWithAppsNotificationID), | 77 kQuitWithAppsNotificationID), |
| 79 l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_NOTIFICATION_DISPLAY_SOURCE), | 78 l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_NOTIFICATION_DISPLAY_SOURCE), |
| 80 replace_id, | 79 replace_id, |
| 81 rich_notification_data, | 80 rich_notification_data, |
| 82 this)); | 81 this)); |
| 83 } | 82 } |
| 84 | 83 |
| 85 QuitWithAppsController::~QuitWithAppsController() {} | 84 QuitWithAppsController::~QuitWithAppsController() {} |
| 86 | 85 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 196 |
| 198 // Always return false, the notification UI can be used to quit all apps which | 197 // Always return false, the notification UI can be used to quit all apps which |
| 199 // will cause Chrome to quit. | 198 // will cause Chrome to quit. |
| 200 return false; | 199 return false; |
| 201 } | 200 } |
| 202 | 201 |
| 203 // static | 202 // static |
| 204 void QuitWithAppsController::RegisterPrefs(PrefRegistrySimple* registry) { | 203 void QuitWithAppsController::RegisterPrefs(PrefRegistrySimple* registry) { |
| 205 registry->RegisterBooleanPref(prefs::kNotifyWhenAppsKeepChromeAlive, true); | 204 registry->RegisterBooleanPref(prefs::kNotifyWhenAppsKeepChromeAlive, true); |
| 206 } | 205 } |
| OLD | NEW |