summaryrefslogtreecommitdiffstats
path: root/ash/caps_lock_delegate.h
blob: 6bd2b69eb8c2bcf370389032dd17e942db140aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_CAPS_LOCK_DELEGATE_H_
#define ASH_CAPS_LOCK_DELEGATE_H_

#include "ash/ash_export.h"

namespace ash {

// Delegate for controlling Caps Lock.
class ASH_EXPORT CapsLockDelegate {
 public:
  virtual ~CapsLockDelegate() {}

  // Returns true if caps lock is enabled.
  virtual bool IsCapsLockEnabled() const = 0;

  // Sets the caps lock state to |enabled|.
  // The state change can occur asynchronously and calling IsCapsLockEnabled
  // just after this may return the old state.
  virtual void SetCapsLockEnabled(bool enabled) = 0;

  // Toggles the caps lock state.
  // The state change can occur asynchronously and calling IsCapsLockEnabled
  // just after this may return the old state.
  virtual void ToggleCapsLock() = 0;
};

}  // namespace ash

#endif  // ASH_CAPS_LOCK_DELEGATE_H_