Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc

Issue 6272025: Part 2 of repairing regressions to my old clang check plugins so Nico can (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright 2011 Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/autocomplete/autocomplete_edit_view_gtk.h" 5 #include "chrome/browser/autocomplete/autocomplete_edit_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 29 matching lines...) Expand all
40 #if defined(TOOLKIT_VIEWS) 40 #if defined(TOOLKIT_VIEWS)
41 #include "chrome/browser/autocomplete/autocomplete_edit_view_views.h" 41 #include "chrome/browser/autocomplete/autocomplete_edit_view_views.h"
42 #include "chrome/browser/ui/gtk/accessible_widget_helper_gtk.h" 42 #include "chrome/browser/ui/gtk/accessible_widget_helper_gtk.h"
43 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view. h" 43 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view. h"
44 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 44 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
45 #include "views/controls/textfield/native_textfield_views.h" 45 #include "views/controls/textfield/native_textfield_views.h"
46 #else 46 #else
47 #include "chrome/browser/autocomplete/autocomplete_popup_view_gtk.h" 47 #include "chrome/browser/autocomplete/autocomplete_popup_view_gtk.h"
48 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" 48 #include "chrome/browser/ui/gtk/gtk_theme_provider.h"
49 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" 49 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
50 #include "views/controls/native/native_view_host.h"
51 #endif 50 #endif
52 51
53 namespace { 52 namespace {
54 53
55 const gchar* kAutocompleteEditViewGtkKey = "__ACE_VIEW_GTK__"; 54 const gchar* kAutocompleteEditViewGtkKey = "__ACE_VIEW_GTK__";
56 55
57 const char kTextBaseColor[] = "#808080"; 56 const char kTextBaseColor[] = "#808080";
58 const char kSecureSchemeColor[] = "#079500"; 57 const char kSecureSchemeColor[] = "#079500";
59 const char kSecurityErrorSchemeColor[] = "#a20000"; 58 const char kSecurityErrorSchemeColor[] = "#a20000";
60 59
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 // baseline, so we need to move the |instant_view_| down to make sure it 2216 // baseline, so we need to move the |instant_view_| down to make sure it
2218 // has the same baseline as the |text_view_|. 2217 // has the same baseline as the |text_view_|.
2219 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(instant_view_)); 2218 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(instant_view_));
2220 int height; 2219 int height;
2221 pango_layout_get_size(layout, NULL, &height); 2220 pango_layout_get_size(layout, NULL, &height);
2222 PangoLayoutIter* iter = pango_layout_get_iter(layout); 2221 PangoLayoutIter* iter = pango_layout_get_iter(layout);
2223 int baseline = pango_layout_iter_get_baseline(iter); 2222 int baseline = pango_layout_iter_get_baseline(iter);
2224 pango_layout_iter_free(iter); 2223 pango_layout_iter_free(iter);
2225 g_object_set(instant_anchor_tag_, "rise", baseline - height, NULL); 2224 g_object_set(instant_anchor_tag_, "rise", baseline - height, NULL);
2226 } 2225 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698