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 "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/system/audio/audio_observer.h" | 9 #include "ash/system/audio/audio_observer.h" |
10 #include "ash/system/bluetooth/bluetooth_observer.h" | 10 #include "ash/system/bluetooth/bluetooth_observer.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
376 } | 376 } |
377 | 377 |
378 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE { | 378 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE { |
379 input_method::InputMethodManager* ime_manager = | 379 input_method::InputMethodManager* ime_manager = |
380 input_method::InputMethodManager::GetInstance(); | 380 input_method::InputMethodManager::GetInstance(); |
381 return ime_manager->GetXKeyboard()->SetCapsLockEnabled(enabled); | 381 return ime_manager->GetXKeyboard()->SetCapsLockEnabled(enabled); |
382 } | 382 } |
383 | 383 |
384 virtual void ShutDown() OVERRIDE { | 384 virtual void ShutDown() OVERRIDE { |
385 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); | 385 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); |
386 if (!base::chromeos::IsRunningOnChromeOS()) { | |
387 browser::AttemptUserExit(); | |
sadrul
2012/08/07 13:29:03
no braces
Harry McCleave
2012/08/07 18:30:14
Done. Though I like my braces :'(
| |
388 } | |
386 } | 389 } |
387 | 390 |
388 virtual void SignOut() OVERRIDE { | 391 virtual void SignOut() OVERRIDE { |
389 browser::AttemptUserExit(); | 392 browser::AttemptUserExit(); |
390 } | 393 } |
391 | 394 |
392 virtual void RequestLockScreen() OVERRIDE { | 395 virtual void RequestLockScreen() OVERRIDE { |
393 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); | 396 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); |
394 } | 397 } |
395 | 398 |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1258 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1261 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1259 }; | 1262 }; |
1260 | 1263 |
1261 } // namespace | 1264 } // namespace |
1262 | 1265 |
1263 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 1266 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
1264 return new chromeos::SystemTrayDelegate(tray); | 1267 return new chromeos::SystemTrayDelegate(tray); |
1265 } | 1268 } |
1266 | 1269 |
1267 } // namespace chromeos | 1270 } // namespace chromeos |
OLD | NEW |