OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_BROWSER_KEYBOARD_LISTENER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_KEYBOARD_LISTENER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_KEYBOARD_LISTENER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_KEYBOARD_LISTENER_H_ |
7 #pragma once | |
8 | 7 |
9 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
10 | 9 |
11 #if defined(TOOLKIT_GTK) | 10 #if defined(TOOLKIT_GTK) |
12 typedef struct _GdkEventKey GdkEventKey; | 11 typedef struct _GdkEventKey GdkEventKey; |
13 #endif // defined(TOOLKIT_GTK) | 12 #endif // defined(TOOLKIT_GTK) |
14 | 13 |
15 class CONTENT_EXPORT KeyboardListener { | 14 class CONTENT_EXPORT KeyboardListener { |
16 public: | 15 public: |
17 #if defined(TOOLKIT_GTK) | 16 #if defined(TOOLKIT_GTK) |
18 virtual bool HandleKeyPressEvent(GdkEventKey* event) = 0; | 17 virtual bool HandleKeyPressEvent(GdkEventKey* event) = 0; |
19 #endif // defined(TOOLKIT_GTK) | 18 #endif // defined(TOOLKIT_GTK) |
20 | 19 |
21 protected: | 20 protected: |
22 virtual ~KeyboardListener() {} | 21 virtual ~KeyboardListener() {} |
23 }; | 22 }; |
24 | 23 |
25 #endif // CONTENT_PUBLIC_BROWSER_KEYBOARD_LISTENER_H_ | 24 #endif // CONTENT_PUBLIC_BROWSER_KEYBOARD_LISTENER_H_ |
OLD | NEW |