| 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/common/system/tray/system_tray.h" | 5 #include "ash/common/system/tray/system_tray.h" |
| 6 | 6 |
| 7 #include "ash/common/key_event_watcher.h" | 7 #include "ash/common/key_event_watcher.h" |
| 8 #include "ash/common/login_status.h" | 8 #include "ash/common/login_status.h" |
| 9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "ui/display/screen.h" | 42 #include "ui/display/screen.h" |
| 43 #include "ui/events/event_constants.h" | 43 #include "ui/events/event_constants.h" |
| 44 #include "ui/gfx/canvas.h" | 44 #include "ui/gfx/canvas.h" |
| 45 #include "ui/gfx/skia_util.h" | 45 #include "ui/gfx/skia_util.h" |
| 46 #include "ui/views/border.h" | 46 #include "ui/views/border.h" |
| 47 #include "ui/views/controls/label.h" | 47 #include "ui/views/controls/label.h" |
| 48 #include "ui/views/view.h" | 48 #include "ui/views/view.h" |
| 49 #include "ui/views/widget/widget.h" | 49 #include "ui/views/widget/widget.h" |
| 50 | 50 |
| 51 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
| 52 #include "ash/common/system/chromeos/audio/tray_audio_chromeos.h" | 52 #include "ash/common/system/chromeos/audio/tray_audio.h" |
| 53 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" | 53 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" |
| 54 #include "ash/common/system/chromeos/brightness/tray_brightness.h" | 54 #include "ash/common/system/chromeos/brightness/tray_brightness.h" |
| 55 #include "ash/common/system/chromeos/cast/tray_cast.h" | 55 #include "ash/common/system/chromeos/cast/tray_cast.h" |
| 56 #include "ash/common/system/chromeos/enterprise/tray_enterprise.h" | 56 #include "ash/common/system/chromeos/enterprise/tray_enterprise.h" |
| 57 #include "ash/common/system/chromeos/media_security/multi_profile_media_tray_ite
m.h" | 57 #include "ash/common/system/chromeos/media_security/multi_profile_media_tray_ite
m.h" |
| 58 #include "ash/common/system/chromeos/network/tray_network.h" | 58 #include "ash/common/system/chromeos/network/tray_network.h" |
| 59 #include "ash/common/system/chromeos/network/tray_sms.h" | 59 #include "ash/common/system/chromeos/network/tray_sms.h" |
| 60 #include "ash/common/system/chromeos/network/tray_vpn.h" | 60 #include "ash/common/system/chromeos/network/tray_vpn.h" |
| 61 #include "ash/common/system/chromeos/power/power_status.h" | 61 #include "ash/common/system/chromeos/power/power_status.h" |
| 62 #include "ash/common/system/chromeos/power/tray_power.h" | 62 #include "ash/common/system/chromeos/power/tray_power.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 AddTrayItem(new TrayVPN(this)); | 289 AddTrayItem(new TrayVPN(this)); |
| 290 AddTrayItem(new TraySms(this)); | 290 AddTrayItem(new TraySms(this)); |
| 291 AddTrayItem(new TrayBluetooth(this)); | 291 AddTrayItem(new TrayBluetooth(this)); |
| 292 tray_cast_ = new TrayCast(this); | 292 tray_cast_ = new TrayCast(this); |
| 293 AddTrayItem(tray_cast_); | 293 AddTrayItem(tray_cast_); |
| 294 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); | 294 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); |
| 295 AddTrayItem(screen_capture_tray_item_); | 295 AddTrayItem(screen_capture_tray_item_); |
| 296 screen_share_tray_item_ = new ScreenShareTrayItem(this); | 296 screen_share_tray_item_ = new ScreenShareTrayItem(this); |
| 297 AddTrayItem(screen_share_tray_item_); | 297 AddTrayItem(screen_share_tray_item_); |
| 298 AddTrayItem(new MultiProfileMediaTrayItem(this)); | 298 AddTrayItem(new MultiProfileMediaTrayItem(this)); |
| 299 tray_audio_ = new TrayAudioChromeOs(this); | 299 tray_audio_ = new TrayAudio(this); |
| 300 AddTrayItem(tray_audio_); | 300 AddTrayItem(tray_audio_); |
| 301 AddTrayItem(new TrayBrightness(this)); | 301 AddTrayItem(new TrayBrightness(this)); |
| 302 AddTrayItem(new TrayCapsLock(this)); | 302 AddTrayItem(new TrayCapsLock(this)); |
| 303 // TODO(jamescook): Remove this when mus has support for display management | 303 // TODO(jamescook): Remove this when mus has support for display management |
| 304 // and we have a DisplayManager equivalent. See http://crbug.com/548429 | 304 // and we have a DisplayManager equivalent. See http://crbug.com/548429 |
| 305 std::unique_ptr<SystemTrayItem> tray_rotation_lock = | 305 std::unique_ptr<SystemTrayItem> tray_rotation_lock = |
| 306 delegate->CreateRotationLockTrayItem(this); | 306 delegate->CreateRotationLockTrayItem(this); |
| 307 if (tray_rotation_lock) | 307 if (tray_rotation_lock) |
| 308 AddTrayItem(tray_rotation_lock.release()); | 308 AddTrayItem(tray_rotation_lock.release()); |
| 309 if (!use_material_design) | 309 if (!use_material_design) |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 .work_area() | 954 .work_area() |
| 955 .height(); | 955 .height(); |
| 956 if (work_area_height > 0) { | 956 if (work_area_height > 0) { |
| 957 UMA_HISTOGRAM_CUSTOM_COUNTS( | 957 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 958 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 958 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 959 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 959 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 960 } | 960 } |
| 961 } | 961 } |
| 962 | 962 |
| 963 } // namespace ash | 963 } // namespace ash |
| OLD | NEW |