| 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/user/user_view.h" | 5 #include "ash/system/user/user_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/multi_profile_uma.h" | 9 #include "ash/multi_profile_uma.h" |
| 10 #include "ash/popup_message.h" | 10 #include "ash/popup_message.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 if (ash::Shell::GetInstance() | 71 if (ash::Shell::GetInstance() |
| 72 ->session_state_delegate() | 72 ->session_state_delegate() |
| 73 ->IsUserSessionBlocked()) | 73 ->IsUserSessionBlocked()) |
| 74 return; | 74 return; |
| 75 | 75 |
| 76 DCHECK(user_index > 0); | 76 DCHECK(user_index > 0); |
| 77 ash::SessionStateDelegate* delegate = | 77 ash::SessionStateDelegate* delegate = |
| 78 ash::Shell::GetInstance()->session_state_delegate(); | 78 ash::Shell::GetInstance()->session_state_delegate(); |
| 79 ash::MultiProfileUMA::RecordSwitchActiveUser( | 79 ash::MultiProfileUMA::RecordSwitchActiveUser( |
| 80 ash::MultiProfileUMA::SWITCH_ACTIVE_USER_BY_TRAY); | 80 ash::MultiProfileUMA::SWITCH_ACTIVE_USER_BY_TRAY); |
| 81 delegate->SwitchActiveUser( | 81 delegate->SwitchActiveUser(delegate->GetUserInfo(user_index)->GetAccountId()); |
| 82 delegate->GetUserInfo(user_index)->GetAccountId().GetUserEmail()); | |
| 83 } | 82 } |
| 84 | 83 |
| 85 class LogoutButton : public TrayPopupLabelButton { | 84 class LogoutButton : public TrayPopupLabelButton { |
| 86 public: | 85 public: |
| 87 // If |placeholder| is true, button is used as placeholder. That means that | 86 // If |placeholder| is true, button is used as placeholder. That means that |
| 88 // button is inactive and is not painted, but consume the same ammount of | 87 // button is inactive and is not painted, but consume the same ammount of |
| 89 // space, as if it was painted. | 88 // space, as if it was painted. |
| 90 LogoutButton(views::ButtonListener* listener, | 89 LogoutButton(views::ButtonListener* listener, |
| 91 const base::string16& text, | 90 const base::string16& text, |
| 92 bool placeholder) | 91 bool placeholder) |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 focus_manager_ = NULL; | 550 focus_manager_ = NULL; |
| 552 if (user_card_view_->GetFocusManager()) | 551 if (user_card_view_->GetFocusManager()) |
| 553 user_card_view_->GetFocusManager()->ClearFocus(); | 552 user_card_view_->GetFocusManager()->ClearFocus(); |
| 554 popup_message_.reset(); | 553 popup_message_.reset(); |
| 555 mouse_watcher_.reset(); | 554 mouse_watcher_.reset(); |
| 556 add_menu_option_.reset(); | 555 add_menu_option_.reset(); |
| 557 } | 556 } |
| 558 | 557 |
| 559 } // namespace tray | 558 } // namespace tray |
| 560 } // namespace ash | 559 } // namespace ash |
| OLD | NEW |