Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: components/keyboard_lock/widget_key_event_filter.h

Issue 2879033002: Keyboard Lock Host implementation
Patch Set: Remove useless files Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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 COMPONENTS_KEYBOARD_LOCK_WIDGET_KEY_EVENT_FILTER_H_
6 #define COMPONENTS_KEYBOARD_LOCK_WIDGET_KEY_EVENT_FILTER_H_
7
8 #include "components/keyboard_lock/key_event_filter.h"
9
10 namespace content {
11 class WebContents;
12 class RenderWidgetHost;
13 } // namespace
14
15 namespace keyboard_lock {
16
17 // An implementation of KeyEventFilter to forward key events to the
18 // RenderWidgetHost.
19 class WidgetKeyEventFilter : public KeyEventFilter {
20 public:
21 explicit WidgetKeyEventFilter(const content::WebContents* contents);
22 ~WidgetKeyEventFilter() override;
23
24 private:
25 // KeyEventFilter implementations
26 bool OnKeyDown(ui::KeyboardCode code, int flags) override;
27 bool OnKeyUp(ui::KeyboardCode code, int flags) override;
28
29 content::RenderWidgetHost* const host_;
30 };
31
32 } // namespace keyboard_lock
33
34 #endif // COMPONENTS_KEYBOARD_LOCK_WIDGET_KEY_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « components/keyboard_lock/sync_key_hook.cc ('k') | components/keyboard_lock/widget_key_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698