OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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_COMMON_NATIVE_WEB_KEYBOARD_EVENT_VIEWS_H_ | |
6 #define CHROME_COMMON_NATIVE_WEB_KEYBOARD_EVENT_VIEWS_H_ | |
7 #pragma once | |
8 | |
9 #include "content/public/browser/native_web_keyboard_event.h" | |
10 | |
11 namespace views { | |
12 class KeyEvent; | |
13 } | |
14 | |
15 // A views implementation of NativeWebKeyboardEvent. | |
16 struct NativeWebKeyboardEventViews : public NativeWebKeyboardEvent { | |
17 // TODO(suzhe): remove once we get rid of Gtk from Views. | |
18 struct FromViewsEvent {}; | |
19 // These two constructors are shared between Windows and Linux Views ports. | |
20 explicit NativeWebKeyboardEventViews(const views::KeyEvent& event); | |
21 // TODO(suzhe): Sadly, we need to add a meanless FromViewsEvent parameter to | |
22 // distinguish between this contructor and above Gtk one, because they use | |
23 // different modifier flags. We can remove this extra parameter as soon as we | |
24 // disable above Gtk constructor in Linux Views port. | |
25 NativeWebKeyboardEventViews(uint16 character, | |
26 int flags, | |
27 double time_stamp_seconds, | |
28 FromViewsEvent); | |
29 | |
30 ~NativeWebKeyboardEventViews(); | |
31 }; | |
32 | |
33 #endif // CHROME_COMMON_NATIVE_WEB_KEYBOARD_EVENT_VIEWS_H_ | |
OLD | NEW |