| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } | 360 } |
| 361 | 361 |
| 362 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE { | 362 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE { |
| 363 input_method::InputMethodManager* ime_manager = | 363 input_method::InputMethodManager* ime_manager = |
| 364 input_method::InputMethodManager::GetInstance(); | 364 input_method::InputMethodManager::GetInstance(); |
| 365 return ime_manager->GetXKeyboard()->SetCapsLockEnabled(enabled); | 365 return ime_manager->GetXKeyboard()->SetCapsLockEnabled(enabled); |
| 366 } | 366 } |
| 367 | 367 |
| 368 virtual void ShutDown() OVERRIDE { | 368 virtual void ShutDown() OVERRIDE { |
| 369 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); | 369 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); |
| 370 if (!base::chromeos::IsRunningOnChromeOS()) |
| 371 browser::AttemptUserExit(); |
| 370 } | 372 } |
| 371 | 373 |
| 372 virtual void SignOut() OVERRIDE { | 374 virtual void SignOut() OVERRIDE { |
| 373 browser::AttemptUserExit(); | 375 browser::AttemptUserExit(); |
| 374 } | 376 } |
| 375 | 377 |
| 376 virtual void RequestLockScreen() OVERRIDE { | 378 virtual void RequestLockScreen() OVERRIDE { |
| 377 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); | 379 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); |
| 378 } | 380 } |
| 379 | 381 |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1255 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1254 }; | 1256 }; |
| 1255 | 1257 |
| 1256 } // namespace | 1258 } // namespace |
| 1257 | 1259 |
| 1258 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 1260 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
| 1259 return new chromeos::SystemTrayDelegate(tray); | 1261 return new chromeos::SystemTrayDelegate(tray); |
| 1260 } | 1262 } |
| 1261 | 1263 |
| 1262 } // namespace chromeos | 1264 } // namespace chromeos |
| OLD | NEW |