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

Side by Side Diff: chrome/browser/ui/views/aura/caps_lock_handler.h

Issue 9225004: Handle Caps Lock short cut (Shift+Search) in ash [part 2 of 2]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_AURA_CAPS_LOCK_HANDLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_AURA_CAPS_LOCK_HANDLER_H_
7 #pragma once
8
9 #include "ash/caps_lock_delegate.h"
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12
13 #if defined(OS_CHROMEOS)
14 #include "chrome/browser/chromeos/system_key_event_listener.h"
15 #endif
16
17 class CapsLockHandler
Daniel Erat 2012/01/18 15:44:31 nit: add a brief comment describing what this clas
Yusuke Sato 2012/01/23 06:53:49 Done.
18 : public ash::CapsLockDelegate
19 #if defined(OS_CHROMEOS)
20 , public chromeos::SystemKeyEventListener::CapsLockObserver
21 #endif
22 {
23 public:
24 CapsLockHandler();
25 virtual ~CapsLockHandler();
26
27 // Overridden from ash::CapsLockHandler:
28 virtual bool HandleToggleCapsLock() OVERRIDE;
29
30 #if defined(OS_CHROMEOS)
31 // Overridden from chromeos::SystemKeyEventListener::CapsLockObserver:
32 virtual void OnCapsLockChange(bool enabled) OVERRIDE;
33 #endif
34
35 protected:
36 // For testing.
37 void set_is_running_on_chromeos(bool is_running_on_chromeos) {
Daniel Erat 2012/01/18 15:44:31 nit: add "_for_test" at the end of this method's n
Yusuke Sato 2012/01/23 06:53:49 Thanks. Removed the derived class as well.
38 is_running_on_chromeos_ = is_running_on_chromeos;
39 }
40 // For testing.
41 bool caps_lock_is_on() const {
42 return caps_lock_is_on_;
43 }
44
45 private:
46 bool is_running_on_chromeos_;
47 bool caps_lock_is_on_;
48
49 DISALLOW_COPY_AND_ASSIGN(CapsLockHandler);
50 };
51
52 #endif // CHROME_BROWSER_UI_VIEWS_AURA_CAPS_LOCK_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698