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

Side by Side Diff: chrome/browser/ui/ash/caps_lock_handler.h

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 | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/ash/caps_lock_handler.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 #ifndef CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_
6 #define CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_ 6 #define CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_
7 7
8 #include "ash/caps_lock_delegate.h" 8 #include "ash/caps_lock_delegate.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 16 matching lines...) Expand all
27 #endif 27 #endif
28 { 28 {
29 public: 29 public:
30 CapsLockHandler() {} 30 CapsLockHandler() {}
31 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
32 explicit CapsLockHandler(chromeos::input_method::XKeyboard* xkeyboard); 32 explicit CapsLockHandler(chromeos::input_method::XKeyboard* xkeyboard);
33 #endif 33 #endif
34 virtual ~CapsLockHandler(); 34 virtual ~CapsLockHandler();
35 35
36 // Overridden from ash::CapsLockHandler: 36 // Overridden from ash::CapsLockHandler:
37 virtual bool HandleToggleCapsLock() OVERRIDE; 37 virtual bool IsCapsLockEnabled() const OVERRIDE;
38 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE;
39 virtual void ToggleCapsLock() OVERRIDE;
38 40
39 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
40 // Overridden from chromeos::SystemKeyEventListener::CapsLockObserver: 42 // Overridden from chromeos::SystemKeyEventListener::CapsLockObserver:
41 virtual void OnCapsLockChange(bool enabled) OVERRIDE; 43 virtual void OnCapsLockChange(bool enabled) OVERRIDE;
42 44
43 void set_is_running_on_chromeos_for_test(bool is_running_on_chromeos) { 45 void set_is_running_on_chromeos_for_test(bool is_running_on_chromeos) {
44 is_running_on_chromeos_ = is_running_on_chromeos; 46 is_running_on_chromeos_ = is_running_on_chromeos;
45 } 47 }
46 48
47 bool caps_lock_is_on_for_test() const { 49 bool caps_lock_is_on_for_test() const {
48 return caps_lock_is_on_; 50 return caps_lock_is_on_;
49 } 51 }
50 52
51 private: 53 private:
52 chromeos::input_method::XKeyboard* xkeyboard_; 54 chromeos::input_method::XKeyboard* xkeyboard_;
53 bool is_running_on_chromeos_; 55 bool is_running_on_chromeos_;
54 bool caps_lock_is_on_; 56 bool caps_lock_is_on_;
55 #endif 57 #endif
56 58
57 private: 59 private:
58 DISALLOW_COPY_AND_ASSIGN(CapsLockHandler); 60 DISALLOW_COPY_AND_ASSIGN(CapsLockHandler);
59 }; 61 };
60 62
61 #endif // CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_ 63 #endif // CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/ash/caps_lock_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698