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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 {"locationAllow", IDS_GEOLOCATION_ALLOW_RADIO}, | 412 {"locationAllow", IDS_GEOLOCATION_ALLOW_RADIO}, |
413 {"locationAsk", IDS_GEOLOCATION_ASK_RADIO}, | 413 {"locationAsk", IDS_GEOLOCATION_ASK_RADIO}, |
414 {"locationBlock", IDS_GEOLOCATION_BLOCK_RADIO}, | 414 {"locationBlock", IDS_GEOLOCATION_BLOCK_RADIO}, |
415 {"setBy", IDS_GEOLOCATION_SET_BY_HOVER}, | 415 {"setBy", IDS_GEOLOCATION_SET_BY_HOVER}, |
416 // Notifications filter. | 416 // Notifications filter. |
417 {"notificationsTabLabel", IDS_NOTIFICATIONS_TAB_LABEL}, | 417 {"notificationsTabLabel", IDS_NOTIFICATIONS_TAB_LABEL}, |
418 {"notificationsHeader", IDS_NOTIFICATIONS_HEADER}, | 418 {"notificationsHeader", IDS_NOTIFICATIONS_HEADER}, |
419 {"notificationsAllow", IDS_NOTIFICATIONS_ALLOW_RADIO}, | 419 {"notificationsAllow", IDS_NOTIFICATIONS_ALLOW_RADIO}, |
420 {"notificationsAsk", IDS_NOTIFICATIONS_ASK_RADIO}, | 420 {"notificationsAsk", IDS_NOTIFICATIONS_ASK_RADIO}, |
421 {"notificationsBlock", IDS_NOTIFICATIONS_BLOCK_RADIO}, | 421 {"notificationsBlock", IDS_NOTIFICATIONS_BLOCK_RADIO}, |
422 #if defined(OS_CHROMEOS) || defined(OS_WIN) | |
423 // Protected Content filter | 422 // Protected Content filter |
424 {"protectedContentTabLabel", IDS_PROTECTED_CONTENT_TAB_LABEL}, | 423 {"protectedContentTabLabel", IDS_PROTECTED_CONTENT_TAB_LABEL}, |
425 {"protectedContentInfo", IDS_PROTECTED_CONTENT_INFO}, | 424 {"protectedContentInfo", IDS_PROTECTED_CONTENT_INFO}, |
426 {"protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE}, | 425 {"protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE}, |
427 {"protectedContentHeader", IDS_PROTECTED_CONTENT_HEADER}, | 426 {"protectedContentHeader", IDS_PROTECTED_CONTENT_HEADER}, |
428 #endif // defined(OS_CHROMEOS) || defined(OS_WIN) | |
429 // Microphone filter. | 427 // Microphone filter. |
430 {"mediaStreamMicTabLabel", IDS_MEDIA_STREAM_MIC_TAB_LABEL}, | 428 {"mediaStreamMicTabLabel", IDS_MEDIA_STREAM_MIC_TAB_LABEL}, |
431 {"mediaStreamMicHeader", IDS_MEDIA_STREAM_MIC_HEADER}, | 429 {"mediaStreamMicHeader", IDS_MEDIA_STREAM_MIC_HEADER}, |
432 {"mediaStreamMicAsk", IDS_MEDIA_STREAM_ASK_AUDIO_ONLY_RADIO}, | 430 {"mediaStreamMicAsk", IDS_MEDIA_STREAM_ASK_AUDIO_ONLY_RADIO}, |
433 {"mediaStreamMicBlock", IDS_MEDIA_STREAM_BLOCK_AUDIO_ONLY_RADIO}, | 431 {"mediaStreamMicBlock", IDS_MEDIA_STREAM_BLOCK_AUDIO_ONLY_RADIO}, |
434 // Camera filter. | 432 // Camera filter. |
435 {"mediaStreamCameraTabLabel", IDS_MEDIA_STREAM_CAMERA_TAB_LABEL}, | 433 {"mediaStreamCameraTabLabel", IDS_MEDIA_STREAM_CAMERA_TAB_LABEL}, |
436 {"mediaStreamCameraHeader", IDS_MEDIA_STREAM_CAMERA_HEADER}, | 434 {"mediaStreamCameraHeader", IDS_MEDIA_STREAM_CAMERA_HEADER}, |
437 {"mediaStreamCameraAsk", IDS_MEDIA_STREAM_ASK_VIDEO_ONLY_RADIO}, | 435 {"mediaStreamCameraAsk", IDS_MEDIA_STREAM_ASK_VIDEO_ONLY_RADIO}, |
438 {"mediaStreamCameraBlock", IDS_MEDIA_STREAM_BLOCK_VIDEO_ONLY_RADIO}, | 436 {"mediaStreamCameraBlock", IDS_MEDIA_STREAM_BLOCK_VIDEO_ONLY_RADIO}, |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 | 1489 |
1492 // Exceptions apply only when the feature is enabled. | 1490 // Exceptions apply only when the feature is enabled. |
1493 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1491 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
1494 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1492 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1495 web_ui()->CallJavascriptFunctionUnsafe( | 1493 web_ui()->CallJavascriptFunctionUnsafe( |
1496 "ContentSettings.enableProtectedContentExceptions", | 1494 "ContentSettings.enableProtectedContentExceptions", |
1497 base::FundamentalValue(enable_exceptions)); | 1495 base::FundamentalValue(enable_exceptions)); |
1498 } | 1496 } |
1499 | 1497 |
1500 } // namespace options | 1498 } // namespace options |
OLD | NEW |