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