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

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 to head 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 IDR_OMNIBOX_HTTP, 107 IDR_OMNIBOX_HTTP,
108 IDR_OMNIBOX_HTTP_DARK, 108 IDR_OMNIBOX_HTTP_DARK,
109 IDR_OMNIBOX_SEARCH, 109 IDR_OMNIBOX_SEARCH,
110 IDR_OMNIBOX_SEARCH_DARK, 110 IDR_OMNIBOX_SEARCH_DARK,
111 IDR_OMNIBOX_STAR, 111 IDR_OMNIBOX_STAR,
112 IDR_OMNIBOX_STAR_DARK, 112 IDR_OMNIBOX_STAR_DARK,
113 IDR_OMNIBOX_TTS, 113 IDR_OMNIBOX_TTS,
114 IDR_OMNIBOX_TTS_DARK, 114 IDR_OMNIBOX_TTS_DARK,
115 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON, 115 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON,
116 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON, 116 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON,
117 IDR_REGISTER_PROTOCOL_HANDLER_LOCATIONBAR_ICON,
117 }; 118 };
118 119
119 bool IsOverridableImage(int id) { 120 bool IsOverridableImage(int id) {
120 CR_DEFINE_STATIC_LOCAL(std::set<int>, images, ()); 121 CR_DEFINE_STATIC_LOCAL(std::set<int>, images, ());
121 if (images.empty()) { 122 if (images.empty()) {
122 images.insert(kThemeImages, kThemeImages + arraysize(kThemeImages)); 123 images.insert(kThemeImages, kThemeImages + arraysize(kThemeImages));
123 images.insert(kAutocompleteImages, 124 images.insert(kAutocompleteImages,
124 kAutocompleteImages + arraysize(kAutocompleteImages)); 125 kAutocompleteImages + arraysize(kAutocompleteImages));
125 126
126 const std::set<int>& buttons = ThemeService::GetTintableToolbarButtons(); 127 const std::set<int>& buttons = ThemeService::GetTintableToolbarButtons();
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and 972 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and
972 // instead should tint based on the foreground text entry color in GTK+ 973 // instead should tint based on the foreground text entry color in GTK+
973 // mode because some themes that try to be dark *and* light have very 974 // mode because some themes that try to be dark *and* light have very
974 // different colors between the omnibox and the normal background area. 975 // different colors between the omnibox and the normal background area.
975 case IDR_OMNIBOX_EXTENSION_APP: 976 case IDR_OMNIBOX_EXTENSION_APP:
976 case IDR_OMNIBOX_HTTP: 977 case IDR_OMNIBOX_HTTP:
977 case IDR_OMNIBOX_SEARCH: 978 case IDR_OMNIBOX_SEARCH:
978 case IDR_OMNIBOX_STAR: 979 case IDR_OMNIBOX_STAR:
979 case IDR_OMNIBOX_TTS: 980 case IDR_OMNIBOX_TTS:
980 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON: 981 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON:
981 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON: { 982 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON:
983 case IDR_REGISTER_PROTOCOL_HANDLER_LOCATIONBAR_ICON: {
982 return GenerateTintedIcon(id, entry_tint_); 984 return GenerateTintedIcon(id, entry_tint_);
983 } 985 }
984 // In GTK mode, the dark versions of the omnibox icons only ever appear in 986 // In GTK mode, the dark versions of the omnibox icons only ever appear in
985 // the autocomplete popup and only against the current theme's GtkEntry 987 // the autocomplete popup and only against the current theme's GtkEntry
986 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide 988 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide
987 // with the selected color. 989 // with the selected color.
988 case IDR_OMNIBOX_EXTENSION_APP_DARK: 990 case IDR_OMNIBOX_EXTENSION_APP_DARK:
989 case IDR_OMNIBOX_HTTP_DARK: 991 case IDR_OMNIBOX_HTTP_DARK:
990 case IDR_OMNIBOX_SEARCH_DARK: 992 case IDR_OMNIBOX_SEARCH_DARK:
991 case IDR_OMNIBOX_STAR_DARK: 993 case IDR_OMNIBOX_STAR_DARK:
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 cairo_new_path(cr); 1148 cairo_new_path(cr);
1147 cairo_set_line_width(cr, 1.0); 1149 cairo_set_line_width(cr, 1.0);
1148 cairo_move_to(cr, start_x, allocation.y); 1150 cairo_move_to(cr, start_x, allocation.y);
1149 cairo_line_to(cr, start_x, allocation.y + allocation.height); 1151 cairo_line_to(cr, start_x, allocation.y + allocation.height);
1150 cairo_stroke(cr); 1152 cairo_stroke(cr);
1151 cairo_destroy(cr); 1153 cairo_destroy(cr);
1152 cairo_pattern_destroy(pattern); 1154 cairo_pattern_destroy(pattern);
1153 1155
1154 return TRUE; 1156 return TRUE;
1155 } 1157 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698