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_BROWSER_RENDERER_HOST_GTK_KEY_BINDINGS_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_GTK_KEY_BINDINGS_HANDLER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_GTK_KEY_BINDINGS_HANDLER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_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 27 matching lines...) Expand all Loading... |
38 // webkit glue. | 38 // webkit glue. |
39 class CONTENT_EXPORT GtkKeyBindingsHandler { | 39 class CONTENT_EXPORT GtkKeyBindingsHandler { |
40 public: | 40 public: |
41 explicit GtkKeyBindingsHandler(GtkWidget* parent_widget); | 41 explicit GtkKeyBindingsHandler(GtkWidget* parent_widget); |
42 ~GtkKeyBindingsHandler(); | 42 ~GtkKeyBindingsHandler(); |
43 | 43 |
44 // Matches a key event against predefined gtk key bindings, false will be | 44 // Matches a key event against predefined gtk key bindings, false will be |
45 // returned if the key event doesn't correspond to a predefined key binding. | 45 // returned if the key event doesn't correspond to a predefined key binding. |
46 // Edit commands matched with |wke| will be stored in |edit_commands|. | 46 // Edit commands matched with |wke| will be stored in |edit_commands|. |
47 bool Match(const content::NativeWebKeyboardEvent& wke, | 47 bool Match(const content::NativeWebKeyboardEvent& wke, |
48 EditCommands* edit_commands); | 48 content::EditCommands* edit_commands); |
49 | 49 |
50 private: | 50 private: |
51 // Object structure of Handler class, which is derived from GtkTextView. | 51 // Object structure of Handler class, which is derived from GtkTextView. |
52 struct Handler { | 52 struct Handler { |
53 GtkTextView parent_object; | 53 GtkTextView parent_object; |
54 GtkKeyBindingsHandler *owner; | 54 GtkKeyBindingsHandler *owner; |
55 }; | 55 }; |
56 | 56 |
57 // Class structure of Handler class. | 57 // Class structure of Handler class. |
58 struct HandlerClass { | 58 struct HandlerClass { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 // Handler of "show-help" signal. | 119 // Handler of "show-help" signal. |
120 static gboolean ShowHelp(GtkWidget* widget, GtkWidgetHelpType arg1); | 120 static gboolean ShowHelp(GtkWidget* widget, GtkWidgetHelpType arg1); |
121 | 121 |
122 // Handler of "move-focus" signal. | 122 // Handler of "move-focus" signal. |
123 static void MoveFocus(GtkWidget* widget, GtkDirectionType arg1); | 123 static void MoveFocus(GtkWidget* widget, GtkDirectionType arg1); |
124 | 124 |
125 ui::OwnedWidgetGtk handler_; | 125 ui::OwnedWidgetGtk handler_; |
126 | 126 |
127 // Buffer to store the match results. | 127 // Buffer to store the match results. |
128 EditCommands edit_commands_; | 128 content::EditCommands edit_commands_; |
129 }; | 129 }; |
130 | 130 |
131 #endif // CONTENT_BROWSER_RENDERER_HOST_GTK_KEY_BINDINGS_HANDLER_H_ | 131 #endif // CONTENT_BROWSER_RENDERER_HOST_GTK_KEY_BINDINGS_HANDLER_H_ |
OLD | NEW |