| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
| 14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/renderer_host/render_view_host.h" | |
| 19 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 20 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
| 21 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 19 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 22 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 20 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
| 23 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 21 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
| 24 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 22 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 25 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 23 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 26 #include "chrome/browser/ui/gtk/cairo_cached_surface.h" | 24 #include "chrome/browser/ui/gtk/cairo_cached_surface.h" |
| 27 #include "chrome/browser/ui/gtk/custom_button.h" | 25 #include "chrome/browser/ui/gtk/custom_button.h" |
| 28 #include "chrome/browser/ui/gtk/gtk_floating_container.h" | 26 #include "chrome/browser/ui/gtk/gtk_floating_container.h" |
| 29 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" | 27 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" |
| 30 #include "chrome/browser/ui/gtk/gtk_util.h" | 28 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 31 #include "chrome/browser/ui/gtk/nine_box.h" | 29 #include "chrome/browser/ui/gtk/nine_box.h" |
| 32 #include "chrome/browser/ui/gtk/slide_animator_gtk.h" | 30 #include "chrome/browser/ui/gtk/slide_animator_gtk.h" |
| 33 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" | 31 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" |
| 34 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" | 32 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" |
| 35 #include "chrome/browser/ui/gtk/view_id_util.h" | 33 #include "chrome/browser/ui/gtk/view_id_util.h" |
| 36 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 34 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 37 #include "chrome/common/native_web_keyboard_event.h" | 35 #include "chrome/common/native_web_keyboard_event.h" |
| 38 #include "chrome/common/notification_service.h" | 36 #include "chrome/common/notification_service.h" |
| 37 #include "content/browser/renderer_host/render_view_host.h" |
| 38 #include "content/browser/tab_contents/tab_contents.h" |
| 39 #include "grit/generated_resources.h" | 39 #include "grit/generated_resources.h" |
| 40 #include "grit/theme_resources.h" | 40 #include "grit/theme_resources.h" |
| 41 #include "ui/base/l10n/l10n_util.h" | 41 #include "ui/base/l10n/l10n_util.h" |
| 42 #include "ui/base/resource/resource_bundle.h" | 42 #include "ui/base/resource/resource_bundle.h" |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 // Used as the color of the text in the entry box and the text for the results | 46 // Used as the color of the text in the entry box and the text for the results |
| 47 // label for failure searches. | 47 // label for failure searches. |
| 48 const GdkColor kEntryTextColor = gtk_util::kGdkBlack; | 48 const GdkColor kEntryTextColor = gtk_util::kGdkBlack; |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 | 986 |
| 987 // static | 987 // static |
| 988 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event, | 988 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event, |
| 989 FindBarGtk* find_bar) { | 989 FindBarGtk* find_bar) { |
| 990 g_signal_handlers_disconnect_by_func( | 990 g_signal_handlers_disconnect_by_func( |
| 991 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), | 991 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), |
| 992 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), find_bar); | 992 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), find_bar); |
| 993 | 993 |
| 994 return FALSE; // Continue propagation. | 994 return FALSE; // Continue propagation. |
| 995 } | 995 } |
| OLD | NEW |