| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"}, | 101 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"}, |
| 102 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"}, | 102 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"}, |
| 103 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"}, | 103 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"}, |
| 104 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"}, | 104 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"}, |
| 105 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"}, | 105 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"}, |
| 106 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"}, | 106 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"}, |
| 107 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"}, | 107 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"}, |
| 108 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "multiple-automatic-downloads"}, | 108 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "multiple-automatic-downloads"}, |
| 109 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex"}, | 109 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex"}, |
| 110 {CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, "push-messaging"}, | 110 {CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, "push-messaging"}, |
| 111 {CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS, "ssl-cert-decisions"}, |
| 111 #if defined(OS_CHROMEOS) | 112 #if defined(OS_CHROMEOS) |
| 112 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"}, | 113 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"}, |
| 113 #endif | 114 #endif |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 // A pseudo content type. We use it to display data like a content setting even | 117 // A pseudo content type. We use it to display data like a content setting even |
| 117 // though it is not a real content setting. | 118 // though it is not a real content setting. |
| 118 const char* kZoomContentType = "zoomlevels"; | 119 const char* kZoomContentType = "zoomlevels"; |
| 119 | 120 |
| 120 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) { | 121 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) { |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1559 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
| 1559 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); | 1560 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); |
| 1560 // Exceptions apply only when the feature is enabled. | 1561 // Exceptions apply only when the feature is enabled. |
| 1561 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1562 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
| 1562 web_ui()->CallJavascriptFunction( | 1563 web_ui()->CallJavascriptFunction( |
| 1563 "ContentSettings.enableProtectedContentExceptions", | 1564 "ContentSettings.enableProtectedContentExceptions", |
| 1564 base::FundamentalValue(enable_exceptions)); | 1565 base::FundamentalValue(enable_exceptions)); |
| 1565 } | 1566 } |
| 1566 | 1567 |
| 1567 } // namespace options | 1568 } // namespace options |
| OLD | NEW |