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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 2682653005: Settings: Add a new Enable Protected Content checkbox on all platforms (Closed)
Patch Set: fix up Created 3 years, 10 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
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/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
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},
424 {"protectedContentEnableCheckbox", IDS_PROTECTED_CONTENT_ENABLE_CHECKBOX},
425 #if defined(OS_CHROMEOS) || defined(OS_WIN)
425 {"protectedContentInfo", IDS_PROTECTED_CONTENT_INFO}, 426 {"protectedContentInfo", IDS_PROTECTED_CONTENT_INFO},
426 {"protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE}, 427 {"protectedContentEnableIdentifiersCheckbox",
428 IDS_PROTECTED_CONTENT_ENABLE_IDENTIFIERS_CHECKBOX},
427 {"protectedContentHeader", IDS_PROTECTED_CONTENT_HEADER}, 429 {"protectedContentHeader", IDS_PROTECTED_CONTENT_HEADER},
428 #endif // defined(OS_CHROMEOS) || defined(OS_WIN) 430 #endif // defined(OS_CHROMEOS) || defined(OS_WIN)
429 // Microphone filter. 431 // Microphone filter.
430 {"mediaStreamMicTabLabel", IDS_MEDIA_STREAM_MIC_TAB_LABEL}, 432 {"mediaStreamMicTabLabel", IDS_MEDIA_STREAM_MIC_TAB_LABEL},
431 {"mediaStreamMicHeader", IDS_MEDIA_STREAM_MIC_HEADER}, 433 {"mediaStreamMicHeader", IDS_MEDIA_STREAM_MIC_HEADER},
432 {"mediaStreamMicAsk", IDS_MEDIA_STREAM_ASK_AUDIO_ONLY_RADIO}, 434 {"mediaStreamMicAsk", IDS_MEDIA_STREAM_ASK_AUDIO_ONLY_RADIO},
433 {"mediaStreamMicBlock", IDS_MEDIA_STREAM_BLOCK_AUDIO_ONLY_RADIO}, 435 {"mediaStreamMicBlock", IDS_MEDIA_STREAM_BLOCK_AUDIO_ONLY_RADIO},
434 // Camera filter. 436 // Camera filter.
435 {"mediaStreamCameraTabLabel", IDS_MEDIA_STREAM_CAMERA_TAB_LABEL}, 437 {"mediaStreamCameraTabLabel", IDS_MEDIA_STREAM_CAMERA_TAB_LABEL},
436 {"mediaStreamCameraHeader", IDS_MEDIA_STREAM_CAMERA_HEADER}, 438 {"mediaStreamCameraHeader", IDS_MEDIA_STREAM_CAMERA_HEADER},
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 1493
1492 // Exceptions apply only when the feature is enabled. 1494 // Exceptions apply only when the feature is enabled.
1493 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); 1495 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
1494 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1496 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1495 web_ui()->CallJavascriptFunctionUnsafe( 1497 web_ui()->CallJavascriptFunctionUnsafe(
1496 "ContentSettings.enableProtectedContentExceptions", 1498 "ContentSettings.enableProtectedContentExceptions",
1497 base::FundamentalValue(enable_exceptions)); 1499 base::FundamentalValue(enable_exceptions));
1498 } 1500 }
1499 1501
1500 } // namespace options 1502 } // namespace options
OLDNEW
« chrome/app/generated_resources.grd ('K') | « chrome/browser/resources/options/content_settings.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698