Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / browser / ui / views / apps / keyboard_hook_handler.h
bloba1412c01627e37a9ed4f21826492a98f5ff01075
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 {
12 public:
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_