| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/session/logout_button_tray.h" | 5 #include "ash/system/chromeos/session/logout_button_tray.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/shelf/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 base::string16 LogoutButtonTray::GetAccessibleNameForTray() { | 118 base::string16 LogoutButtonTray::GetAccessibleNameForTray() { |
| 119 return button_->GetText(); | 119 return button_->GetText(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void LogoutButtonTray::HideBubbleWithView( | 122 void LogoutButtonTray::HideBubbleWithView( |
| 123 const views::TrayBubbleView* bubble_view) { | 123 const views::TrayBubbleView* bubble_view) { |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool LogoutButtonTray::ClickedOutsideBubble() { | 126 void LogoutButtonTray::ClickedOutsideBubble() {} |
| 127 return false; | |
| 128 } | |
| 129 | 127 |
| 130 void LogoutButtonTray::OnShowLogoutButtonInTrayChanged(bool show) { | 128 void LogoutButtonTray::OnShowLogoutButtonInTrayChanged(bool show) { |
| 131 show_logout_button_in_tray_ = show; | 129 show_logout_button_in_tray_ = show; |
| 132 UpdateVisibility(); | 130 UpdateVisibility(); |
| 133 } | 131 } |
| 134 | 132 |
| 135 void LogoutButtonTray::OnLogoutDialogDurationChanged(base::TimeDelta duration) { | 133 void LogoutButtonTray::OnLogoutDialogDurationChanged(base::TimeDelta duration) { |
| 136 dialog_duration_ = duration; | 134 dialog_duration_ = duration; |
| 137 } | 135 } |
| 138 | 136 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 158 UpdateVisibility(); | 156 UpdateVisibility(); |
| 159 } | 157 } |
| 160 | 158 |
| 161 void LogoutButtonTray::UpdateVisibility() { | 159 void LogoutButtonTray::UpdateVisibility() { |
| 162 SetVisible(show_logout_button_in_tray_ && | 160 SetVisible(show_logout_button_in_tray_ && |
| 163 login_status_ != user::LOGGED_IN_NONE && | 161 login_status_ != user::LOGGED_IN_NONE && |
| 164 login_status_ != user::LOGGED_IN_LOCKED); | 162 login_status_ != user::LOGGED_IN_LOCKED); |
| 165 } | 163 } |
| 166 | 164 |
| 167 } // namespace ash | 165 } // namespace ash |
| OLD | NEW |