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 29 matching lines...) Expand all Loading... |
40 #include "grit/generated_resources.h" | 40 #include "grit/generated_resources.h" |
41 #include "grit/theme_resources.h" | 41 #include "grit/theme_resources.h" |
42 #include "grit/ui_resources_standard.h" | 42 #include "grit/ui_resources_standard.h" |
43 #include "ui/base/gtk/gtk_floating_container.h" | 43 #include "ui/base/gtk/gtk_floating_container.h" |
44 #include "ui/base/gtk/gtk_hig_constants.h" | 44 #include "ui/base/gtk/gtk_hig_constants.h" |
45 #include "ui/base/l10n/l10n_util.h" | 45 #include "ui/base/l10n/l10n_util.h" |
46 #include "ui/base/resource/resource_bundle.h" | 46 #include "ui/base/resource/resource_bundle.h" |
47 #include "ui/gfx/image/cairo_cached_surface.h" | 47 #include "ui/gfx/image/cairo_cached_surface.h" |
48 #include "ui/gfx/image/image.h" | 48 #include "ui/gfx/image/image.h" |
49 | 49 |
| 50 using content::NativeWebKeyboardEvent; |
| 51 |
50 namespace { | 52 namespace { |
51 | 53 |
52 // Used as the color of the text in the entry box and the text for the results | 54 // Used as the color of the text in the entry box and the text for the results |
53 // label for failure searches. | 55 // label for failure searches. |
54 const GdkColor& kEntryTextColor = ui::kGdkBlack; | 56 const GdkColor& kEntryTextColor = ui::kGdkBlack; |
55 | 57 |
56 // Used as the color of the background of the entry box and the background of | 58 // Used as the color of the background of the entry box and the background of |
57 // the find label for successful searches. | 59 // the find label for successful searches. |
58 const GdkColor& kEntryBackgroundColor = ui::kGdkWhite; | 60 const GdkColor& kEntryBackgroundColor = ui::kGdkWhite; |
59 const GdkColor kFindFailureBackgroundColor = GDK_COLOR_RGB(255, 102, 102); | 61 const GdkColor kFindFailureBackgroundColor = GDK_COLOR_RGB(255, 102, 102); |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 return FALSE; // Continue propagation. | 1001 return FALSE; // Continue propagation. |
1000 } | 1002 } |
1001 | 1003 |
1002 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) { | 1004 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) { |
1003 g_signal_handlers_disconnect_by_func( | 1005 g_signal_handlers_disconnect_by_func( |
1004 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), | 1006 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), |
1005 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this); | 1007 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this); |
1006 | 1008 |
1007 return FALSE; // Continue propagation. | 1009 return FALSE; // Continue propagation. |
1008 } | 1010 } |
OLD | NEW |