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

Side by Side Diff: ash/common/system/chromeos/screen_security/screen_tray_item.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/screen_security/screen_tray_item.h" 5 #include "ash/common/system/chromeos/screen_security/screen_tray_item.h"
6 6
7 #include "ash/common/shelf/wm_shelf_util.h" 7 #include "ash/common/shelf/wm_shelf_util.h"
8 #include "ash/common/system/tray/fixed_sized_image_view.h" 8 #include "ash/common/system/tray/fixed_sized_image_view.h"
9 #include "ash/common/system/tray/tray_constants.h" 9 #include "ash/common/system/tray/tray_constants.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ScreenNotificationDelegate::~ScreenNotificationDelegate() {} 112 ScreenNotificationDelegate::~ScreenNotificationDelegate() {}
113 113
114 void ScreenNotificationDelegate::ButtonClick(int button_index) { 114 void ScreenNotificationDelegate::ButtonClick(int button_index) {
115 DCHECK_EQ(0, button_index); 115 DCHECK_EQ(0, button_index);
116 screen_tray_->Stop(); 116 screen_tray_->Stop();
117 screen_tray_->RecordStoppedFromNotificationViewMetric(); 117 screen_tray_->RecordStoppedFromNotificationViewMetric();
118 } 118 }
119 119
120 } // namespace tray 120 } // namespace tray
121 121
122 ScreenTrayItem::ScreenTrayItem(SystemTray* system_tray) 122 ScreenTrayItem::ScreenTrayItem(SystemTray* system_tray, UmaType uma_type)
123 : SystemTrayItem(system_tray), 123 : SystemTrayItem(system_tray, uma_type),
124 tray_view_(NULL), 124 tray_view_(NULL),
125 default_view_(NULL), 125 default_view_(NULL),
126 is_started_(false), 126 is_started_(false),
127 stop_callback_(base::Bind(&base::DoNothing)) {} 127 stop_callback_(base::Bind(&base::DoNothing)) {}
128 128
129 ScreenTrayItem::~ScreenTrayItem() {} 129 ScreenTrayItem::~ScreenTrayItem() {}
130 130
131 void ScreenTrayItem::Update() { 131 void ScreenTrayItem::Update() {
132 if (tray_view_) 132 if (tray_view_)
133 tray_view_->Update(); 133 tray_view_->Update();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 // Center the item dependent on the orientation of the shelf. 188 // Center the item dependent on the orientation of the shelf.
189 views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment) 189 views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment)
190 ? views::BoxLayout::kHorizontal 190 ? views::BoxLayout::kHorizontal
191 : views::BoxLayout::kVertical; 191 : views::BoxLayout::kVertical;
192 tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0)); 192 tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0));
193 tray_view_->Layout(); 193 tray_view_->Layout();
194 } 194 }
195 195
196 } // namespace ash 196 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698