| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "webkit/glue/webpreferences.h" | 5 #include "webkit/glue/webpreferences.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "webkit/api/public/WebRuntimeFeatures.h" | 8 #include "webkit/api/public/WebRuntimeFeatures.h" |
| 9 #include "webkit/api/public/WebKit.h" | 9 #include "webkit/api/public/WebKit.h" |
| 10 #include "webkit/api/public/WebSettings.h" | 10 #include "webkit/api/public/WebSettings.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 else | 49 else |
| 50 settings->setUserStyleSheetLocation(WebURL()); | 50 settings->setUserStyleSheetLocation(WebURL()); |
| 51 settings->setUsesPageCache(uses_page_cache); | 51 settings->setUsesPageCache(uses_page_cache); |
| 52 settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled); | 52 settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled); |
| 53 settings->setXSSAuditorEnabled(xss_auditor_enabled); | 53 settings->setXSSAuditorEnabled(xss_auditor_enabled); |
| 54 settings->setLocalStorageEnabled(local_storage_enabled); | 54 settings->setLocalStorageEnabled(local_storage_enabled); |
| 55 settings->setDatabasesEnabled( | 55 settings->setDatabasesEnabled( |
| 56 WebRuntimeFeatures::isDatabaseEnabled() || databases_enabled); | 56 WebRuntimeFeatures::isDatabaseEnabled() || databases_enabled); |
| 57 settings->setSessionStorageEnabled(session_storage_enabled); | 57 settings->setSessionStorageEnabled(session_storage_enabled); |
| 58 settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled); | 58 settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled); |
| 59 settings->setExperimentalNotificationsEnabled( | |
| 60 experimental_notifications_enabled); | |
| 61 | 59 |
| 62 // This setting affects the behavior of links in an editable region: | 60 // This setting affects the behavior of links in an editable region: |
| 63 // clicking the link should select it rather than navigate to it. | 61 // clicking the link should select it rather than navigate to it. |
| 64 // Safari uses the same default. It is unlikley an embedder would want to | 62 // Safari uses the same default. It is unlikley an embedder would want to |
| 65 // change this, since it would break existing rich text editors. | 63 // change this, since it would break existing rich text editors. |
| 66 settings->setEditableLinkBehaviorNeverLive(); | 64 settings->setEditableLinkBehaviorNeverLive(); |
| 67 | 65 |
| 68 settings->setFontRenderingModeNormal(); | 66 settings->setFontRenderingModeNormal(); |
| 69 settings->setJavaEnabled(java_enabled); | 67 settings->setJavaEnabled(java_enabled); |
| 70 | 68 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 86 // and support is compiled in. | 84 // and support is compiled in. |
| 87 settings->setExperimentalWebGLEnabled(experimental_webgl_enabled); | 85 settings->setExperimentalWebGLEnabled(experimental_webgl_enabled); |
| 88 | 86 |
| 89 // Web inspector settings need to be passed in differently. | 87 // Web inspector settings need to be passed in differently. |
| 90 web_view->setInspectorSettings(WebString::fromUTF8(inspector_settings)); | 88 web_view->setInspectorSettings(WebString::fromUTF8(inspector_settings)); |
| 91 | 89 |
| 92 // Tabs to link is not part of the settings. WebCore calls | 90 // Tabs to link is not part of the settings. WebCore calls |
| 93 // ChromeClient::tabsToLinks which is part of the glue code. | 91 // ChromeClient::tabsToLinks which is part of the glue code. |
| 94 web_view->setTabsToLinks(tabs_to_links); | 92 web_view->setTabsToLinks(tabs_to_links); |
| 95 } | 93 } |
| OLD | NEW |