| 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/options2/content_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options2/content_settings_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 {CONTENT_SETTINGS_TYPE_GEOLOCATION, "location"}, | 336 {CONTENT_SETTINGS_TYPE_GEOLOCATION, "location"}, |
| 337 {CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications"}, | 337 {CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications"}, |
| 338 {CONTENT_SETTINGS_TYPE_INTENTS, "intents"}, | 338 {CONTENT_SETTINGS_TYPE_INTENTS, "intents"}, |
| 339 {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"}, | 339 {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"}, |
| 340 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"}, | 340 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"}, |
| 341 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"}, | 341 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"}, |
| 342 {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script"}, | 342 {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script"}, |
| 343 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"}, | 343 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"}, |
| 344 {EX_CONTENT_SETTINGS_TYPE_PEPPER_FLASH_CAMERAMIC, "pepper-flash-cameramic"}, | 344 {EX_CONTENT_SETTINGS_TYPE_PEPPER_FLASH_CAMERAMIC, "pepper-flash-cameramic"}, |
| 345 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"}, | 345 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"}, |
| 346 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"}, |
| 346 }; | 347 }; |
| 347 | 348 |
| 348 ContentSettingsHandler::ContentSettingsHandler() { | 349 ContentSettingsHandler::ContentSettingsHandler() { |
| 349 } | 350 } |
| 350 | 351 |
| 351 ContentSettingsHandler::~ContentSettingsHandler() { | 352 ContentSettingsHandler::~ContentSettingsHandler() { |
| 352 } | 353 } |
| 353 | 354 |
| 354 void ContentSettingsHandler::GetLocalizedValues( | 355 void ContentSettingsHandler::GetLocalizedValues( |
| 355 DictionaryValue* localized_strings) { | 356 DictionaryValue* localized_strings) { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 // Protected Content filter | 437 // Protected Content filter |
| 437 { "protectedContentTabLabel", IDS_PROTECTED_CONTENT_TAB_LABEL }, | 438 { "protectedContentTabLabel", IDS_PROTECTED_CONTENT_TAB_LABEL }, |
| 438 { "protectedContentInfo", IDS_PROTECTED_CONTENT_INFO }, | 439 { "protectedContentInfo", IDS_PROTECTED_CONTENT_INFO }, |
| 439 { "protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE}, | 440 { "protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE}, |
| 440 #endif // defined(OS_CHROMEOS) | 441 #endif // defined(OS_CHROMEOS) |
| 441 // Media stream capture device filter. | 442 // Media stream capture device filter. |
| 442 { "mediaStreamTabLabel", IDS_MEDIA_STREAM_TAB_LABEL }, | 443 { "mediaStreamTabLabel", IDS_MEDIA_STREAM_TAB_LABEL }, |
| 443 { "media-stream_header", IDS_MEDIA_STREAM_HEADER }, | 444 { "media-stream_header", IDS_MEDIA_STREAM_HEADER }, |
| 444 { "mediaStreamAsk", IDS_MEDIA_STREAM_ASK_RADIO }, | 445 { "mediaStreamAsk", IDS_MEDIA_STREAM_ASK_RADIO }, |
| 445 { "mediaStreamBlock", IDS_MEDIA_STREAM_BLOCK_RADIO }, | 446 { "mediaStreamBlock", IDS_MEDIA_STREAM_BLOCK_RADIO }, |
| 447 // PPAPI broker filter. |
| 448 { "ppapi_broker_tab_label", IDS_PPAPI_BROKER_TAB_LABEL }, |
| 449 { "ppapi_broker_allow", IDS_PPAPI_BROKER_ALLOW_RADIO }, |
| 450 { "ppapi_broker_ask", IDS_PPAPI_BROKER_ASK_RADIO }, |
| 451 { "ppapi_broker_block", IDS_PPAPI_BROKER_BLOCK_RADIO }, |
| 446 }; | 452 }; |
| 447 | 453 |
| 448 RegisterStrings(localized_strings, resources, arraysize(resources)); | 454 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 449 RegisterTitle(localized_strings, "contentSettingsPage", | 455 RegisterTitle(localized_strings, "contentSettingsPage", |
| 450 IDS_CONTENT_SETTINGS_TITLE); | 456 IDS_CONTENT_SETTINGS_TITLE); |
| 451 | 457 |
| 452 // Register titles for each of the individual settings whose exception | 458 // Register titles for each of the individual settings whose exception |
| 453 // dialogs will be processed by |ContentSettingsHandler|. | 459 // dialogs will be processed by |ContentSettingsHandler|. |
| 454 RegisterTitle(localized_strings, "cookies", | 460 RegisterTitle(localized_strings, "cookies", |
| 455 IDS_COOKIES_TAB_LABEL); | 461 IDS_COOKIES_TAB_LABEL); |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 for (size_t i = 0; i < arraysize(kExContentSettingsTypeGroupNames); ++i) { | 1338 for (size_t i = 0; i < arraysize(kExContentSettingsTypeGroupNames); ++i) { |
| 1333 if (type == kExContentSettingsTypeGroupNames[i].type) | 1339 if (type == kExContentSettingsTypeGroupNames[i].type) |
| 1334 return kExContentSettingsTypeGroupNames[i].name; | 1340 return kExContentSettingsTypeGroupNames[i].name; |
| 1335 } | 1341 } |
| 1336 | 1342 |
| 1337 NOTREACHED(); | 1343 NOTREACHED(); |
| 1338 return std::string(); | 1344 return std::string(); |
| 1339 } | 1345 } |
| 1340 | 1346 |
| 1341 } // namespace options2 | 1347 } // namespace options2 |
| OLD | NEW |