| 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 "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/common/shelf/wm_shelf_util.h" | 8 #include "ash/common/shelf/wm_shelf_util.h" |
| 9 #include "ash/common/shell_window_ids.h" | 9 #include "ash/common/shell_window_ids.h" |
| 10 #include "ash/common/system/date/tray_date.h" | 10 #include "ash/common/system/date/tray_date.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" | 60 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" |
| 61 #include "ash/system/chromeos/session/tray_session_length_limit.h" | 61 #include "ash/system/chromeos/session/tray_session_length_limit.h" |
| 62 #include "ash/system/chromeos/settings/tray_settings.h" | 62 #include "ash/system/chromeos/settings/tray_settings.h" |
| 63 #include "ash/system/chromeos/supervised/tray_supervised_user.h" | 63 #include "ash/system/chromeos/supervised/tray_supervised_user.h" |
| 64 #include "ash/system/chromeos/tray_caps_lock.h" | 64 #include "ash/system/chromeos/tray_caps_lock.h" |
| 65 #include "ash/system/chromeos/tray_display.h" | 65 #include "ash/system/chromeos/tray_display.h" |
| 66 #include "ash/system/chromeos/tray_tracing.h" | 66 #include "ash/system/chromeos/tray_tracing.h" |
| 67 #include "ash/system/ime/tray_ime_chromeos.h" | 67 #include "ash/system/ime/tray_ime_chromeos.h" |
| 68 #include "ash/system/tray/media_security/multi_profile_media_tray_item.h" | 68 #include "ash/system/tray/media_security/multi_profile_media_tray_item.h" |
| 69 #include "ui/message_center/message_center.h" | 69 #include "ui/message_center/message_center.h" |
| 70 #elif defined(OS_WIN) | |
| 71 #include "ash/system/win/audio/tray_audio_win.h" | |
| 72 #include "media/audio/win/core_audio_util_win.h" | |
| 73 #endif | 70 #endif |
| 74 | 71 |
| 75 using views::TrayBubbleView; | 72 using views::TrayBubbleView; |
| 76 | 73 |
| 77 namespace ash { | 74 namespace ash { |
| 78 | 75 |
| 79 // The minimum width of the system tray menu width. | 76 // The minimum width of the system tray menu width. |
| 80 const int kMinimumSystemTrayMenuWidth = 300; | 77 const int kMinimumSystemTrayMenuWidth = 300; |
| 81 | 78 |
| 82 // Class to initialize and manage the SystemTrayBubble and TrayBubbleWrapper | 79 // Class to initialize and manage the SystemTrayBubble and TrayBubbleWrapper |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 AddTrayItem(new MultiProfileMediaTrayItem(this)); | 203 AddTrayItem(new MultiProfileMediaTrayItem(this)); |
| 207 AddTrayItem(new TrayAudioChromeOs(this)); | 204 AddTrayItem(new TrayAudioChromeOs(this)); |
| 208 AddTrayItem(new TrayBrightness(this)); | 205 AddTrayItem(new TrayBrightness(this)); |
| 209 AddTrayItem(new TrayCapsLock(this)); | 206 AddTrayItem(new TrayCapsLock(this)); |
| 210 AddTrayItem(new TrayRotationLock(this)); | 207 AddTrayItem(new TrayRotationLock(this)); |
| 211 AddTrayItem(new TraySettings(this)); | 208 AddTrayItem(new TraySettings(this)); |
| 212 AddTrayItem(tray_update_); | 209 AddTrayItem(tray_update_); |
| 213 AddTrayItem(tray_date_); | 210 AddTrayItem(tray_date_); |
| 214 #elif defined(OS_WIN) | 211 #elif defined(OS_WIN) |
| 215 AddTrayItem(tray_accessibility_); | 212 AddTrayItem(tray_accessibility_); |
| 216 if (media::CoreAudioUtil::IsSupported()) | |
| 217 AddTrayItem(new TrayAudioWin(this)); | |
| 218 AddTrayItem(tray_update_); | 213 AddTrayItem(tray_update_); |
| 219 AddTrayItem(tray_date_); | 214 AddTrayItem(tray_date_); |
| 220 #endif | 215 #endif |
| 221 | 216 |
| 222 SetVisible(ash::WmShell::Get() | 217 SetVisible(ash::WmShell::Get() |
| 223 ->system_tray_delegate() | 218 ->system_tray_delegate() |
| 224 ->GetTrayVisibilityOnStartup()); | 219 ->GetTrayVisibilityOnStartup()); |
| 225 } | 220 } |
| 226 | 221 |
| 227 void SystemTray::AddTrayItem(SystemTrayItem* item) { | 222 void SystemTray::AddTrayItem(SystemTrayItem* item) { |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 .work_area() | 760 .work_area() |
| 766 .height(); | 761 .height(); |
| 767 if (work_area_height > 0) { | 762 if (work_area_height > 0) { |
| 768 UMA_HISTOGRAM_CUSTOM_COUNTS( | 763 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 769 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 764 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 770 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 765 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 771 } | 766 } |
| 772 } | 767 } |
| 773 | 768 |
| 774 } // namespace ash | 769 } // namespace ash |
| OLD | NEW |