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/metrics/user_metrics_recorder.h" | 8 #include "ash/metrics/user_metrics_recorder.h" |
9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #include "ash/system/chromeos/network/tray_network.h" | 55 #include "ash/system/chromeos/network/tray_network.h" |
56 #include "ash/system/chromeos/network/tray_sms.h" | 56 #include "ash/system/chromeos/network/tray_sms.h" |
57 #include "ash/system/chromeos/network/tray_vpn.h" | 57 #include "ash/system/chromeos/network/tray_vpn.h" |
58 #include "ash/system/chromeos/power/tray_power.h" | 58 #include "ash/system/chromeos/power/tray_power.h" |
59 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" | 59 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" |
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/settings/tray_settings.h" | 61 #include "ash/system/chromeos/settings/tray_settings.h" |
62 #include "ash/system/chromeos/tray_display.h" | 62 #include "ash/system/chromeos/tray_display.h" |
63 #include "ash/system/chromeos/tray_tracing.h" | 63 #include "ash/system/chromeos/tray_tracing.h" |
64 #include "ui/message_center/message_center.h" | 64 #include "ui/message_center/message_center.h" |
65 #elif defined(OS_WIN) | |
66 #include "ash/system/win/audio/tray_audio_win.h" | |
67 #include "media/audio/win/core_audio_util_win.h" | |
68 #endif | 65 #endif |
69 | 66 |
70 using views::TrayBubbleView; | 67 using views::TrayBubbleView; |
71 | 68 |
72 namespace ash { | 69 namespace ash { |
73 | 70 |
74 // The minimum width of the system tray menu width. | 71 // The minimum width of the system tray menu width. |
75 const int kMinimumSystemTrayMenuWidth = 300; | 72 const int kMinimumSystemTrayMenuWidth = 300; |
76 | 73 |
77 namespace internal { | 74 namespace internal { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 AddTrayItem(new internal::ScreenCaptureTrayItem(this)); | 197 AddTrayItem(new internal::ScreenCaptureTrayItem(this)); |
201 AddTrayItem(new internal::ScreenShareTrayItem(this)); | 198 AddTrayItem(new internal::ScreenShareTrayItem(this)); |
202 AddTrayItem(new internal::TrayAudioChromeOs(this)); | 199 AddTrayItem(new internal::TrayAudioChromeOs(this)); |
203 AddTrayItem(new internal::TrayBrightness(this)); | 200 AddTrayItem(new internal::TrayBrightness(this)); |
204 AddTrayItem(new internal::TrayCapsLock(this)); | 201 AddTrayItem(new internal::TrayCapsLock(this)); |
205 AddTrayItem(new internal::TraySettings(this)); | 202 AddTrayItem(new internal::TraySettings(this)); |
206 AddTrayItem(new internal::TrayUpdate(this)); | 203 AddTrayItem(new internal::TrayUpdate(this)); |
207 AddTrayItem(tray_date_); | 204 AddTrayItem(tray_date_); |
208 #elif defined(OS_WIN) | 205 #elif defined(OS_WIN) |
209 AddTrayItem(tray_accessibility_); | 206 AddTrayItem(tray_accessibility_); |
210 if (media::CoreAudioUtil::IsSupported()) | |
211 AddTrayItem(new internal::TrayAudioWin(this)); | |
212 AddTrayItem(new internal::TrayUpdate(this)); | 207 AddTrayItem(new internal::TrayUpdate(this)); |
213 AddTrayItem(tray_date_); | 208 AddTrayItem(tray_date_); |
214 #elif defined(OS_LINUX) | 209 #elif defined(OS_LINUX) |
215 AddTrayItem(new internal::TrayIME(this)); | 210 AddTrayItem(new internal::TrayIME(this)); |
216 AddTrayItem(tray_accessibility_); | 211 AddTrayItem(tray_accessibility_); |
217 AddTrayItem(new internal::TrayBluetooth(this)); | 212 AddTrayItem(new internal::TrayBluetooth(this)); |
218 AddTrayItem(new internal::TrayDrive(this)); | 213 AddTrayItem(new internal::TrayDrive(this)); |
219 AddTrayItem(new internal::TrayCapsLock(this)); | 214 AddTrayItem(new internal::TrayCapsLock(this)); |
220 AddTrayItem(new internal::TrayUpdate(this)); | 215 AddTrayItem(new internal::TrayUpdate(this)); |
221 AddTrayItem(tray_date_); | 216 AddTrayItem(tray_date_); |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 system_bubble_.reset(); | 728 system_bubble_.reset(); |
734 // When closing a system bubble with the alternate shelf layout, we need to | 729 // When closing a system bubble with the alternate shelf layout, we need to |
735 // turn off the active tinting of the shelf. | 730 // turn off the active tinting of the shelf. |
736 if (full_system_tray_menu_) { | 731 if (full_system_tray_menu_) { |
737 SetDrawBackgroundAsActive(false); | 732 SetDrawBackgroundAsActive(false); |
738 full_system_tray_menu_ = false; | 733 full_system_tray_menu_ = false; |
739 } | 734 } |
740 } | 735 } |
741 | 736 |
742 } // namespace ash | 737 } // namespace ash |
OLD | NEW |