Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1501)

Side by Side Diff: ash/system/locale/locale_notification_controller.cc

Issue 22709005: Accepts the locale change when click on the notification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698