OLD | NEW |
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 "chrome/grit/chromium_strings.h" | 7 #include "chrome/grit/chromium_strings.h" |
8 #include "chrome/grit/generated_resources.h" | 8 #include "chrome/grit/generated_resources.h" |
9 #include "grit/theme_resources.h" | 9 #include "grit/theme_resources.h" |
10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // static | 162 // static |
163 base::string16 WebsiteSettingsUI::PermissionActionToUIString( | 163 base::string16 WebsiteSettingsUI::PermissionActionToUIString( |
164 ContentSettingsType type, | 164 ContentSettingsType type, |
165 ContentSetting setting, | 165 ContentSetting setting, |
166 ContentSetting default_setting, | 166 ContentSetting default_setting, |
167 content_settings::SettingSource source) { | 167 content_settings::SettingSource source) { |
168 ContentSetting effective_setting = setting; | 168 ContentSetting effective_setting = setting; |
169 if (effective_setting == CONTENT_SETTING_DEFAULT) { | 169 if (effective_setting == CONTENT_SETTING_DEFAULT) { |
170 effective_setting = default_setting; | 170 effective_setting = default_setting; |
171 | 171 |
172 // For Plugins, ASK is obsolete. Show as DETECT to reflect actual behavior. | 172 // For Plugins, ASK is obsolete. Show as BLOCK to reflect actual behavior. |
173 if (type == CONTENT_SETTINGS_TYPE_PLUGINS && | 173 if (type == CONTENT_SETTINGS_TYPE_PLUGINS && |
174 default_setting == CONTENT_SETTING_ASK) { | 174 default_setting == CONTENT_SETTING_ASK) { |
175 effective_setting = CONTENT_SETTING_DETECT_IMPORTANT_CONTENT; | 175 effective_setting = CONTENT_SETTING_BLOCK; |
176 } | 176 } |
177 } | 177 } |
178 | 178 |
179 const int* button_text_ids = NULL; | 179 const int* button_text_ids = NULL; |
180 switch (source) { | 180 switch (source) { |
181 case content_settings::SETTING_SOURCE_USER: | 181 case content_settings::SETTING_SOURCE_USER: |
182 if (setting == CONTENT_SETTING_DEFAULT) | 182 if (setting == CONTENT_SETTING_DEFAULT) |
183 button_text_ids = kPermissionButtonTextIDDefaultSetting; | 183 button_text_ids = kPermissionButtonTextIDDefaultSetting; |
184 else | 184 else |
185 button_text_ids = kPermissionButtonTextIDUserManaged; | 185 button_text_ids = kPermissionButtonTextIDUserManaged; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 // the first time. | 349 // the first time. |
350 return IDR_PAGEINFO_INFO; | 350 return IDR_PAGEINFO_INFO; |
351 } | 351 } |
352 | 352 |
353 // static | 353 // static |
354 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon( | 354 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon( |
355 const base::string16& first_visit) { | 355 const base::string16& first_visit) { |
356 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 356 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
357 return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit)); | 357 return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit)); |
358 } | 358 } |
OLD | NEW |