1// Copyright 2013 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_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_
6#define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_
7
8#include "chrome/browser/extensions/global_shortcut_listener.h"
9
10namespace extensions {
11
12// Ozone-specific implementation of the GlobalShortcutListener class that
13// listens for global shortcuts. Handles basic keyboard intercepting and
14// forwards its output to the base class for processing.
15class GlobalShortcutListenerOzone : public GlobalShortcutListener {
16 public:
17  GlobalShortcutListenerOzone();
18  virtual ~GlobalShortcutListenerOzone();
19
20 private:
21  // GlobalShortcutListener implementation.
22  virtual void StartListening() OVERRIDE;
23  virtual void StopListening() OVERRIDE;
24  virtual bool RegisterAcceleratorImpl(
25      const ui::Accelerator& accelerator) OVERRIDE;
26  virtual void UnregisterAcceleratorImpl(
27      const ui::Accelerator& accelerator) OVERRIDE;
28
29  // Whether this object is listening for global shortcuts.
30  bool is_listening_;
31
32  DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerOzone);
33};
34
35}  // namespace extensions
36
37#endif  // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_
38