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

Side by Side Diff: ash/system/chromeos/rotation/tray_rotation_lock.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/shelf/shelf_layout_manager_unittest.cc ('k') | ash/system/chromeos/tray_display.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 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/chromeos/rotation/tray_rotation_lock.h" 5 #include "ash/system/chromeos/rotation/tray_rotation_lock.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/tray/system_tray.h" 8 #include "ash/common/system/tray/system_tray.h"
9 #include "ash/common/system/tray/tray_constants.h" 9 #include "ash/common/system/tray/tray_constants.h"
10 #include "ash/common/system/tray/tray_item_more.h" 10 #include "ash/common/system/tray/tray_item_more.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 base::string16 label = l10n_util::GetStringUTF16( 98 base::string16 label = l10n_util::GetStringUTF16(
99 rotation_locked ? IDS_ASH_STATUS_TRAY_ROTATION_LOCK_LOCKED 99 rotation_locked ? IDS_ASH_STATUS_TRAY_ROTATION_LOCK_LOCKED
100 : IDS_ASH_STATUS_TRAY_ROTATION_LOCK_AUTO); 100 : IDS_ASH_STATUS_TRAY_ROTATION_LOCK_AUTO);
101 SetLabel(label); 101 SetLabel(label);
102 SetAccessibleName(label); 102 SetAccessibleName(label);
103 } 103 }
104 104
105 } // namespace tray 105 } // namespace tray
106 106
107 TrayRotationLock::TrayRotationLock(SystemTray* system_tray) 107 TrayRotationLock::TrayRotationLock(SystemTray* system_tray)
108 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_AUTO_ROTATION_LOCKED), 108 : TrayImageItem(system_tray,
109 IDR_AURA_UBER_TRAY_AUTO_ROTATION_LOCKED,
110 UMA_ROTATION_LOCK),
109 observing_rotation_(false), 111 observing_rotation_(false),
110 observing_shell_(true) { 112 observing_shell_(true) {
111 WmShell::Get()->AddShellObserver(this); 113 WmShell::Get()->AddShellObserver(this);
112 } 114 }
113 115
114 TrayRotationLock::~TrayRotationLock() { 116 TrayRotationLock::~TrayRotationLock() {
115 StopObservingShell(); 117 StopObservingShell();
116 } 118 }
117 119
118 void TrayRotationLock::OnRotationLockChanged(bool rotation_locked) { 120 void TrayRotationLock::OnRotationLockChanged(bool rotation_locked) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 177 }
176 178
177 void TrayRotationLock::StopObservingShell() { 179 void TrayRotationLock::StopObservingShell() {
178 if (!observing_shell_) 180 if (!observing_shell_)
179 return; 181 return;
180 WmShell::Get()->RemoveShellObserver(this); 182 WmShell::Get()->RemoveShellObserver(this);
181 observing_shell_ = false; 183 observing_shell_ = false;
182 } 184 }
183 185
184 } // namespace ash 186 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/system/chromeos/tray_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698