| 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/cast/tray_cast.h" |
| 14 #include "ash/system/date/tray_date.h" | 15 #include "ash/system/date/tray_date.h" |
| 15 #include "ash/system/status_area_widget.h" | 16 #include "ash/system/status_area_widget.h" |
| 16 #include "ash/system/tray/system_tray_delegate.h" | 17 #include "ash/system/tray/system_tray_delegate.h" |
| 17 #include "ash/system/tray/system_tray_item.h" | 18 #include "ash/system/tray/system_tray_item.h" |
| 18 #include "ash/system/tray/tray_bubble_wrapper.h" | 19 #include "ash/system/tray/tray_bubble_wrapper.h" |
| 19 #include "ash/system/tray/tray_constants.h" | 20 #include "ash/system/tray/tray_constants.h" |
| 20 #include "ash/system/tray_accessibility.h" | 21 #include "ash/system/tray_accessibility.h" |
| 21 #include "ash/system/tray_update.h" | 22 #include "ash/system/tray_update.h" |
| 22 #include "ash/system/user/login_status.h" | 23 #include "ash/system/user/login_status.h" |
| 23 #include "ash/system/user/tray_user.h" | 24 #include "ash/system/user/tray_user.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 AddTrayItem(new TrayEnterprise(this)); | 175 AddTrayItem(new TrayEnterprise(this)); |
| 175 AddTrayItem(new TraySupervisedUser(this)); | 176 AddTrayItem(new TraySupervisedUser(this)); |
| 176 AddTrayItem(new TrayIME(this)); | 177 AddTrayItem(new TrayIME(this)); |
| 177 AddTrayItem(tray_accessibility_); | 178 AddTrayItem(tray_accessibility_); |
| 178 AddTrayItem(new TrayTracing(this)); | 179 AddTrayItem(new TrayTracing(this)); |
| 179 AddTrayItem(new TrayPower(this, message_center::MessageCenter::Get())); | 180 AddTrayItem(new TrayPower(this, message_center::MessageCenter::Get())); |
| 180 AddTrayItem(new TrayNetwork(this)); | 181 AddTrayItem(new TrayNetwork(this)); |
| 181 AddTrayItem(new TrayVPN(this)); | 182 AddTrayItem(new TrayVPN(this)); |
| 182 AddTrayItem(new TraySms(this)); | 183 AddTrayItem(new TraySms(this)); |
| 183 AddTrayItem(new TrayBluetooth(this)); | 184 AddTrayItem(new TrayBluetooth(this)); |
| 185 AddTrayItem(new TrayCast(this)); |
| 184 AddTrayItem(new TrayDisplay(this)); | 186 AddTrayItem(new TrayDisplay(this)); |
| 185 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); | 187 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); |
| 186 AddTrayItem(screen_capture_tray_item_); | 188 AddTrayItem(screen_capture_tray_item_); |
| 187 screen_share_tray_item_ = new ScreenShareTrayItem(this); | 189 screen_share_tray_item_ = new ScreenShareTrayItem(this); |
| 188 AddTrayItem(screen_share_tray_item_); | 190 AddTrayItem(screen_share_tray_item_); |
| 189 AddTrayItem(new MultiProfileMediaTrayItem(this)); | 191 AddTrayItem(new MultiProfileMediaTrayItem(this)); |
| 190 AddTrayItem(new TrayAudioChromeOs(this)); | 192 AddTrayItem(new TrayAudioChromeOs(this)); |
| 191 AddTrayItem(new TrayBrightness(this)); | 193 AddTrayItem(new TrayBrightness(this)); |
| 192 AddTrayItem(new TrayCapsLock(this)); | 194 AddTrayItem(new TrayCapsLock(this)); |
| 193 AddTrayItem(new TrayRotationLock(this)); | 195 AddTrayItem(new TrayRotationLock(this)); |
| 194 AddTrayItem(new TraySettings(this)); | 196 AddTrayItem(new TraySettings(this)); |
| 195 AddTrayItem(new TrayUpdate(this)); | 197 AddTrayItem(new TrayUpdate(this)); |
| 196 AddTrayItem(tray_date_); | 198 AddTrayItem(tray_date_); |
| 197 #elif defined(OS_WIN) | 199 #elif defined(OS_WIN) |
| 198 AddTrayItem(tray_accessibility_); | 200 AddTrayItem(tray_accessibility_); |
| 199 if (media::CoreAudioUtil::IsSupported()) | 201 if (media::CoreAudioUtil::IsSupported()) |
| 200 AddTrayItem(new TrayAudioWin(this)); | 202 AddTrayItem(new TrayAudioWin(this)); |
| 201 AddTrayItem(new TrayUpdate(this)); | 203 AddTrayItem(new TrayUpdate(this)); |
| 202 AddTrayItem(tray_date_); | 204 AddTrayItem(tray_date_); |
| 203 #elif defined(OS_LINUX) | 205 #elif defined(OS_LINUX) |
| 204 AddTrayItem(tray_accessibility_); | 206 AddTrayItem(tray_accessibility_); |
| 205 AddTrayItem(new TrayBluetooth(this)); | 207 AddTrayItem(new TrayBluetooth(this)); |
| 208 AddTrayItem(new TrayCast(this)); |
| 206 AddTrayItem(new TrayUpdate(this)); | 209 AddTrayItem(new TrayUpdate(this)); |
| 207 AddTrayItem(tray_date_); | 210 AddTrayItem(tray_date_); |
| 208 #endif | 211 #endif |
| 209 | 212 |
| 210 SetVisible(ash::Shell::GetInstance()->system_tray_delegate()-> | 213 SetVisible(ash::Shell::GetInstance()->system_tray_delegate()-> |
| 211 GetTrayVisibilityOnStartup()); | 214 GetTrayVisibilityOnStartup()); |
| 212 } | 215 } |
| 213 | 216 |
| 214 void SystemTray::AddTrayItem(SystemTrayItem* item) { | 217 void SystemTray::AddTrayItem(SystemTrayItem* item) { |
| 215 items_.push_back(item); | 218 items_.push_back(item); |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 system_bubble_.reset(); | 722 system_bubble_.reset(); |
| 720 // When closing a system bubble with the alternate shelf layout, we need to | 723 // When closing a system bubble with the alternate shelf layout, we need to |
| 721 // turn off the active tinting of the shelf. | 724 // turn off the active tinting of the shelf. |
| 722 if (full_system_tray_menu_) { | 725 if (full_system_tray_menu_) { |
| 723 SetDrawBackgroundAsActive(false); | 726 SetDrawBackgroundAsActive(false); |
| 724 full_system_tray_menu_ = false; | 727 full_system_tray_menu_ = false; |
| 725 } | 728 } |
| 726 } | 729 } |
| 727 | 730 |
| 728 } // namespace ash | 731 } // namespace ash |
| OLD | NEW |