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 #include "content/browser/renderer_host/gtk_key_bindings_handler.h" | 5 #include "content/browser/renderer_host/gtk_key_bindings_handler.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "content/public/browser/native_web_keyboard_event.h" | 13 #include "content/public/browser/native_web_keyboard_event.h" |
14 | 14 |
| 15 using content::NativeWebKeyboardEvent; |
| 16 |
15 GtkKeyBindingsHandler::GtkKeyBindingsHandler(GtkWidget* parent_widget) | 17 GtkKeyBindingsHandler::GtkKeyBindingsHandler(GtkWidget* parent_widget) |
16 : handler_(CreateNewHandler()) { | 18 : handler_(CreateNewHandler()) { |
17 DCHECK(GTK_IS_FIXED(parent_widget)); | 19 DCHECK(GTK_IS_FIXED(parent_widget)); |
18 // We need add the |handler_| object into gtk widget hierarchy, so that | 20 // We need add the |handler_| object into gtk widget hierarchy, so that |
19 // gtk_bindings_activate_event() can find correct display and keymaps from | 21 // gtk_bindings_activate_event() can find correct display and keymaps from |
20 // the |handler_| object. | 22 // the |handler_| object. |
21 gtk_fixed_put(GTK_FIXED(parent_widget), handler_.get(), -1, -1); | 23 gtk_fixed_put(GTK_FIXED(parent_widget), handler_.get(), -1, -1); |
22 } | 24 } |
23 | 25 |
24 GtkKeyBindingsHandler::~GtkKeyBindingsHandler() { | 26 GtkKeyBindingsHandler::~GtkKeyBindingsHandler() { |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 gboolean GtkKeyBindingsHandler::ShowHelp(GtkWidget* widget, | 281 gboolean GtkKeyBindingsHandler::ShowHelp(GtkWidget* widget, |
280 GtkWidgetHelpType arg1) { | 282 GtkWidgetHelpType arg1) { |
281 // Just for disabling the default handler. | 283 // Just for disabling the default handler. |
282 return FALSE; | 284 return FALSE; |
283 } | 285 } |
284 | 286 |
285 void GtkKeyBindingsHandler::MoveFocus(GtkWidget* widget, | 287 void GtkKeyBindingsHandler::MoveFocus(GtkWidget* widget, |
286 GtkDirectionType arg1) { | 288 GtkDirectionType arg1) { |
287 // Just for disabling the default handler. | 289 // Just for disabling the default handler. |
288 } | 290 } |
OLD | NEW |