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

Side by Side Diff: ash/common/system/user/tray_user.cc

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the COUNT value from the SystemMenuDefaultViewRows enum. Created 4 years, 5 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
« no previous file with comments | « ash/common/system/update/tray_update.cc ('k') | ash/common/system/user/tray_user_separator.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/common/system/user/tray_user.h" 5 #include "ash/common/system/user/tray_user.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/shelf/wm_shelf_util.h" 9 #include "ash/common/shelf/wm_shelf_util.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 20 matching lines...) Expand all
31 31
32 namespace { 32 namespace {
33 33
34 const int kUserLabelToIconPadding = 5; 34 const int kUserLabelToIconPadding = 5;
35 35
36 } // namespace 36 } // namespace
37 37
38 namespace ash { 38 namespace ash {
39 39
40 TrayUser::TrayUser(SystemTray* system_tray, UserIndex index) 40 TrayUser::TrayUser(SystemTray* system_tray, UserIndex index)
41 : SystemTrayItem(system_tray), 41 : SystemTrayItem(system_tray, UMA_USER),
42 user_index_(index), 42 user_index_(index),
43 user_(nullptr), 43 user_(nullptr),
44 layout_view_(nullptr), 44 layout_view_(nullptr),
45 avatar_(nullptr), 45 avatar_(nullptr),
46 label_(nullptr) { 46 label_(nullptr) {
47 WmShell::Get()->system_tray_notifier()->AddUserObserver(this); 47 WmShell::Get()->system_tray_notifier()->AddUserObserver(this);
48 } 48 }
49 49
50 TrayUser::~TrayUser() { 50 TrayUser::~TrayUser() {
51 WmShell::Get()->system_tray_notifier()->RemoveUserObserver(this); 51 WmShell::Get()->system_tray_notifier()->RemoveUserObserver(this);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Unit tests might come here with no images for some users. 262 // Unit tests might come here with no images for some users.
263 if (avatar_->size().IsEmpty()) 263 if (avatar_->size().IsEmpty())
264 avatar_->SetSize(gfx::Size(kTrayItemSize, kTrayItemSize)); 264 avatar_->SetSize(gfx::Size(kTrayItemSize, kTrayItemSize));
265 } 265 }
266 266
267 void TrayUser::UpdateLayoutOfItem() { 267 void TrayUser::UpdateLayoutOfItem() {
268 UpdateAfterShelfAlignmentChange(system_tray()->shelf_alignment()); 268 UpdateAfterShelfAlignmentChange(system_tray()->shelf_alignment());
269 } 269 }
270 270
271 } // namespace ash 271 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/update/tray_update.cc ('k') | ash/common/system/user/tray_user_separator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698