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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 {"manage_handlers", IDS_HANDLERS_MANAGE}, | 288 {"manage_handlers", IDS_HANDLERS_MANAGE}, |
289 {"exceptionPatternHeader", IDS_EXCEPTIONS_PATTERN_HEADER}, | 289 {"exceptionPatternHeader", IDS_EXCEPTIONS_PATTERN_HEADER}, |
290 {"exceptionBehaviorHeader", IDS_EXCEPTIONS_ACTION_HEADER}, | 290 {"exceptionBehaviorHeader", IDS_EXCEPTIONS_ACTION_HEADER}, |
291 {"exceptionZoomHeader", IDS_EXCEPTIONS_ZOOM_HEADER}, | 291 {"exceptionZoomHeader", IDS_EXCEPTIONS_ZOOM_HEADER}, |
292 {"embeddedOnHost", IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ON_HOST}, | 292 {"embeddedOnHost", IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ON_HOST}, |
293 // Cookies filter. | 293 // Cookies filter. |
294 {"cookiesTabLabel", IDS_COOKIES_TAB_LABEL}, | 294 {"cookiesTabLabel", IDS_COOKIES_TAB_LABEL}, |
295 {"cookies_header", IDS_COOKIES_HEADER}, | 295 {"cookies_header", IDS_COOKIES_HEADER}, |
296 {"cookiesAllow", IDS_COOKIES_ALLOW_RADIO}, | 296 {"cookiesAllow", IDS_COOKIES_ALLOW_RADIO}, |
297 {"cookiesBlock", IDS_COOKIES_BLOCK_RADIO}, | 297 {"cookiesBlock", IDS_COOKIES_BLOCK_RADIO}, |
298 {"cookies_session_only", IDS_COOKIES_SESSION_ONLY_RADIO}, | 298 {"cookiesSession", IDS_COOKIES_SESSION_ONLY_RADIO}, |
299 {"cookies_block_3rd_party", IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX}, | 299 {"cookies_block_3rd_party", IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX}, |
300 {"cookies_clear_when_close", IDS_COOKIES_CLEAR_WHEN_CLOSE_CHKBOX}, | 300 {"cookies_clear_when_close", IDS_COOKIES_CLEAR_WHEN_CLOSE_CHKBOX}, |
301 {"cookies_lso_clear_when_close", IDS_COOKIES_LSO_CLEAR_WHEN_CLOSE_CHKBOX}, | 301 {"cookies_lso_clear_when_close", IDS_COOKIES_LSO_CLEAR_WHEN_CLOSE_CHKBOX}, |
302 {"cookies_show_cookies", IDS_COOKIES_SHOW_COOKIES_BUTTON}, | 302 {"cookies_show_cookies", IDS_COOKIES_SHOW_COOKIES_BUTTON}, |
303 {"flash_storage_settings", IDS_FLASH_STORAGE_SETTINGS}, | 303 {"flash_storage_settings", IDS_FLASH_STORAGE_SETTINGS}, |
304 {"flash_storage_url", IDS_FLASH_STORAGE_URL}, | 304 {"flash_storage_url", IDS_FLASH_STORAGE_URL}, |
305 #if defined(ENABLE_GOOGLE_NOW) | 305 #if defined(ENABLE_GOOGLE_NOW) |
306 {"googleGeolocationAccessEnable", | 306 {"googleGeolocationAccessEnable", |
307 IDS_GEOLOCATION_GOOGLE_ACCESS_ENABLE_CHKBOX}, | 307 IDS_GEOLOCATION_GOOGLE_ACCESS_ENABLE_CHKBOX}, |
308 #endif | 308 #endif |
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 | 1602 |
1603 // Exceptions apply only when the feature is enabled. | 1603 // Exceptions apply only when the feature is enabled. |
1604 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1604 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
1605 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1605 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1606 web_ui()->CallJavascriptFunction( | 1606 web_ui()->CallJavascriptFunction( |
1607 "ContentSettings.enableProtectedContentExceptions", | 1607 "ContentSettings.enableProtectedContentExceptions", |
1608 base::FundamentalValue(enable_exceptions)); | 1608 base::FundamentalValue(enable_exceptions)); |
1609 } | 1609 } |
1610 | 1610 |
1611 } // namespace options | 1611 } // namespace options |
OLD | NEW |