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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc

Issue 200009: Use system themes where possible in Omnibox, dropdown, and security info bubb... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (revision 25340)
+++ chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (working copy)
@@ -20,7 +20,6 @@
#include "chrome/browser/autocomplete/autocomplete_popup_view_gtk.h"
#include "chrome/browser/command_updater.h"
#include "chrome/browser/defaults.h"
-#include "chrome/browser/gtk/location_bar_view_gtk.h"
#include "chrome/browser/gtk/view_id_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/toolbar_model.h"
@@ -29,8 +28,12 @@
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
-#if !defined(TOOLKIT_VIEWS)
+#if defined(TOOLKIT_VIEWS)
+#include "chrome/browser/views/location_bar_view.h"
+#include "skia/ext/skia_utils_gtk.h"
+#else
#include "chrome/browser/gtk/gtk_theme_provider.h"
+#include "chrome/browser/gtk/location_bar_view_gtk.h"
#endif
namespace {
@@ -509,7 +512,8 @@
// If we're on a secure connection, ignore what the theme wants us to do
// and use a yellow background.
- if (use_gtk && scheme_security_level_ != ToolbarModel::SECURE) {
+ bool is_secure = (scheme_security_level_ == ToolbarModel::SECURE);
+ if (use_gtk && !is_secure) {
gtk_widget_modify_base(text_view_, GTK_STATE_NORMAL, NULL);
// Grab the text colors out of the style and set our tags to use them.
@@ -525,8 +529,15 @@
g_object_set(G_OBJECT(normal_text_tag_), "foreground-gdk",
&style->text[GTK_STATE_NORMAL], NULL);
} else {
+#if defined(TOOLKIT_VIEWS)
+ const GdkColor background_color = skia::SkColorToGdkColor(
+ LocationBarView::GetColor(is_secure, LocationBarView::BACKGROUND));
gtk_widget_modify_base(text_view_, GTK_STATE_NORMAL,
+ &background_color);
+#else
+ gtk_widget_modify_base(text_view_, GTK_STATE_NORMAL,
&LocationBarViewGtk::kBackgroundColorByLevel[scheme_security_level_]);
+#endif
g_object_set(G_OBJECT(faded_text_tag_), "foreground", kTextBaseColor, NULL);
g_object_set(G_OBJECT(normal_text_tag_), "foreground", "#000000", NULL);
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698