OLD | NEW |
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/system/tray/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 AddTrayItem(base::WrapUnique(screen_capture_tray_item_)); | 258 AddTrayItem(base::WrapUnique(screen_capture_tray_item_)); |
259 screen_share_tray_item_ = new ScreenShareTrayItem(this); | 259 screen_share_tray_item_ = new ScreenShareTrayItem(this); |
260 AddTrayItem(base::WrapUnique(screen_share_tray_item_)); | 260 AddTrayItem(base::WrapUnique(screen_share_tray_item_)); |
261 AddTrayItem(base::MakeUnique<MultiProfileMediaTrayItem>(this)); | 261 AddTrayItem(base::MakeUnique<MultiProfileMediaTrayItem>(this)); |
262 tray_audio_ = new TrayAudio(this); | 262 tray_audio_ = new TrayAudio(this); |
263 AddTrayItem(base::WrapUnique(tray_audio_)); | 263 AddTrayItem(base::WrapUnique(tray_audio_)); |
264 tray_scale_ = new TrayScale(this); | 264 tray_scale_ = new TrayScale(this); |
265 AddTrayItem(base::WrapUnique(tray_scale_)); | 265 AddTrayItem(base::WrapUnique(tray_scale_)); |
266 AddTrayItem(base::MakeUnique<TrayBrightness>(this)); | 266 AddTrayItem(base::MakeUnique<TrayBrightness>(this)); |
267 AddTrayItem(base::MakeUnique<TrayCapsLock>(this)); | 267 AddTrayItem(base::MakeUnique<TrayCapsLock>(this)); |
268 tray_night_light_ = new TrayNightLight(this); | 268 if (NightLightController::IsFeatureEnabled()) { |
269 AddTrayItem(base::WrapUnique(tray_night_light_)); | 269 tray_night_light_ = new TrayNightLight(this); |
| 270 AddTrayItem(base::WrapUnique(tray_night_light_)); |
| 271 } |
270 // TODO(jamescook): Remove this when mash has support for display management | 272 // TODO(jamescook): Remove this when mash has support for display management |
271 // and we have a DisplayManager equivalent. See http://crbug.com/548429 | 273 // and we have a DisplayManager equivalent. See http://crbug.com/548429 |
272 if (Shell::GetAshConfig() != Config::MASH) | 274 if (Shell::GetAshConfig() != Config::MASH) |
273 AddTrayItem(base::MakeUnique<TrayRotationLock>(this)); | 275 AddTrayItem(base::MakeUnique<TrayRotationLock>(this)); |
274 tray_update_ = new TrayUpdate(this); | 276 tray_update_ = new TrayUpdate(this); |
275 AddTrayItem(base::WrapUnique(tray_update_)); | 277 AddTrayItem(base::WrapUnique(tray_update_)); |
276 tray_tiles_ = new TrayTiles(this); | 278 tray_tiles_ = new TrayTiles(this); |
277 AddTrayItem(base::WrapUnique(tray_tiles_)); | 279 AddTrayItem(base::WrapUnique(tray_tiles_)); |
278 tray_system_info_ = new TraySystemInfo(this); | 280 tray_system_info_ = new TraySystemInfo(this); |
279 AddTrayItem(base::WrapUnique(tray_system_info_)); | 281 AddTrayItem(base::WrapUnique(tray_system_info_)); |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 .work_area() | 701 .work_area() |
700 .height(); | 702 .height(); |
701 if (work_area_height > 0) { | 703 if (work_area_height > 0) { |
702 UMA_HISTOGRAM_CUSTOM_COUNTS( | 704 UMA_HISTOGRAM_CUSTOM_COUNTS( |
703 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 705 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
704 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 706 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
705 } | 707 } |
706 } | 708 } |
707 | 709 |
708 } // namespace ash | 710 } // namespace ash |
OLD | NEW |