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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.h

Issue 2029733003: Views: Replace resource ids with ui::TextEditCommand enum for text editing commands in Textfield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: === Created 4 years, 6 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
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_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/event_types.h" 13 #include "base/event_types.h"
14 #include "ui/events/linux/text_edit_command_auralinux.h" 14 #include "ui/base/ime/linux/text_edit_command_auralinux.h"
15 15
16 namespace content { 16 namespace content {
17 struct NativeWebKeyboardEvent; 17 struct NativeWebKeyboardEvent;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 class Event; 21 class Event;
22 } 22 }
23 23
24 namespace libgtk2ui { 24 namespace libgtk2ui {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Class structure of Handler class. 64 // Class structure of Handler class.
65 struct HandlerClass { 65 struct HandlerClass {
66 GtkTextViewClass parent_class; 66 GtkTextViewClass parent_class;
67 }; 67 };
68 68
69 // Creates a new instance of Handler class. 69 // Creates a new instance of Handler class.
70 GtkWidget* CreateNewHandler(); 70 GtkWidget* CreateNewHandler();
71 71
72 // Adds an edit command to the key event. 72 // Adds an edit command to the key event.
73 void EditCommandMatched(ui::TextEditCommandAuraLinux::CommandId id, 73 void EditCommandMatched(ui::TextEditCommand command,
74 const std::string& value, 74 const std::string& value);
75 bool extend_selection);
76 75
77 // Builds a fake GdkEventKey from an XEvent. 76 // Builds a fake GdkEventKey from an XEvent.
78 void BuildGdkEventKeyFromXEvent(const base::NativeEvent& xevent, 77 void BuildGdkEventKeyFromXEvent(const base::NativeEvent& xevent,
79 GdkEventKey* gdk_event); 78 GdkEventKey* gdk_event);
80 79
81 // Initializes Handler structure. 80 // Initializes Handler structure.
82 static void HandlerInit(Handler *self); 81 static void HandlerInit(Handler *self);
83 82
84 // Initializes HandlerClass structure. 83 // Initializes HandlerClass structure.
85 static void HandlerClassInit(HandlerClass *klass); 84 static void HandlerClassInit(HandlerClass *klass);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Buffer to store the match results. 140 // Buffer to store the match results.
142 std::vector<ui::TextEditCommandAuraLinux> edit_commands_; 141 std::vector<ui::TextEditCommandAuraLinux> edit_commands_;
143 142
144 // Whether the current X server has the XKeyboard extension. 143 // Whether the current X server has the XKeyboard extension.
145 bool has_xkb_; 144 bool has_xkb_;
146 }; 145 };
147 146
148 } // namespace libgtk2ui 147 } // namespace libgtk2ui
149 148
150 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ 149 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698