Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / global_shortcut_listener_ozone.h
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
10 namespace 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.
15 class 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_