| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/system/locale/locale_notification_controller.h" | 5 #include "ash/system/locale/locale_notification_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/system_notifier.h" | 8 #include "ash/system/system_notifier.h" |
| 9 #include "ash/system/tray/system_tray_notifier.h" | 9 #include "ash/system/tray/system_tray_notifier.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 to_locale, cur_locale, true); | 93 to_locale, cur_locale, true); |
| 94 | 94 |
| 95 message_center::RichNotificationData optional; | 95 message_center::RichNotificationData optional; |
| 96 optional.buttons.push_back(message_center::ButtonInfo( | 96 optional.buttons.push_back(message_center::ButtonInfo( |
| 97 l10n_util::GetStringFUTF16( | 97 l10n_util::GetStringFUTF16( |
| 98 IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE, from))); | 98 IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE, from))); |
| 99 optional.never_timeout = true; | 99 optional.never_timeout = true; |
| 100 | 100 |
| 101 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 101 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 102 scoped_ptr<Notification> notification(new Notification( | 102 scoped_ptr<Notification> notification(new Notification( |
| 103 message_center::NOTIFICATION_TYPE_SIMPLE, | 103 message_center::NOTIFICATION_TYPE_SIMPLE, kLocaleChangeNotificationId, |
| 104 kLocaleChangeNotificationId, | 104 base::string16() /* title */, |
| 105 base::string16() /* title */, | 105 l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE, |
| 106 l10n_util::GetStringFUTF16( | 106 from, to), |
| 107 IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE, from, to), | |
| 108 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_LOCALE), | 107 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_LOCALE), |
| 109 base::string16() /* display_source */, | 108 base::string16() /* display_source */, GURL(), |
| 110 message_center::NotifierId( | 109 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
| 111 message_center::NotifierId::SYSTEM_COMPONENT, | 110 system_notifier::kNotifierLocale), |
| 112 system_notifier::kNotifierLocale), | 111 optional, new LocaleNotificationDelegate(delegate))); |
| 113 optional, | |
| 114 new LocaleNotificationDelegate(delegate))); | |
| 115 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 112 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
| 116 } | 113 } |
| 117 | 114 |
| 118 } // namespace ash | 115 } // namespace ash |
| OLD | NEW |