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

Side by Side Diff: ash/common/system/chromeos/supervised/tray_supervised_user.cc

Issue 2373863002: mustash: Connect ash system tray "show settings" items to chrome over mojo (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
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/common/system/chromeos/supervised/tray_supervised_user.h" 5 #include "ash/common/system/chromeos/supervised/tray_supervised_user.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/login_status.h" 9 #include "ash/common/login_status.h"
10 #include "ash/common/system/system_notifier.h" 10 #include "ash/common/system/system_notifier.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 tray_view_ = new LabelTrayView(this, GetSupervisedUserIconId()); 62 tray_view_ = new LabelTrayView(this, GetSupervisedUserIconId());
63 UpdateMessage(); 63 UpdateMessage();
64 return tray_view_; 64 return tray_view_;
65 } 65 }
66 66
67 void TraySupervisedUser::DestroyDefaultView() { 67 void TraySupervisedUser::DestroyDefaultView() {
68 tray_view_ = NULL; 68 tray_view_ = NULL;
69 } 69 }
70 70
71 void TraySupervisedUser::OnViewClicked(views::View* sender) { 71 void TraySupervisedUser::OnViewClicked(views::View* sender) {
72 WmShell::Get()->system_tray_delegate()->ShowSupervisedUserInfo(); 72 // TODO(antrim): find out what should we show in this case.
msw 2016/09/27 20:14:33 nit: cc antrim? remove/update bug citation (it's c
James Cook 2016/09/27 20:48:58 Removed the bug number and pinged the bug + kusche
73 // http://crbug.com/229762
73 } 74 }
74 75
75 void TraySupervisedUser::UpdateAfterLoginStatusChange(LoginStatus status) { 76 void TraySupervisedUser::UpdateAfterLoginStatusChange(LoginStatus status) {
76 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); 77 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate();
77 78
78 bool is_user_supervised = delegate->IsUserSupervised(); 79 bool is_user_supervised = delegate->IsUserSupervised();
79 if (status == status_ && is_user_supervised == is_user_supervised_) 80 if (status == status_ && is_user_supervised == is_user_supervised_)
80 return; 81 return;
81 82
82 if (is_user_supervised && !delegate->IsUserChild() && 83 if (is_user_supervised && !delegate->IsUserChild() &&
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 // Not intended to be used for non-supervised users. 126 // Not intended to be used for non-supervised users.
126 CHECK(delegate->IsUserSupervised()); 127 CHECK(delegate->IsUserSupervised());
127 128
128 if (delegate->IsUserChild()) 129 if (delegate->IsUserChild())
129 return IDR_AURA_UBER_TRAY_CHILD_USER; 130 return IDR_AURA_UBER_TRAY_CHILD_USER;
130 return IDR_AURA_UBER_TRAY_SUPERVISED_USER; 131 return IDR_AURA_UBER_TRAY_SUPERVISED_USER;
131 } 132 }
132 133
133 } // namespace ash 134 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698