| 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/webui/options/content_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 { "askException", IDS_EXCEPTIONS_ASK_BUTTON }, | 287 { "askException", IDS_EXCEPTIONS_ASK_BUTTON }, |
| 288 { "otr_exceptions_explanation", IDS_EXCEPTIONS_OTR_LABEL }, | 288 { "otr_exceptions_explanation", IDS_EXCEPTIONS_OTR_LABEL }, |
| 289 { "addNewExceptionInstructions", IDS_EXCEPTIONS_ADD_NEW_INSTRUCTIONS }, | 289 { "addNewExceptionInstructions", IDS_EXCEPTIONS_ADD_NEW_INSTRUCTIONS }, |
| 290 { "manageExceptions", IDS_EXCEPTIONS_MANAGE }, | 290 { "manageExceptions", IDS_EXCEPTIONS_MANAGE }, |
| 291 { "manage_handlers", IDS_HANDLERS_MANAGE }, | 291 { "manage_handlers", IDS_HANDLERS_MANAGE }, |
| 292 { "exceptionPatternHeader", IDS_EXCEPTIONS_PATTERN_HEADER }, | 292 { "exceptionPatternHeader", IDS_EXCEPTIONS_PATTERN_HEADER }, |
| 293 { "exceptionBehaviorHeader", IDS_EXCEPTIONS_ACTION_HEADER }, | 293 { "exceptionBehaviorHeader", IDS_EXCEPTIONS_ACTION_HEADER }, |
| 294 { "exceptionZoomHeader", IDS_EXCEPTIONS_ZOOM_HEADER }, | 294 { "exceptionZoomHeader", IDS_EXCEPTIONS_ZOOM_HEADER }, |
| 295 { "embeddedOnHost", IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ON_HOST }, | 295 { "embeddedOnHost", IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ON_HOST }, |
| 296 // Cookies filter. | 296 // Cookies filter. |
| 297 { "cookies_tab_label", IDS_COOKIES_TAB_LABEL }, | 297 { "cookiesTabLabel", IDS_COOKIES_TAB_LABEL }, |
| 298 { "cookies_header", IDS_COOKIES_HEADER }, | 298 { "cookies_header", IDS_COOKIES_HEADER }, |
| 299 { "cookiesAllow", IDS_COOKIES_ALLOW_RADIO }, | 299 { "cookiesAllow", IDS_COOKIES_ALLOW_RADIO }, |
| 300 { "cookiesBlock", IDS_COOKIES_BLOCK_RADIO }, | 300 { "cookiesBlock", IDS_COOKIES_BLOCK_RADIO }, |
| 301 { "cookies_session_only", IDS_COOKIES_SESSION_ONLY_RADIO }, | 301 { "cookies_session_only", IDS_COOKIES_SESSION_ONLY_RADIO }, |
| 302 { "cookies_block_3rd_party", IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX }, | 302 { "cookies_block_3rd_party", IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX }, |
| 303 { "cookies_clear_when_close", IDS_COOKIES_CLEAR_WHEN_CLOSE_CHKBOX }, | 303 { "cookies_clear_when_close", IDS_COOKIES_CLEAR_WHEN_CLOSE_CHKBOX }, |
| 304 { "cookies_lso_clear_when_close", IDS_COOKIES_LSO_CLEAR_WHEN_CLOSE_CHKBOX }, | 304 { "cookies_lso_clear_when_close", IDS_COOKIES_LSO_CLEAR_WHEN_CLOSE_CHKBOX }, |
| 305 { "cookies_show_cookies", IDS_COOKIES_SHOW_COOKIES_BUTTON }, | 305 { "cookies_show_cookies", IDS_COOKIES_SHOW_COOKIES_BUTTON }, |
| 306 { "flash_storage_settings", IDS_FLASH_STORAGE_SETTINGS }, | 306 { "flash_storage_settings", IDS_FLASH_STORAGE_SETTINGS }, |
| 307 { "flash_storage_url", IDS_FLASH_STORAGE_URL }, | 307 { "flash_storage_url", IDS_FLASH_STORAGE_URL }, |
| 308 #if defined(ENABLE_GOOGLE_NOW) | 308 #if defined(ENABLE_GOOGLE_NOW) |
| 309 { "googleGeolocationAccessEnable", | 309 { "googleGeolocationAccessEnable", |
| 310 IDS_GEOLOCATION_GOOGLE_ACCESS_ENABLE_CHKBOX }, | 310 IDS_GEOLOCATION_GOOGLE_ACCESS_ENABLE_CHKBOX }, |
| 311 #endif | 311 #endif |
| 312 // Image filter. | 312 // Image filter. |
| 313 { "images_tab_label", IDS_IMAGES_TAB_LABEL }, | 313 { "imagesTabLabel", IDS_IMAGES_TAB_LABEL }, |
| 314 { "images_header", IDS_IMAGES_HEADER }, | 314 { "images_header", IDS_IMAGES_HEADER }, |
| 315 { "imagesAllow", IDS_IMAGES_LOAD_RADIO }, | 315 { "imagesAllow", IDS_IMAGES_LOAD_RADIO }, |
| 316 { "imagesBlock", IDS_IMAGES_NOLOAD_RADIO }, | 316 { "imagesBlock", IDS_IMAGES_NOLOAD_RADIO }, |
| 317 // JavaScript filter. | 317 // JavaScript filter. |
| 318 { "javascript_tab_label", IDS_JAVASCRIPT_TAB_LABEL }, | 318 { "javascriptTabLabel", IDS_JAVASCRIPT_TAB_LABEL }, |
| 319 { "javascript_header", IDS_JAVASCRIPT_HEADER }, | 319 { "javascript_header", IDS_JAVASCRIPT_HEADER }, |
| 320 { "javascriptAllow", IDS_JS_ALLOW_RADIO }, | 320 { "javascriptAllow", IDS_JS_ALLOW_RADIO }, |
| 321 { "javascriptBlock", IDS_JS_DONOTALLOW_RADIO }, | 321 { "javascriptBlock", IDS_JS_DONOTALLOW_RADIO }, |
| 322 // Plug-ins filter. | 322 // Plug-ins filter. |
| 323 { "plugins_tab_label", IDS_PLUGIN_TAB_LABEL }, | 323 { "pluginsTabLabel", IDS_PLUGIN_TAB_LABEL }, |
| 324 { "plugins_header", IDS_PLUGIN_HEADER }, | 324 { "plugins_header", IDS_PLUGIN_HEADER }, |
| 325 { "pluginsAsk", IDS_PLUGIN_ASK_RADIO }, | 325 { "pluginsAsk", IDS_PLUGIN_ASK_RADIO }, |
| 326 { "pluginsAllow", IDS_PLUGIN_LOAD_RADIO }, | 326 { "pluginsAllow", IDS_PLUGIN_LOAD_RADIO }, |
| 327 { "pluginsBlock", IDS_PLUGIN_NOLOAD_RADIO }, | 327 { "pluginsBlock", IDS_PLUGIN_NOLOAD_RADIO }, |
| 328 { "disableIndividualPlugins", IDS_PLUGIN_SELECTIVE_DISABLE }, | 328 { "disableIndividualPlugins", IDS_PLUGIN_SELECTIVE_DISABLE }, |
| 329 // Pop-ups filter. | 329 // Pop-ups filter. |
| 330 { "popups_tab_label", IDS_POPUP_TAB_LABEL }, | 330 { "popupsTabLabel", IDS_POPUP_TAB_LABEL }, |
| 331 { "popups_header", IDS_POPUP_HEADER }, | 331 { "popups_header", IDS_POPUP_HEADER }, |
| 332 { "popupsAllow", IDS_POPUP_ALLOW_RADIO }, | 332 { "popupsAllow", IDS_POPUP_ALLOW_RADIO }, |
| 333 { "popupsBlock", IDS_POPUP_BLOCK_RADIO }, | 333 { "popupsBlock", IDS_POPUP_BLOCK_RADIO }, |
| 334 // Location filter. | 334 // Location filter. |
| 335 { "location_tab_label", IDS_GEOLOCATION_TAB_LABEL }, | 335 { "locationTabLabel", IDS_GEOLOCATION_TAB_LABEL }, |
| 336 { "location_header", IDS_GEOLOCATION_HEADER }, | 336 { "location_header", IDS_GEOLOCATION_HEADER }, |
| 337 { "locationAllow", IDS_GEOLOCATION_ALLOW_RADIO }, | 337 { "locationAllow", IDS_GEOLOCATION_ALLOW_RADIO }, |
| 338 { "locationAsk", IDS_GEOLOCATION_ASK_RADIO }, | 338 { "locationAsk", IDS_GEOLOCATION_ASK_RADIO }, |
| 339 { "locationBlock", IDS_GEOLOCATION_BLOCK_RADIO }, | 339 { "locationBlock", IDS_GEOLOCATION_BLOCK_RADIO }, |
| 340 { "set_by", IDS_GEOLOCATION_SET_BY_HOVER }, | 340 { "set_by", IDS_GEOLOCATION_SET_BY_HOVER }, |
| 341 // Notifications filter. | 341 // Notifications filter. |
| 342 { "notifications_tab_label", IDS_NOTIFICATIONS_TAB_LABEL }, | 342 { "notificationsTabLabel", IDS_NOTIFICATIONS_TAB_LABEL }, |
| 343 { "notifications_header", IDS_NOTIFICATIONS_HEADER }, | 343 { "notifications_header", IDS_NOTIFICATIONS_HEADER }, |
| 344 { "notificationsAllow", IDS_NOTIFICATIONS_ALLOW_RADIO }, | 344 { "notificationsAllow", IDS_NOTIFICATIONS_ALLOW_RADIO }, |
| 345 { "notificationsAsk", IDS_NOTIFICATIONS_ASK_RADIO }, | 345 { "notificationsAsk", IDS_NOTIFICATIONS_ASK_RADIO }, |
| 346 { "notificationsBlock", IDS_NOTIFICATIONS_BLOCK_RADIO }, | 346 { "notificationsBlock", IDS_NOTIFICATIONS_BLOCK_RADIO }, |
| 347 // Fullscreen filter. | 347 // Fullscreen filter. |
| 348 { "fullscreen_tab_label", IDS_FULLSCREEN_TAB_LABEL }, | 348 { "fullscreenTabLabel", IDS_FULLSCREEN_TAB_LABEL }, |
| 349 { "fullscreen_header", IDS_FULLSCREEN_HEADER }, | 349 { "fullscreen_header", IDS_FULLSCREEN_HEADER }, |
| 350 // Mouse Lock filter. | 350 // Mouse Lock filter. |
| 351 { "mouselock_tab_label", IDS_MOUSE_LOCK_TAB_LABEL }, | 351 { "mouselockTabLabel", IDS_MOUSE_LOCK_TAB_LABEL }, |
| 352 { "mouselock_header", IDS_MOUSE_LOCK_HEADER }, | 352 { "mouselock_header", IDS_MOUSE_LOCK_HEADER }, |
| 353 { "mouselockAllow", IDS_MOUSE_LOCK_ALLOW_RADIO }, | 353 { "mouselockAllow", IDS_MOUSE_LOCK_ALLOW_RADIO }, |
| 354 { "mouselockAsk", IDS_MOUSE_LOCK_ASK_RADIO }, | 354 { "mouselockAsk", IDS_MOUSE_LOCK_ASK_RADIO }, |
| 355 { "mouselockBlock", IDS_MOUSE_LOCK_BLOCK_RADIO }, | 355 { "mouselockBlock", IDS_MOUSE_LOCK_BLOCK_RADIO }, |
| 356 #if defined(OS_CHROMEOS) || defined(OS_WIN) | 356 #if defined(OS_CHROMEOS) || defined(OS_WIN) |
| 357 // Protected Content filter | 357 // Protected Content filter |
| 358 { "protectedContentTabLabel", IDS_PROTECTED_CONTENT_TAB_LABEL }, | 358 { "protectedContentTabLabel", IDS_PROTECTED_CONTENT_TAB_LABEL }, |
| 359 { "protectedContentInfo", IDS_PROTECTED_CONTENT_INFO }, | 359 { "protectedContentInfo", IDS_PROTECTED_CONTENT_INFO }, |
| 360 { "protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE }, | 360 { "protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE }, |
| 361 { "protectedContent_header", IDS_PROTECTED_CONTENT_HEADER }, | 361 { "protectedContent_header", IDS_PROTECTED_CONTENT_HEADER }, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 380 { "mediaPepperFlashChangeLink", IDS_MEDIA_PEPPER_FLASH_CHANGE_LINK }, | 380 { "mediaPepperFlashChangeLink", IDS_MEDIA_PEPPER_FLASH_CHANGE_LINK }, |
| 381 { "mediaPepperFlashGlobalPrivacyURL", IDS_FLASH_GLOBAL_PRIVACY_URL }, | 381 { "mediaPepperFlashGlobalPrivacyURL", IDS_FLASH_GLOBAL_PRIVACY_URL }, |
| 382 { "mediaPepperFlashWebsitePrivacyURL", IDS_FLASH_WEBSITE_PRIVACY_URL }, | 382 { "mediaPepperFlashWebsitePrivacyURL", IDS_FLASH_WEBSITE_PRIVACY_URL }, |
| 383 // PPAPI broker filter. | 383 // PPAPI broker filter. |
| 384 { "ppapi-broker_header", IDS_PPAPI_BROKER_HEADER }, | 384 { "ppapi-broker_header", IDS_PPAPI_BROKER_HEADER }, |
| 385 { "ppapiBrokerTabLabel", IDS_PPAPI_BROKER_TAB_LABEL }, | 385 { "ppapiBrokerTabLabel", IDS_PPAPI_BROKER_TAB_LABEL }, |
| 386 { "ppapiBrokerAllow", IDS_PPAPI_BROKER_ALLOW_RADIO }, | 386 { "ppapiBrokerAllow", IDS_PPAPI_BROKER_ALLOW_RADIO }, |
| 387 { "ppapiBrokerAsk", IDS_PPAPI_BROKER_ASK_RADIO }, | 387 { "ppapiBrokerAsk", IDS_PPAPI_BROKER_ASK_RADIO }, |
| 388 { "ppapiBrokerBlock", IDS_PPAPI_BROKER_BLOCK_RADIO }, | 388 { "ppapiBrokerBlock", IDS_PPAPI_BROKER_BLOCK_RADIO }, |
| 389 // Multiple automatic downloads | 389 // Multiple automatic downloads |
| 390 { "multiple-automatic-downloads_header", | 390 { "multipleAutomaticDownloadsTabLabel", |
| 391 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL }, | 391 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL }, |
| 392 { "multipleAutomaticDownloadsAllow", | 392 { "multipleAutomaticDownloadsAllow", |
| 393 IDS_AUTOMATIC_DOWNLOADS_ALLOW_RADIO }, | 393 IDS_AUTOMATIC_DOWNLOADS_ALLOW_RADIO }, |
| 394 { "multipleAutomaticDownloadsAsk", | 394 { "multipleAutomaticDownloadsAsk", |
| 395 IDS_AUTOMATIC_DOWNLOADS_ASK_RADIO }, | 395 IDS_AUTOMATIC_DOWNLOADS_ASK_RADIO }, |
| 396 { "multipleAutomaticDownloadsBlock", | 396 { "multipleAutomaticDownloadsBlock", |
| 397 IDS_AUTOMATIC_DOWNLOADS_BLOCK_RADIO }, | 397 IDS_AUTOMATIC_DOWNLOADS_BLOCK_RADIO }, |
| 398 // MIDI system exclusive messages | 398 // MIDI system exclusive messages |
| 399 { "midi-sysex_header", IDS_MIDI_SYSEX_TAB_LABEL }, | 399 { "midi-sysex_header", IDS_MIDI_SYSEX_TAB_LABEL }, |
| 400 { "midiSysExAllow", IDS_MIDI_SYSEX_ALLOW_RADIO }, | 400 { "midiSysExAllow", IDS_MIDI_SYSEX_ALLOW_RADIO }, |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1493 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
| 1494 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1494 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
| 1495 // Exceptions apply only when the feature is enabled. | 1495 // Exceptions apply only when the feature is enabled. |
| 1496 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1496 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
| 1497 web_ui()->CallJavascriptFunction( | 1497 web_ui()->CallJavascriptFunction( |
| 1498 "ContentSettings.enableProtectedContentExceptions", | 1498 "ContentSettings.enableProtectedContentExceptions", |
| 1499 base::FundamentalValue(enable_exceptions)); | 1499 base::FundamentalValue(enable_exceptions)); |
| 1500 } | 1500 } |
| 1501 | 1501 |
| 1502 } // namespace options | 1502 } // namespace options |
| OLD | NEW |