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

Side by Side Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 10584042: Bring up a content settings icon for ungestured registerProtocolHandler call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Repair merge Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gtk_theme_service.h" 5 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 IDR_OMNIBOX_HTTP, 106 IDR_OMNIBOX_HTTP,
107 IDR_OMNIBOX_HTTP_DARK, 107 IDR_OMNIBOX_HTTP_DARK,
108 IDR_OMNIBOX_SEARCH, 108 IDR_OMNIBOX_SEARCH,
109 IDR_OMNIBOX_SEARCH_DARK, 109 IDR_OMNIBOX_SEARCH_DARK,
110 IDR_OMNIBOX_STAR, 110 IDR_OMNIBOX_STAR,
111 IDR_OMNIBOX_STAR_DARK, 111 IDR_OMNIBOX_STAR_DARK,
112 IDR_OMNIBOX_TTS, 112 IDR_OMNIBOX_TTS,
113 IDR_OMNIBOX_TTS_DARK, 113 IDR_OMNIBOX_TTS_DARK,
114 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON, 114 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON,
115 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON, 115 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON,
116 IDR_REGISTER_PROTOCOL_HANDLER_LOCATIONBAR_ICON,
116 }; 117 };
117 118
118 bool IsOverridableImage(int id) { 119 bool IsOverridableImage(int id) {
119 CR_DEFINE_STATIC_LOCAL(std::set<int>, images, ()); 120 CR_DEFINE_STATIC_LOCAL(std::set<int>, images, ());
120 if (images.empty()) { 121 if (images.empty()) {
121 images.insert(kThemeImages, kThemeImages + arraysize(kThemeImages)); 122 images.insert(kThemeImages, kThemeImages + arraysize(kThemeImages));
122 images.insert(kAutocompleteImages, 123 images.insert(kAutocompleteImages,
123 kAutocompleteImages + arraysize(kAutocompleteImages)); 124 kAutocompleteImages + arraysize(kAutocompleteImages));
124 125
125 const std::set<int>& buttons = ThemeService::GetTintableToolbarButtons(); 126 const std::set<int>& buttons = ThemeService::GetTintableToolbarButtons();
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and 975 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and
975 // instead should tint based on the foreground text entry color in GTK+ 976 // instead should tint based on the foreground text entry color in GTK+
976 // mode because some themes that try to be dark *and* light have very 977 // mode because some themes that try to be dark *and* light have very
977 // different colors between the omnibox and the normal background area. 978 // different colors between the omnibox and the normal background area.
978 case IDR_OMNIBOX_EXTENSION_APP: 979 case IDR_OMNIBOX_EXTENSION_APP:
979 case IDR_OMNIBOX_HTTP: 980 case IDR_OMNIBOX_HTTP:
980 case IDR_OMNIBOX_SEARCH: 981 case IDR_OMNIBOX_SEARCH:
981 case IDR_OMNIBOX_STAR: 982 case IDR_OMNIBOX_STAR:
982 case IDR_OMNIBOX_TTS: 983 case IDR_OMNIBOX_TTS:
983 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON: 984 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON:
984 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON: { 985 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON:
986 case IDR_REGISTER_PROTOCOL_HANDLER_LOCATIONBAR_ICON: {
985 return GenerateTintedIcon(id, entry_tint_); 987 return GenerateTintedIcon(id, entry_tint_);
986 } 988 }
987 // In GTK mode, the dark versions of the omnibox icons only ever appear in 989 // In GTK mode, the dark versions of the omnibox icons only ever appear in
988 // the autocomplete popup and only against the current theme's GtkEntry 990 // the autocomplete popup and only against the current theme's GtkEntry
989 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide 991 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide
990 // with the selected color. 992 // with the selected color.
991 case IDR_OMNIBOX_EXTENSION_APP_DARK: 993 case IDR_OMNIBOX_EXTENSION_APP_DARK:
992 case IDR_OMNIBOX_HTTP_DARK: 994 case IDR_OMNIBOX_HTTP_DARK:
993 case IDR_OMNIBOX_SEARCH_DARK: 995 case IDR_OMNIBOX_SEARCH_DARK:
994 case IDR_OMNIBOX_STAR_DARK: 996 case IDR_OMNIBOX_STAR_DARK:
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 cairo_new_path(cr); 1151 cairo_new_path(cr);
1150 cairo_set_line_width(cr, 1.0); 1152 cairo_set_line_width(cr, 1.0);
1151 cairo_move_to(cr, start_x, allocation.y); 1153 cairo_move_to(cr, start_x, allocation.y);
1152 cairo_line_to(cr, start_x, allocation.y + allocation.height); 1154 cairo_line_to(cr, start_x, allocation.y + allocation.height);
1153 cairo_stroke(cr); 1155 cairo_stroke(cr);
1154 cairo_destroy(cr); 1156 cairo_destroy(cr);
1155 cairo_pattern_destroy(pattern); 1157 cairo_pattern_destroy(pattern);
1156 1158
1157 return TRUE; 1159 return TRUE;
1158 } 1160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698