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

Unified Diff: ash/system/user/tray_user.cc

Issue 14139003: Chrome OS multi-profiles backend and UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move IsMultiProfilesEnabled() out of cros Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/test_system_tray_delegate.cc ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/tray_user.cc
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 23f81a6b52e92ba10c8c024921614bf5e221aa08..60b0d8dc5bd9fad4ae8bc27089c4fb85161a8ead 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "ash/shell.h"
+#include "ash/shell_delegate.h"
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
@@ -470,12 +471,16 @@ void UserView::Layout() {
}
void UserView::ButtonPressed(views::Button* sender, const ui::Event& event) {
- if (sender == logout_button_)
+ if (sender == logout_button_) {
ash::Shell::GetInstance()->system_tray_delegate()->SignOut();
- else if (sender == profile_picture_)
- ash::Shell::GetInstance()->system_tray_delegate()->ChangeProfilePicture();
- else
+ } else if (sender == profile_picture_) {
+ if (ash::Shell::GetInstance()->delegate()->IsMultiProfilesEnabled())
+ ash::Shell::GetInstance()->system_tray_delegate()->ShowUserLogin();
+ else
+ ash::Shell::GetInstance()->system_tray_delegate()->ChangeProfilePicture();
+ } else {
NOTREACHED();
+ }
}
void UserView::AddLogoutButton(ash::user::LoginStatus login) {
« no previous file with comments | « ash/system/tray/test_system_tray_delegate.cc ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698