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

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

Issue 10878058: Move functions for controlling Caps Lock to CapsLockDelegate from SystemTrayDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 | « ash/test/test_shell_delegate.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | 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 "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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 content::RecordAction( 334 content::RecordAction(
335 content::UserMetricsAction("OpenLanguageOptionsDialog")); 335 content::UserMetricsAction("OpenLanguageOptionsDialog"));
336 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), 336 chrome::ShowSettingsSubPage(GetAppropriateBrowser(),
337 chrome::kLanguageOptionsSubPage); 337 chrome::kLanguageOptionsSubPage);
338 } 338 }
339 339
340 virtual void ShowHelp() OVERRIDE { 340 virtual void ShowHelp() OVERRIDE {
341 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU); 341 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU);
342 } 342 }
343 343
344 virtual bool IsCapsLockOn() const OVERRIDE {
345 input_method::InputMethodManager* ime_manager =
346 input_method::InputMethodManager::GetInstance();
347 return ime_manager->GetXKeyboard()->CapsLockIsEnabled();
348 }
349
350 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE {
351 input_method::InputMethodManager* ime_manager =
352 input_method::InputMethodManager::GetInstance();
353 return ime_manager->GetXKeyboard()->SetCapsLockEnabled(enabled);
354 }
355
356 virtual void ShutDown() OVERRIDE { 344 virtual void ShutDown() OVERRIDE {
357 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); 345 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
358 if (!base::chromeos::IsRunningOnChromeOS()) 346 if (!base::chromeos::IsRunningOnChromeOS())
359 browser::AttemptUserExit(); 347 browser::AttemptUserExit();
360 } 348 }
361 349
362 virtual void SignOut() OVERRIDE { 350 virtual void SignOut() OVERRIDE {
363 browser::AttemptUserExit(); 351 browser::AttemptUserExit();
364 } 352 }
365 353
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1242 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1255 }; 1243 };
1256 1244
1257 } // namespace 1245 } // namespace
1258 1246
1259 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1247 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1260 return new chromeos::SystemTrayDelegate(tray); 1248 return new chromeos::SystemTrayDelegate(tray);
1261 } 1249 }
1262 1250
1263 } // namespace chromeos 1251 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/test/test_shell_delegate.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698