| OLD | NEW |
| 1 // Copyright (c) 2010 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/autocomplete/autocomplete_edit_view_gtk.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 | 11 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 31 #include "gfx/color_utils.h" | 31 #include "gfx/color_utils.h" |
| 32 #include "gfx/font.h" | 32 #include "gfx/font.h" |
| 33 #include "gfx/gtk_util.h" | 33 #include "gfx/gtk_util.h" |
| 34 #include "gfx/skia_utils_gtk.h" | 34 #include "gfx/skia_utils_gtk.h" |
| 35 #include "googleurl/src/gurl.h" | 35 #include "googleurl/src/gurl.h" |
| 36 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 37 #include "net/base/escape.h" | 37 #include "net/base/escape.h" |
| 38 #include "third_party/undoview/undo_view.h" | 38 #include "third_party/undoview/undo_view.h" |
| 39 | 39 |
| 40 #if defined(TOOLKIT_VIEWS) | 40 #if defined(TOOLKIT_VIEWS) |
| 41 #include "chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h" | 41 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.
h" |
| 42 #include "chrome/browser/views/location_bar/location_bar_view.h" | 42 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 43 #else | 43 #else |
| 44 #include "chrome/browser/autocomplete/autocomplete_popup_view_gtk.h" | 44 #include "chrome/browser/autocomplete/autocomplete_popup_view_gtk.h" |
| 45 #include "chrome/browser/gtk/gtk_theme_provider.h" | 45 #include "chrome/browser/gtk/gtk_theme_provider.h" |
| 46 #include "chrome/browser/gtk/location_bar_view_gtk.h" | 46 #include "chrome/browser/gtk/location_bar_view_gtk.h" |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 namespace { | 49 namespace { |
| 50 | 50 |
| 51 const gchar* kAutocompleteEditViewGtkKey = "__ACE_VIEW_GTK__"; | 51 const gchar* kAutocompleteEditViewGtkKey = "__ACE_VIEW_GTK__"; |
| 52 | 52 |
| (...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2149 // baseline, so we need to move the |instant_view_| down to make sure it | 2149 // baseline, so we need to move the |instant_view_| down to make sure it |
| 2150 // has the same baseline as the |text_view_|. | 2150 // has the same baseline as the |text_view_|. |
| 2151 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(instant_view_)); | 2151 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(instant_view_)); |
| 2152 int height; | 2152 int height; |
| 2153 pango_layout_get_size(layout, NULL, &height); | 2153 pango_layout_get_size(layout, NULL, &height); |
| 2154 PangoLayoutIter* iter = pango_layout_get_iter(layout); | 2154 PangoLayoutIter* iter = pango_layout_get_iter(layout); |
| 2155 int baseline = pango_layout_iter_get_baseline(iter); | 2155 int baseline = pango_layout_iter_get_baseline(iter); |
| 2156 pango_layout_iter_free(iter); | 2156 pango_layout_iter_free(iter); |
| 2157 g_object_set(instant_anchor_tag_, "rise", baseline - height, NULL); | 2157 g_object_set(instant_anchor_tag_, "rise", baseline - height, NULL); |
| 2158 } | 2158 } |
| OLD | NEW |