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/tray/system_tray_notifier.h" | 8 #include "ash/system/tray/system_tray_notifier.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "grit/ash_strings.h" | 10 #include "grit/ash_strings.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 | 57 |
58 void LocaleNotificationDelegate::Error() { | 58 void LocaleNotificationDelegate::Error() { |
59 } | 59 } |
60 | 60 |
61 void LocaleNotificationDelegate::Close(bool by_user) { | 61 void LocaleNotificationDelegate::Close(bool by_user) { |
62 delegate_->AcceptLocaleChange(); | 62 delegate_->AcceptLocaleChange(); |
63 } | 63 } |
64 | 64 |
65 bool LocaleNotificationDelegate::HasClickedListener() { | 65 bool LocaleNotificationDelegate::HasClickedListener() { |
66 return false; | 66 return true; |
67 } | 67 } |
68 | 68 |
69 void LocaleNotificationDelegate::Click() { | 69 void LocaleNotificationDelegate::Click() { |
| 70 delegate_->AcceptLocaleChange(); |
70 } | 71 } |
71 | 72 |
72 void LocaleNotificationDelegate::ButtonClick(int button_index) { | 73 void LocaleNotificationDelegate::ButtonClick(int button_index) { |
73 DCHECK_EQ(0, button_index); | 74 DCHECK_EQ(0, button_index); |
74 delegate_->RevertLocaleChange(); | 75 delegate_->RevertLocaleChange(); |
75 } | 76 } |
76 | 77 |
77 } // namespace | 78 } // namespace |
78 | 79 |
79 LocaleNotificationController::LocaleNotificationController() | 80 LocaleNotificationController::LocaleNotificationController() |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 gfx::Image() /* icon */, | 115 gfx::Image() /* icon */, |
115 base::string16() /* display_source */, | 116 base::string16() /* display_source */, |
116 std::string() /* extension_id */, | 117 std::string() /* extension_id */, |
117 optional, | 118 optional, |
118 new LocaleNotificationDelegate(delegate))); | 119 new LocaleNotificationDelegate(delegate))); |
119 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 120 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
120 } | 121 } |
121 | 122 |
122 } // namespace internal | 123 } // namespace internal |
123 } // namespace ash | 124 } // namespace ash |
OLD | NEW |