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/omnibox/omnibox_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "ui/base/resource/resource_bundle.h" | 41 #include "ui/base/resource/resource_bundle.h" |
42 #include "ui/gfx/color_utils.h" | 42 #include "ui/gfx/color_utils.h" |
43 #include "ui/gfx/font.h" | 43 #include "ui/gfx/font.h" |
44 #include "ui/gfx/gtk_util.h" | 44 #include "ui/gfx/gtk_util.h" |
45 #include "ui/gfx/skia_utils_gtk.h" | 45 #include "ui/gfx/skia_utils_gtk.h" |
46 | 46 |
47 #if defined(TOOLKIT_VIEWS) | 47 #if defined(TOOLKIT_VIEWS) |
48 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.
h" | 48 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.
h" |
49 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 49 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
50 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" | 50 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
| 51 #include "ui/views/events/event.h" |
51 #include "views/controls/textfield/native_textfield_views.h" | 52 #include "views/controls/textfield/native_textfield_views.h" |
52 #include "views/events/event.h" | |
53 #else | 53 #else |
54 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 54 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
55 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" | 55 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
56 #include "chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h" | 56 #include "chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h" |
57 #endif | 57 #endif |
58 | 58 |
59 namespace { | 59 namespace { |
60 | 60 |
61 const gchar* kOmniboxViewGtkKey = "__OMNIBOX_VIEW_GTK__"; | 61 const gchar* kOmniboxViewGtkKey = "__OMNIBOX_VIEW_GTK__"; |
62 | 62 |
(...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2394 | 2394 |
2395 // Make all the children of the widget visible. NOTE: this won't display | 2395 // Make all the children of the widget visible. NOTE: this won't display |
2396 // anything, it just toggles the visible flag. | 2396 // anything, it just toggles the visible flag. |
2397 gtk_widget_show_all(omnibox_view->GetNativeView()); | 2397 gtk_widget_show_all(omnibox_view->GetNativeView()); |
2398 // Hide the widget. NativeViewHostGtk will make it visible again as necessary. | 2398 // Hide the widget. NativeViewHostGtk will make it visible again as necessary. |
2399 gtk_widget_hide(omnibox_view->GetNativeView()); | 2399 gtk_widget_hide(omnibox_view->GetNativeView()); |
2400 | 2400 |
2401 return omnibox_view; | 2401 return omnibox_view; |
2402 } | 2402 } |
2403 #endif | 2403 #endif |
OLD | NEW |