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 14 matching lines...) Expand all Loading... |
25 const char kLocaleChangeNotificationId[] = "chrome://settings/locale"; | 25 const char kLocaleChangeNotificationId[] = "chrome://settings/locale"; |
26 | 26 |
27 class LocaleNotificationDelegate : public message_center::NotificationDelegate { | 27 class LocaleNotificationDelegate : public message_center::NotificationDelegate { |
28 public: | 28 public: |
29 explicit LocaleNotificationDelegate(LocaleObserver::Delegate* delegate); | 29 explicit LocaleNotificationDelegate(LocaleObserver::Delegate* delegate); |
30 | 30 |
31 protected: | 31 protected: |
32 virtual ~LocaleNotificationDelegate(); | 32 virtual ~LocaleNotificationDelegate(); |
33 | 33 |
34 // message_center::NotificationDelegate overrides: | 34 // message_center::NotificationDelegate overrides: |
35 virtual void Display() OVERRIDE; | 35 virtual void Display() override; |
36 virtual void Error() OVERRIDE; | 36 virtual void Error() override; |
37 virtual void Close(bool by_user) OVERRIDE; | 37 virtual void Close(bool by_user) override; |
38 virtual bool HasClickedListener() OVERRIDE; | 38 virtual bool HasClickedListener() override; |
39 virtual void Click() OVERRIDE; | 39 virtual void Click() override; |
40 virtual void ButtonClick(int button_index) OVERRIDE; | 40 virtual void ButtonClick(int button_index) override; |
41 | 41 |
42 private: | 42 private: |
43 LocaleObserver::Delegate* delegate_; | 43 LocaleObserver::Delegate* delegate_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(LocaleNotificationDelegate); | 45 DISALLOW_COPY_AND_ASSIGN(LocaleNotificationDelegate); |
46 }; | 46 }; |
47 | 47 |
48 LocaleNotificationDelegate::LocaleNotificationDelegate( | 48 LocaleNotificationDelegate::LocaleNotificationDelegate( |
49 LocaleObserver::Delegate* delegate) | 49 LocaleObserver::Delegate* delegate) |
50 : delegate_(delegate) { | 50 : delegate_(delegate) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 base::string16() /* display_source */, | 118 base::string16() /* display_source */, |
119 message_center::NotifierId( | 119 message_center::NotifierId( |
120 message_center::NotifierId::SYSTEM_COMPONENT, | 120 message_center::NotifierId::SYSTEM_COMPONENT, |
121 system_notifier::kNotifierLocale), | 121 system_notifier::kNotifierLocale), |
122 optional, | 122 optional, |
123 new LocaleNotificationDelegate(delegate))); | 123 new LocaleNotificationDelegate(delegate))); |
124 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 124 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
125 } | 125 } |
126 | 126 |
127 } // namespace ash | 127 } // namespace ash |
OLD | NEW |