| 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" |
| 11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
| 12 #include "ash/system/audio/tray_audio.h" | 12 #include "ash/system/audio/tray_audio.h" |
| 13 #include "ash/system/bluetooth/tray_bluetooth.h" | 13 #include "ash/system/bluetooth/tray_bluetooth.h" |
| 14 #include "ash/system/date/tray_date.h" | 14 #include "ash/system/date/tray_date.h" |
| 15 #include "ash/system/ime/tray_ime.h" | |
| 16 #include "ash/system/status_area_widget.h" | 15 #include "ash/system/status_area_widget.h" |
| 17 #include "ash/system/tray/system_tray_delegate.h" | 16 #include "ash/system/tray/system_tray_delegate.h" |
| 18 #include "ash/system/tray/system_tray_item.h" | 17 #include "ash/system/tray/system_tray_item.h" |
| 19 #include "ash/system/tray/tray_bubble_wrapper.h" | 18 #include "ash/system/tray/tray_bubble_wrapper.h" |
| 20 #include "ash/system/tray/tray_constants.h" | 19 #include "ash/system/tray/tray_constants.h" |
| 21 #include "ash/system/tray_accessibility.h" | 20 #include "ash/system/tray_accessibility.h" |
| 22 #include "ash/system/tray_update.h" | 21 #include "ash/system/tray_update.h" |
| 23 #include "ash/system/user/login_status.h" | 22 #include "ash/system/user/login_status.h" |
| 24 #include "ash/system/user/tray_user.h" | 23 #include "ash/system/user/tray_user.h" |
| 25 #include "ash/system/user/tray_user_separator.h" | 24 #include "ash/system/user/tray_user_separator.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 52 #include "ash/system/chromeos/power/tray_power.h" | 51 #include "ash/system/chromeos/power/tray_power.h" |
| 53 #include "ash/system/chromeos/rotation/tray_rotation_lock.h" | 52 #include "ash/system/chromeos/rotation/tray_rotation_lock.h" |
| 54 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" | 53 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" |
| 55 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" | 54 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" |
| 56 #include "ash/system/chromeos/session/tray_session_length_limit.h" | 55 #include "ash/system/chromeos/session/tray_session_length_limit.h" |
| 57 #include "ash/system/chromeos/settings/tray_settings.h" | 56 #include "ash/system/chromeos/settings/tray_settings.h" |
| 58 #include "ash/system/chromeos/supervised/tray_supervised_user.h" | 57 #include "ash/system/chromeos/supervised/tray_supervised_user.h" |
| 59 #include "ash/system/chromeos/tray_caps_lock.h" | 58 #include "ash/system/chromeos/tray_caps_lock.h" |
| 60 #include "ash/system/chromeos/tray_display.h" | 59 #include "ash/system/chromeos/tray_display.h" |
| 61 #include "ash/system/chromeos/tray_tracing.h" | 60 #include "ash/system/chromeos/tray_tracing.h" |
| 61 #include "ash/system/ime/tray_ime_chromeos.h" |
| 62 #include "ash/system/tray/media_security/multi_profile_media_tray_item.h" | 62 #include "ash/system/tray/media_security/multi_profile_media_tray_item.h" |
| 63 #include "ui/message_center/message_center.h" | 63 #include "ui/message_center/message_center.h" |
| 64 #elif defined(OS_WIN) | 64 #elif defined(OS_WIN) |
| 65 #include "ash/system/win/audio/tray_audio_win.h" | 65 #include "ash/system/win/audio/tray_audio_win.h" |
| 66 #include "media/audio/win/core_audio_util_win.h" | 66 #include "media/audio/win/core_audio_util_win.h" |
| 67 #endif | 67 #endif |
| 68 | 68 |
| 69 using views::TrayBubbleView; | 69 using views::TrayBubbleView; |
| 70 | 70 |
| 71 namespace ash { | 71 namespace ash { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 AddTrayItem(new TraySettings(this)); | 194 AddTrayItem(new TraySettings(this)); |
| 195 AddTrayItem(new TrayUpdate(this)); | 195 AddTrayItem(new TrayUpdate(this)); |
| 196 AddTrayItem(tray_date_); | 196 AddTrayItem(tray_date_); |
| 197 #elif defined(OS_WIN) | 197 #elif defined(OS_WIN) |
| 198 AddTrayItem(tray_accessibility_); | 198 AddTrayItem(tray_accessibility_); |
| 199 if (media::CoreAudioUtil::IsSupported()) | 199 if (media::CoreAudioUtil::IsSupported()) |
| 200 AddTrayItem(new TrayAudioWin(this)); | 200 AddTrayItem(new TrayAudioWin(this)); |
| 201 AddTrayItem(new TrayUpdate(this)); | 201 AddTrayItem(new TrayUpdate(this)); |
| 202 AddTrayItem(tray_date_); | 202 AddTrayItem(tray_date_); |
| 203 #elif defined(OS_LINUX) | 203 #elif defined(OS_LINUX) |
| 204 AddTrayItem(new TrayIME(this)); | |
| 205 AddTrayItem(tray_accessibility_); | 204 AddTrayItem(tray_accessibility_); |
| 206 AddTrayItem(new TrayBluetooth(this)); | 205 AddTrayItem(new TrayBluetooth(this)); |
| 207 AddTrayItem(new TrayUpdate(this)); | 206 AddTrayItem(new TrayUpdate(this)); |
| 208 AddTrayItem(tray_date_); | 207 AddTrayItem(tray_date_); |
| 209 #endif | 208 #endif |
| 210 | 209 |
| 211 SetVisible(ash::Shell::GetInstance()->system_tray_delegate()-> | 210 SetVisible(ash::Shell::GetInstance()->system_tray_delegate()-> |
| 212 GetTrayVisibilityOnStartup()); | 211 GetTrayVisibilityOnStartup()); |
| 213 } | 212 } |
| 214 | 213 |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 system_bubble_.reset(); | 719 system_bubble_.reset(); |
| 721 // When closing a system bubble with the alternate shelf layout, we need to | 720 // When closing a system bubble with the alternate shelf layout, we need to |
| 722 // turn off the active tinting of the shelf. | 721 // turn off the active tinting of the shelf. |
| 723 if (full_system_tray_menu_) { | 722 if (full_system_tray_menu_) { |
| 724 SetDrawBackgroundAsActive(false); | 723 SetDrawBackgroundAsActive(false); |
| 725 full_system_tray_menu_ = false; | 724 full_system_tray_menu_ = false; |
| 726 } | 725 } |
| 727 } | 726 } |
| 728 | 727 |
| 729 } // namespace ash | 728 } // namespace ash |
| OLD | NEW |