| 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/autocomplete/autocomplete_popup_view_gtk.h" | 5 #include "chrome/browser/autocomplete/autocomplete_popup_view_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/stl_util-inl.h" | 15 #include "base/stl_util-inl.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/browser/autocomplete/autocomplete.h" | 17 #include "chrome/browser/autocomplete/autocomplete.h" |
| 18 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 18 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 19 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" | 19 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" |
| 20 #include "chrome/browser/autocomplete/autocomplete_match.h" | 20 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 21 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 21 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
| 22 #include "chrome/browser/defaults.h" | 22 #include "chrome/browser/defaults.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 24 #include "chrome/browser/search_engines/template_url.h" | 24 #include "chrome/browser/search_engines/template_url.h" |
| 25 #include "chrome/browser/search_engines/template_url_model.h" | 25 #include "chrome/browser/search_engines/template_url_model.h" |
| 26 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" | 26 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" |
| 27 #include "chrome/browser/ui/gtk/gtk_util.h" | 27 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 28 #include "chrome/common/notification_service.h" | 28 #include "chrome/common/notification_service.h" |
| 29 #include "gfx/color_utils.h" | |
| 30 #include "gfx/font.h" | |
| 31 #include "gfx/gtk_util.h" | |
| 32 #include "gfx/rect.h" | |
| 33 #include "gfx/skia_utils_gtk.h" | |
| 34 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
| 30 #include "ui/gfx/color_utils.h" |
| 31 #include "ui/gfx/font.h" |
| 32 #include "ui/gfx/gtk_util.h" |
| 33 #include "ui/gfx/rect.h" |
| 34 #include "ui/gfx/skia_utils_gtk.h" |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 const GdkColor kBorderColor = GDK_COLOR_RGB(0xc7, 0xca, 0xce); | 38 const GdkColor kBorderColor = GDK_COLOR_RGB(0xc7, 0xca, 0xce); |
| 39 const GdkColor kBackgroundColor = GDK_COLOR_RGB(0xff, 0xff, 0xff); | 39 const GdkColor kBackgroundColor = GDK_COLOR_RGB(0xff, 0xff, 0xff); |
| 40 const GdkColor kSelectedBackgroundColor = GDK_COLOR_RGB(0xdf, 0xe6, 0xf6); | 40 const GdkColor kSelectedBackgroundColor = GDK_COLOR_RGB(0xdf, 0xe6, 0xf6); |
| 41 const GdkColor kHoveredBackgroundColor = GDK_COLOR_RGB(0xef, 0xf2, 0xfa); | 41 const GdkColor kHoveredBackgroundColor = GDK_COLOR_RGB(0xef, 0xf2, 0xfa); |
| 42 | 42 |
| 43 const GdkColor kContentTextColor = GDK_COLOR_RGB(0x00, 0x00, 0x00); | 43 const GdkColor kContentTextColor = GDK_COLOR_RGB(0x00, 0x00, 0x00); |
| 44 const GdkColor kURLTextColor = GDK_COLOR_RGB(0x00, 0x88, 0x00); | 44 const GdkColor kURLTextColor = GDK_COLOR_RGB(0x00, 0x88, 0x00); |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 (text_width - actual_content_width - | 666 (text_width - actual_content_width - |
| 667 (actual_description_width / PANGO_SCALE)), | 667 (actual_description_width / PANGO_SCALE)), |
| 668 content_y, layout_); | 668 content_y, layout_); |
| 669 } | 669 } |
| 670 } | 670 } |
| 671 | 671 |
| 672 g_object_unref(gc); | 672 g_object_unref(gc); |
| 673 | 673 |
| 674 return TRUE; | 674 return TRUE; |
| 675 } | 675 } |
| OLD | NEW |