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

Side by Side Diff: ash/system/logout_button/tray_logout_button.cc

Issue 11421167: Fixed non-speaking Sign out buttons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | ash/system/user/tray_user.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/logout_button/tray_logout_button.h" 5 #include "ash/system/logout_button/tray_logout_button.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 border->SetImages(views::CustomButton::STATE_HOVERED, 79 border->SetImages(views::CustomButton::STATE_HOVERED,
80 views::BorderImages(kLogoutButtonBorderHotImages)); 80 views::BorderImages(kLogoutButtonBorderHotImages));
81 border->SetImages(views::CustomButton::STATE_PRESSED, 81 border->SetImages(views::CustomButton::STATE_PRESSED,
82 views::BorderImages(kLogoutButtonBorderPushedImages)); 82 views::BorderImages(kLogoutButtonBorderPushedImages));
83 set_border(border); 83 set_border(border);
84 OnLoginStatusChanged(status); 84 OnLoginStatusChanged(status);
85 } 85 }
86 86
87 void OnLoginStatusChanged(user::LoginStatus status) { 87 void OnLoginStatusChanged(user::LoginStatus status) {
88 login_status_ = status; 88 login_status_ = status;
89 SetText(GetLocalizedSignOutStringForStatus(login_status_, false)); 89 const string16 title = GetLocalizedSignOutStringForStatus(login_status_,
90 false);
91 SetText(title);
92 SetAccessibleName(title);
90 UpdateVisibility(); 93 UpdateVisibility();
91 } 94 }
92 95
93 void OnShowLogoutButtonInTrayChanged(bool show) { 96 void OnShowLogoutButtonInTrayChanged(bool show) {
94 show_logout_button_in_tray_ = show; 97 show_logout_button_in_tray_ = show;
95 UpdateVisibility(); 98 UpdateVisibility();
96 } 99 }
97 100
98 // Overridden from views::ButtonListener. 101 // Overridden from views::ButtonListener.
99 void ButtonPressed(views::Button* sender, const ui::Event& event) OVERRIDE { 102 void ButtonPressed(views::Button* sender, const ui::Event& event) OVERRIDE {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void TrayLogoutButton::UpdateAfterLoginStatusChange(user::LoginStatus status) { 137 void TrayLogoutButton::UpdateAfterLoginStatusChange(user::LoginStatus status) {
135 logout_button_->OnLoginStatusChanged(status); 138 logout_button_->OnLoginStatusChanged(status);
136 } 139 }
137 140
138 void TrayLogoutButton::OnShowLogoutButtonInTrayChanged(bool show) { 141 void TrayLogoutButton::OnShowLogoutButtonInTrayChanged(bool show) {
139 logout_button_->OnShowLogoutButtonInTrayChanged(show); 142 logout_button_->OnShowLogoutButtonInTrayChanged(show);
140 } 143 }
141 144
142 } // namespace internal 145 } // namespace internal
143 } // namespace ash 146 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/user/tray_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698