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/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell/panel_window.h" | 10 #include "ash/shell/panel_window.h" |
11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
12 #include "ash/system/bluetooth/tray_bluetooth.h" | 12 #include "ash/system/bluetooth/tray_bluetooth.h" |
13 #include "ash/system/brightness/tray_brightness.h" | 13 #include "ash/system/brightness/tray_brightness.h" |
14 #include "ash/system/date/tray_date.h" | 14 #include "ash/system/date/tray_date.h" |
15 #include "ash/system/drive/tray_drive.h" | 15 #include "ash/system/drive/tray_drive.h" |
16 #include "ash/system/ime/tray_ime.h" | 16 #include "ash/system/ime/tray_ime.h" |
17 #include "ash/system/logout_button/tray_logout_button.h" | 17 #include "ash/system/logout_button/tray_logout_button.h" |
18 #include "ash/system/monitor/tray_monitor.h" | 18 #include "ash/system/monitor/tray_monitor.h" |
19 #include "ash/system/session_length_limit/tray_session_length_limit.h" | 19 #include "ash/system/session_length_limit/tray_session_length_limit.h" |
20 #include "ash/system/status_area_widget.h" | 20 #include "ash/system/status_area_widget.h" |
21 #include "ash/system/tray/system_tray_delegate.h" | 21 #include "ash/system/tray/system_tray_delegate.h" |
22 #include "ash/system/tray/system_tray_item.h" | 22 #include "ash/system/tray/system_tray_item.h" |
23 #include "ash/system/tray/tray_bubble_wrapper.h" | 23 #include "ash/system/tray/tray_bubble_wrapper.h" |
24 #include "ash/system/tray/tray_constants.h" | 24 #include "ash/system/tray/tray_constants.h" |
25 #include "ash/system/tray_accessibility.h" | 25 #include "ash/system/tray_accessibility.h" |
26 #include "ash/system/tray_caps_lock.h" | 26 #include "ash/system/tray_caps_lock.h" |
27 #include "ash/system/tray_tracing.h" | |
27 #include "ash/system/tray_update.h" | 28 #include "ash/system/tray_update.h" |
28 #include "ash/system/user/login_status.h" | 29 #include "ash/system/user/login_status.h" |
29 #include "ash/system/user/tray_user.h" | 30 #include "ash/system/user/tray_user.h" |
30 #include "ash/system/web_notification/web_notification_tray.h" | 31 #include "ash/system/web_notification/web_notification_tray.h" |
31 #include "base/command_line.h" | 32 #include "base/command_line.h" |
32 #include "base/logging.h" | 33 #include "base/logging.h" |
33 #include "base/strings/utf_string_conversions.h" | 34 #include "base/strings/utf_string_conversions.h" |
34 #include "base/timer/timer.h" | 35 #include "base/timer/timer.h" |
35 #include "grit/ash_strings.h" | 36 #include "grit/ash_strings.h" |
36 #include "ui/aura/root_window.h" | 37 #include "ui/aura/root_window.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 AddTrayItem(new internal::TrayUser(this, i)); | 160 AddTrayItem(new internal::TrayUser(this, i)); |
160 | 161 |
161 #endif | 162 #endif |
162 #if defined(OS_CHROMEOS) | 163 #if defined(OS_CHROMEOS) |
163 AddTrayItem(new internal::TrayEnterprise(this)); | 164 AddTrayItem(new internal::TrayEnterprise(this)); |
164 AddTrayItem(new internal::TrayLocallyManagedUser(this)); | 165 AddTrayItem(new internal::TrayLocallyManagedUser(this)); |
165 #endif | 166 #endif |
166 AddTrayItem(new internal::TrayIME(this)); | 167 AddTrayItem(new internal::TrayIME(this)); |
167 tray_accessibility_ = new internal::TrayAccessibility(this); | 168 tray_accessibility_ = new internal::TrayAccessibility(this); |
168 AddTrayItem(tray_accessibility_); | 169 AddTrayItem(tray_accessibility_); |
170 tray_tracing_ = new internal::TrayTracing(this); | |
171 AddTrayItem(tray_tracing_); | |
rkc
2013/08/08 21:56:25
This can be replaced with,
AddTrayItem(new interna
Zachary Kuznia
2013/08/08 22:44:23
Done.
| |
169 #if defined(OS_CHROMEOS) | 172 #if defined(OS_CHROMEOS) |
170 AddTrayItem( | 173 AddTrayItem( |
171 new internal::TrayPower(this, message_center::MessageCenter::Get())); | 174 new internal::TrayPower(this, message_center::MessageCenter::Get())); |
172 #endif | 175 #endif |
173 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
174 AddTrayItem(new internal::TrayNetwork(this)); | 177 AddTrayItem(new internal::TrayNetwork(this)); |
175 AddTrayItem(new internal::TrayVPN(this)); | 178 AddTrayItem(new internal::TrayVPN(this)); |
176 AddTrayItem(new internal::TraySms(this)); | 179 AddTrayItem(new internal::TraySms(this)); |
177 #endif | 180 #endif |
178 #if !defined(OS_WIN) | 181 #if !defined(OS_WIN) |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
652 ConvertPointToWidget(this, &point); | 655 ConvertPointToWidget(this, &point); |
653 arrow_offset = point.x(); | 656 arrow_offset = point.x(); |
654 } | 657 } |
655 } | 658 } |
656 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); | 659 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); |
657 } | 660 } |
658 return true; | 661 return true; |
659 } | 662 } |
660 | 663 |
661 } // namespace ash | 664 } // namespace ash |
OLD | NEW |