1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_KEYBOARD_HOOK_HANDLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_KEYBOARD_HOOK_HANDLER_H_
8 #include "ui/views/widget/widget.h"
10 // Interface to control keyboard hook on different platform.
11 class KeyboardHookHandler
{
13 // Request all keyboard events to be routed to the given window.
14 void Register(views::Widget
* widget
);
16 // Release the request for all keyboard events.
17 void Deregister(views::Widget
* widget
);
19 // Implemented in platform specific code.
20 static KeyboardHookHandler
* GetInstance();
23 #endif // CHROME_BROWSER_UI_VIEWS_APPS_KEYBOARD_HOOK_HANDLER_H_