| 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 "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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 } | 669 } |
| 670 // Fall through. | 670 // Fall through. |
| 671 default: | 671 default: |
| 672 return false; | 672 return false; |
| 673 } | 673 } |
| 674 | 674 |
| 675 TabContentsWrapper* contents = find_bar_controller_->tab_contents(); | 675 TabContentsWrapper* contents = find_bar_controller_->tab_contents(); |
| 676 if (!contents) | 676 if (!contents) |
| 677 return false; | 677 return false; |
| 678 | 678 |
| 679 RenderViewHost* render_view_host = | 679 content::RenderViewHost* render_view_host = |
| 680 contents->web_contents()->GetRenderViewHost(); | 680 contents->web_contents()->GetRenderViewHost(); |
| 681 | 681 |
| 682 // Make sure we don't have a text field element interfering with keyboard | 682 // Make sure we don't have a text field element interfering with keyboard |
| 683 // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom". | 683 // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom". |
| 684 render_view_host->ClearFocusedNode(); | 684 render_view_host->ClearFocusedNode(); |
| 685 | 685 |
| 686 NativeWebKeyboardEvent wke(reinterpret_cast<GdkEvent*>(event)); | 686 NativeWebKeyboardEvent wke(reinterpret_cast<GdkEvent*>(event)); |
| 687 render_view_host->ForwardKeyboardEvent(wke); | 687 render_view_host->ForwardKeyboardEvent(wke); |
| 688 return true; | 688 return true; |
| 689 } | 689 } |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 return FALSE; // Continue propagation. | 994 return FALSE; // Continue propagation. |
| 995 } | 995 } |
| 996 | 996 |
| 997 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) { | 997 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) { |
| 998 g_signal_handlers_disconnect_by_func( | 998 g_signal_handlers_disconnect_by_func( |
| 999 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), | 999 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), |
| 1000 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this); | 1000 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this); |
| 1001 | 1001 |
| 1002 return FALSE; // Continue propagation. | 1002 return FALSE; // Continue propagation. |
| 1003 } | 1003 } |
| OLD | NEW |