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

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

Issue 10782038: Revert 147045 - Bring up a content settings icon for ungestured registerProtocolHandler call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 IDR_OMNIBOX_HTTP, 105 IDR_OMNIBOX_HTTP,
106 IDR_OMNIBOX_HTTP_DARK, 106 IDR_OMNIBOX_HTTP_DARK,
107 IDR_OMNIBOX_SEARCH, 107 IDR_OMNIBOX_SEARCH,
108 IDR_OMNIBOX_SEARCH_DARK, 108 IDR_OMNIBOX_SEARCH_DARK,
109 IDR_OMNIBOX_STAR, 109 IDR_OMNIBOX_STAR,
110 IDR_OMNIBOX_STAR_DARK, 110 IDR_OMNIBOX_STAR_DARK,
111 IDR_OMNIBOX_TTS, 111 IDR_OMNIBOX_TTS,
112 IDR_OMNIBOX_TTS_DARK, 112 IDR_OMNIBOX_TTS_DARK,
113 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON, 113 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON,
114 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON, 114 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON,
115 IDR_REGISTER_PROTOCOL_HANDLER_LOCATIONBAR_ICON,
116 }; 115 };
117 116
118 bool IsOverridableImage(int id) { 117 bool IsOverridableImage(int id) {
119 CR_DEFINE_STATIC_LOCAL(std::set<int>, images, ()); 118 CR_DEFINE_STATIC_LOCAL(std::set<int>, images, ());
120 if (images.empty()) { 119 if (images.empty()) {
121 images.insert(kThemeImages, kThemeImages + arraysize(kThemeImages)); 120 images.insert(kThemeImages, kThemeImages + arraysize(kThemeImages));
122 images.insert(kAutocompleteImages, 121 images.insert(kAutocompleteImages,
123 kAutocompleteImages + arraysize(kAutocompleteImages)); 122 kAutocompleteImages + arraysize(kAutocompleteImages));
124 123
125 const std::set<int>& buttons = ThemeService::GetTintableToolbarButtons(); 124 const std::set<int>& buttons = ThemeService::GetTintableToolbarButtons();
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and 969 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and
971 // instead should tint based on the foreground text entry color in GTK+ 970 // instead should tint based on the foreground text entry color in GTK+
972 // mode because some themes that try to be dark *and* light have very 971 // mode because some themes that try to be dark *and* light have very
973 // different colors between the omnibox and the normal background area. 972 // different colors between the omnibox and the normal background area.
974 case IDR_OMNIBOX_EXTENSION_APP: 973 case IDR_OMNIBOX_EXTENSION_APP:
975 case IDR_OMNIBOX_HTTP: 974 case IDR_OMNIBOX_HTTP:
976 case IDR_OMNIBOX_SEARCH: 975 case IDR_OMNIBOX_SEARCH:
977 case IDR_OMNIBOX_STAR: 976 case IDR_OMNIBOX_STAR:
978 case IDR_OMNIBOX_TTS: 977 case IDR_OMNIBOX_TTS:
979 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON: 978 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON:
980 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON: 979 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON: {
981 case IDR_REGISTER_PROTOCOL_HANDLER_LOCATIONBAR_ICON: {
982 return GenerateTintedIcon(id, entry_tint_); 980 return GenerateTintedIcon(id, entry_tint_);
983 } 981 }
984 // In GTK mode, the dark versions of the omnibox icons only ever appear in 982 // 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 983 // 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 984 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide
987 // with the selected color. 985 // with the selected color.
988 case IDR_OMNIBOX_EXTENSION_APP_DARK: 986 case IDR_OMNIBOX_EXTENSION_APP_DARK:
989 case IDR_OMNIBOX_HTTP_DARK: 987 case IDR_OMNIBOX_HTTP_DARK:
990 case IDR_OMNIBOX_SEARCH_DARK: 988 case IDR_OMNIBOX_SEARCH_DARK:
991 case IDR_OMNIBOX_STAR_DARK: 989 case IDR_OMNIBOX_STAR_DARK:
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 cairo_new_path(cr); 1144 cairo_new_path(cr);
1147 cairo_set_line_width(cr, 1.0); 1145 cairo_set_line_width(cr, 1.0);
1148 cairo_move_to(cr, start_x, allocation.y); 1146 cairo_move_to(cr, start_x, allocation.y);
1149 cairo_line_to(cr, start_x, allocation.y + allocation.height); 1147 cairo_line_to(cr, start_x, allocation.y + allocation.height);
1150 cairo_stroke(cr); 1148 cairo_stroke(cr);
1151 cairo_destroy(cr); 1149 cairo_destroy(cr);
1152 cairo_pattern_destroy(pattern); 1150 cairo_pattern_destroy(pattern);
1153 1151
1154 return TRUE; 1152 return TRUE;
1155 } 1153 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_image_model_unittest.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698