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 CHROME_BROWSER_UI_LIBGTKUI_GTK_KEY_BINDINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_GTK_KEY_BINDINGS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_KEY_BINDINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_KEY_BINDINGS_HANDLER_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 28 matching lines...) Expand all Loading... |
39 // See webkit/glue/editor_client_impl.cc for key bindings predefined in our | 39 // See webkit/glue/editor_client_impl.cc for key bindings predefined in our |
40 // webkit glue. | 40 // webkit glue. |
41 class Gtk2KeyBindingsHandler { | 41 class Gtk2KeyBindingsHandler { |
42 public: | 42 public: |
43 Gtk2KeyBindingsHandler(); | 43 Gtk2KeyBindingsHandler(); |
44 virtual ~Gtk2KeyBindingsHandler(); | 44 virtual ~Gtk2KeyBindingsHandler(); |
45 | 45 |
46 // Matches a key event against predefined gtk key bindings, false will be | 46 // Matches a key event against predefined gtk key bindings, false will be |
47 // returned if the key event doesn't correspond to a predefined key binding. | 47 // returned if the key event doesn't correspond to a predefined key binding. |
48 // Edit commands matched with |event| will be stored in |edit_commands|, if | 48 // Edit commands matched with |event| will be stored in |edit_commands|, if |
49 // non-NULL. | 49 // non-nullptr. |
50 bool MatchEvent(const ui::Event& event, | 50 bool MatchEvent(const ui::Event& event, |
51 std::vector<ui::TextEditCommandAuraLinux>* commands); | 51 std::vector<ui::TextEditCommandAuraLinux>* commands); |
52 | 52 |
53 private: | 53 private: |
54 // Object structure of Handler class, which is derived from GtkTextView. | 54 // Object structure of Handler class, which is derived from GtkTextView. |
55 struct Handler { | 55 struct Handler { |
56 GtkTextView parent_object; | 56 GtkTextView parent_object; |
57 Gtk2KeyBindingsHandler* owner; | 57 Gtk2KeyBindingsHandler* owner; |
58 }; | 58 }; |
59 | 59 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Buffer to store the match results. | 140 // Buffer to store the match results. |
141 std::vector<ui::TextEditCommandAuraLinux> edit_commands_; | 141 std::vector<ui::TextEditCommandAuraLinux> edit_commands_; |
142 | 142 |
143 // Whether the current X server has the XKeyboard extension. | 143 // Whether the current X server has the XKeyboard extension. |
144 bool has_xkb_; | 144 bool has_xkb_; |
145 }; | 145 }; |
146 | 146 |
147 } // namespace libgtkui | 147 } // namespace libgtkui |
148 | 148 |
149 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_KEY_BINDINGS_HANDLER_H_ | 149 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_KEY_BINDINGS_HANDLER_H_ |
OLD | NEW |