| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"}, | 100 {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"}, |
| 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 #if defined(OS_CHROMEOS) | 111 #if defined(OS_CHROMEOS) |
| 111 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"}, | 112 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"}, |
| 112 #endif | 113 #endif |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 // A pseudo content type. We use it to display data like a content setting even | 116 // A pseudo content type. We use it to display data like a content setting even |
| 116 // though it is not a real content setting. | 117 // though it is not a real content setting. |
| 117 const char* kZoomContentType = "zoomlevels"; | 118 const char* kZoomContentType = "zoomlevels"; |
| 118 | 119 |
| 119 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) { | 120 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) { |
| (...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1564 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
| 1564 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); | 1565 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); |
| 1565 // Exceptions apply only when the feature is enabled. | 1566 // Exceptions apply only when the feature is enabled. |
| 1566 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1567 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
| 1567 web_ui()->CallJavascriptFunction( | 1568 web_ui()->CallJavascriptFunction( |
| 1568 "ContentSettings.enableProtectedContentExceptions", | 1569 "ContentSettings.enableProtectedContentExceptions", |
| 1569 base::FundamentalValue(enable_exceptions)); | 1570 base::FundamentalValue(enable_exceptions)); |
| 1570 } | 1571 } |
| 1571 | 1572 |
| 1572 } // namespace options | 1573 } // namespace options |
| OLD | NEW |