Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 13454034: Disable system tray features that are not going to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 (*it)->DestroyTrayView(); 128 (*it)->DestroyTrayView();
129 } 129 }
130 } 130 }
131 131
132 void SystemTray::InitializeTrayItems(SystemTrayDelegate* delegate) { 132 void SystemTray::InitializeTrayItems(SystemTrayDelegate* delegate) {
133 internal::TrayBackgroundView::Initialize(); 133 internal::TrayBackgroundView::Initialize();
134 CreateItems(delegate); 134 CreateItems(delegate);
135 } 135 }
136 136
137 void SystemTray::CreateItems(SystemTrayDelegate* delegate) { 137 void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
138 #if !defined(OS_WIN)
138 AddTrayItem(new internal::TraySessionLengthLimit(this)); 139 AddTrayItem(new internal::TraySessionLengthLimit(this));
139 AddTrayItem(new internal::TrayLogoutButton(this)); 140 AddTrayItem(new internal::TrayLogoutButton(this));
140 AddTrayItem(new internal::TrayUser(this)); 141 AddTrayItem(new internal::TrayUser(this));
142 #endif
141 #if defined(OS_CHROMEOS) 143 #if defined(OS_CHROMEOS)
142 AddTrayItem(new internal::TrayEnterprise(this)); 144 AddTrayItem(new internal::TrayEnterprise(this));
143 #endif 145 #endif
144 AddTrayItem(new internal::TrayIME(this)); 146 AddTrayItem(new internal::TrayIME(this));
145 tray_accessibility_ = new internal::TrayAccessibility(this); 147 tray_accessibility_ = new internal::TrayAccessibility(this);
146 AddTrayItem(tray_accessibility_); 148 AddTrayItem(tray_accessibility_);
149 #if !defined(OS_WIN)
147 AddTrayItem(new internal::TrayPower(this)); 150 AddTrayItem(new internal::TrayPower(this));
151 #endif
148 #if defined(OS_CHROMEOS) 152 #if defined(OS_CHROMEOS)
149 AddTrayItem(new internal::TrayNetwork(this)); 153 AddTrayItem(new internal::TrayNetwork(this));
150 AddTrayItem(new internal::TrayVPN(this)); 154 AddTrayItem(new internal::TrayVPN(this));
151 AddTrayItem(new internal::TraySms(this)); 155 AddTrayItem(new internal::TraySms(this));
152 #endif 156 #endif
157 #if !defined(OS_WIN)
153 AddTrayItem(new internal::TrayBluetooth(this)); 158 AddTrayItem(new internal::TrayBluetooth(this));
159 #endif
154 AddTrayItem(new internal::TrayDrive(this)); 160 AddTrayItem(new internal::TrayDrive(this));
155 AddTrayItem(new internal::TrayLocale(this)); 161 AddTrayItem(new internal::TrayLocale(this));
156 #if defined(OS_CHROMEOS) 162 #if defined(OS_CHROMEOS)
157 AddTrayItem(new internal::TrayDisplay(this)); 163 AddTrayItem(new internal::TrayDisplay(this));
158 AddTrayItem(new internal::TrayScreenCapture(this)); 164 AddTrayItem(new internal::TrayScreenCapture(this));
159 #endif 165 #endif
166 #if !defined(OS_WIN)
160 AddTrayItem(new internal::TrayVolume(this)); 167 AddTrayItem(new internal::TrayVolume(this));
161 AddTrayItem(new internal::TrayBrightness(this)); 168 AddTrayItem(new internal::TrayBrightness(this));
162 AddTrayItem(new internal::TrayCapsLock(this)); 169 AddTrayItem(new internal::TrayCapsLock(this));
170 #endif
163 AddTrayItem(new internal::TraySettings(this)); 171 AddTrayItem(new internal::TraySettings(this));
164 AddTrayItem(new internal::TrayUpdate(this)); 172 AddTrayItem(new internal::TrayUpdate(this));
165 AddTrayItem(new internal::TrayDate(this)); 173 AddTrayItem(new internal::TrayDate(this));
166 174
167 #if defined(OS_LINUX) 175 #if defined(OS_LINUX)
168 // Add memory monitor if enabled. 176 // Add memory monitor if enabled.
169 CommandLine* cmd = CommandLine::ForCurrentProcess(); 177 CommandLine* cmd = CommandLine::ForCurrentProcess();
170 if (cmd->HasSwitch(ash::switches::kAshEnableMemoryMonitor)) 178 if (cmd->HasSwitch(ash::switches::kAshEnableMemoryMonitor))
171 AddTrayItem(new internal::TrayMonitor(this)); 179 AddTrayItem(new internal::TrayMonitor(this));
172 #endif 180 #endif
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 ConvertPointToWidget(this, &point); 563 ConvertPointToWidget(this, &point);
556 arrow_offset = point.x(); 564 arrow_offset = point.x();
557 } 565 }
558 } 566 }
559 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); 567 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset);
560 } 568 }
561 return true; 569 return true;
562 } 570 }
563 571
564 } // namespace ash 572 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698