OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/ui/gtk/find_bar_gtk.h" | 5 #include "chrome/browser/ui/gtk/find_bar_gtk.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 } | 665 } |
666 // Fall through. | 666 // Fall through. |
667 default: | 667 default: |
668 return false; | 668 return false; |
669 } | 669 } |
670 | 670 |
671 TabContentsWrapper* contents = find_bar_controller_->tab_contents(); | 671 TabContentsWrapper* contents = find_bar_controller_->tab_contents(); |
672 if (!contents) | 672 if (!contents) |
673 return false; | 673 return false; |
674 | 674 |
675 RenderViewHost* render_view_host = contents->render_view_host(); | 675 RenderViewHost* render_view_host = |
| 676 contents->tab_contents()->render_view_host(); |
676 | 677 |
677 // Make sure we don't have a text field element interfering with keyboard | 678 // Make sure we don't have a text field element interfering with keyboard |
678 // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom". | 679 // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom". |
679 render_view_host->ClearFocusedNode(); | 680 render_view_host->ClearFocusedNode(); |
680 | 681 |
681 NativeWebKeyboardEvent wke(reinterpret_cast<GdkEvent*>(event)); | 682 NativeWebKeyboardEvent wke(reinterpret_cast<GdkEvent*>(event)); |
682 render_view_host->ForwardKeyboardEvent(wke); | 683 render_view_host->ForwardKeyboardEvent(wke); |
683 return true; | 684 return true; |
684 } | 685 } |
685 | 686 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 return FALSE; // Continue propagation. | 983 return FALSE; // Continue propagation. |
983 } | 984 } |
984 | 985 |
985 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) { | 986 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) { |
986 g_signal_handlers_disconnect_by_func( | 987 g_signal_handlers_disconnect_by_func( |
987 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), | 988 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), |
988 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this); | 989 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this); |
989 | 990 |
990 return FALSE; // Continue propagation. | 991 return FALSE; // Continue propagation. |
991 } | 992 } |
OLD | NEW |