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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_ui.cc

Issue 10828002: (Views only) Replace the content settings icons on the Website Settings UI with the new icons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on tot. 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
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/website_settings/website_settings_ui.h" 5 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
6 6
7 #include "grit/generated_resources.h" 7 #include "grit/generated_resources.h"
8 #include "grit/theme_resources.h" 8 #include "grit/theme_resources.h"
9 #include "grit/ui_resources.h" 9 #include "grit/ui_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 // static 125 // static
126 const gfx::Image& WebsiteSettingsUI::GetPermissionIcon( 126 const gfx::Image& WebsiteSettingsUI::GetPermissionIcon(
127 ContentSettingsType type, 127 ContentSettingsType type,
128 ContentSetting setting) { 128 ContentSetting setting) {
129 bool use_blocked = (setting == CONTENT_SETTING_BLOCK); 129 bool use_blocked = (setting == CONTENT_SETTING_BLOCK);
130 int resource_id = IDR_INFO; 130 int resource_id = IDR_INFO;
131 switch (type) { 131 switch (type) {
132 case CONTENT_SETTINGS_TYPE_IMAGES: 132 case CONTENT_SETTINGS_TYPE_IMAGES:
133 resource_id = use_blocked ? IDR_BLOCKED_IMAGES 133 resource_id = use_blocked ? IDR_BLOCKED_IMAGES
134 : IDR_INFO; 134 : IDR_ALLOWED_IMAGES;
135 break; 135 break;
136 case CONTENT_SETTINGS_TYPE_JAVASCRIPT: 136 case CONTENT_SETTINGS_TYPE_JAVASCRIPT:
137 resource_id = use_blocked ? IDR_BLOCKED_JAVASCRIPT 137 resource_id = use_blocked ? IDR_BLOCKED_JAVASCRIPT
138 : IDR_INFO; 138 : IDR_ALLOWED_JAVASCRIPT;
139 break; 139 break;
140 case CONTENT_SETTINGS_TYPE_COOKIES: 140 case CONTENT_SETTINGS_TYPE_COOKIES:
141 resource_id = use_blocked ? IDR_BLOCKED_COOKIES 141 resource_id = use_blocked ? IDR_BLOCKED_COOKIES
142 : IDR_COOKIE_ICON; 142 : IDR_COOKIE_ICON;
143 break; 143 break;
144 case CONTENT_SETTINGS_TYPE_POPUPS: 144 case CONTENT_SETTINGS_TYPE_POPUPS:
145 resource_id = use_blocked ? IDR_BLOCKED_POPUPS 145 resource_id = use_blocked ? IDR_BLOCKED_POPUPS
146 : IDR_INFO; 146 : IDR_ALLOWED_POPUPS;
147 break; 147 break;
148 case CONTENT_SETTINGS_TYPE_PLUGINS: 148 case CONTENT_SETTINGS_TYPE_PLUGINS:
149 resource_id = use_blocked ? IDR_BLOCKED_PLUGINS 149 resource_id = use_blocked ? IDR_BLOCKED_PLUGINS
150 : IDR_EXTENSIONS_FAVICON; 150 : IDR_ALLOWED_PLUGINS;
151 break; 151 break;
152 case CONTENT_SETTINGS_TYPE_GEOLOCATION: 152 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
153 resource_id = use_blocked ? IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON 153 resource_id = use_blocked ? IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON
154 : IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON; 154 : IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON;
155 break; 155 break;
156 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 156 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
157 resource_id = use_blocked ? IDR_BLOCKED_NOTIFICATION
158 : IDR_ALLOWED_NOTIFICATION;
159 break;
157 case CONTENT_SETTINGS_TYPE_FULLSCREEN: 160 case CONTENT_SETTINGS_TYPE_FULLSCREEN:
161 resource_id = IDR_ALLOWED_FULLSCREEN;
162 break;
158 case CONTENT_SETTINGS_TYPE_MOUSELOCK: 163 case CONTENT_SETTINGS_TYPE_MOUSELOCK:
164 resource_id = use_blocked ? IDR_BLOCKED_MOUSE_CURSOR
165 : IDR_ALLOWED_MOUSE_CURSOR;
166 break;
159 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: 167 case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
160 resource_id = IDR_INFO; 168 resource_id = use_blocked ? IDR_BLOCKED_MEDIA
169 : IDR_ASK_MEDIA;
161 break; 170 break;
162 default: 171 default:
163 NOTREACHED(); 172 NOTREACHED();
164 break; 173 break;
165 } 174 }
166 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 175 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
167 return rb.GetNativeImageNamed(resource_id); 176 return rb.GetNativeImageNamed(resource_id);
168 } 177 }
169 178
170 // static 179 // static
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 233 }
225 234
226 // static 235 // static
227 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon( 236 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon(
228 const string16& first_visit) { 237 const string16& first_visit) {
229 // FIXME(markusheintz): Display a minor warning icon if the page is visited 238 // FIXME(markusheintz): Display a minor warning icon if the page is visited
230 // the first time. 239 // the first time.
231 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 240 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
232 return rb.GetNativeImageNamed(IDR_PAGEINFO_INFO); 241 return rb.GetNativeImageNamed(IDR_PAGEINFO_INFO);
233 } 242 }
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698