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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 10825191: Allow closing root window, or pressing the power button to shutdown ash_shell, and chrome /w chrome… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: braces Created 8 years, 4 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
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 "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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 369 }
370 370
371 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE { 371 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE {
372 input_method::InputMethodManager* ime_manager = 372 input_method::InputMethodManager* ime_manager =
373 input_method::InputMethodManager::GetInstance(); 373 input_method::InputMethodManager::GetInstance();
374 return ime_manager->GetXKeyboard()->SetCapsLockEnabled(enabled); 374 return ime_manager->GetXKeyboard()->SetCapsLockEnabled(enabled);
375 } 375 }
376 376
377 virtual void ShutDown() OVERRIDE { 377 virtual void ShutDown() OVERRIDE {
378 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); 378 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
379 if (!base::chromeos::IsRunningOnChromeOS())
380 browser::AttemptUserExit();
Daniel Erat 2012/08/07 23:35:17 nit: Wondering if it'd be cleaner to implement thi
379 } 381 }
380 382
381 virtual void SignOut() OVERRIDE { 383 virtual void SignOut() OVERRIDE {
382 browser::AttemptUserExit(); 384 browser::AttemptUserExit();
383 } 385 }
384 386
385 virtual void RequestLockScreen() OVERRIDE { 387 virtual void RequestLockScreen() OVERRIDE {
386 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); 388 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen();
387 } 389 }
388 390
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1253 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1252 }; 1254 };
1253 1255
1254 } // namespace 1256 } // namespace
1255 1257
1256 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1258 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1257 return new chromeos::SystemTrayDelegate(tray); 1259 return new chromeos::SystemTrayDelegate(tray);
1258 } 1260 }
1259 1261
1260 } // namespace chromeos 1262 } // namespace chromeos
OLDNEW
« ash/wm/power_button_controller.cc ('K') | « ash/wm/power_button_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698