1 /* 2 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: 7 * 8 * * Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * * Redistributions in binary form must reproduce the above 11 * copyright notice, this list of conditions and the following disclaimer 12 * in the documentation and/or other materials provided with the 13 * distribution. 14 * * Neither the name of Google Inc. nor the names of its 15 * contributors may be used to endorse or promote products derived from 16 * this software without specific prior written permission. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31 #ifndef WebSettingsImpl_h 32 #define WebSettingsImpl_h 33 34 #include "WebSettings.h" 35 36 namespace WebCore { 37 class Settings; 38 } 39 40 namespace WebKit { 41 42 class WebSettingsImpl : public WebSettings { 43 public: 44 explicit WebSettingsImpl(WebCore::Settings*); ~WebSettingsImpl()45 virtual ~WebSettingsImpl() { } 46 47 virtual void setStandardFontFamily(const WebString&); 48 virtual void setFixedFontFamily(const WebString&); 49 virtual void setSerifFontFamily(const WebString&); 50 virtual void setSansSerifFontFamily(const WebString&); 51 virtual void setCursiveFontFamily(const WebString&); 52 virtual void setFantasyFontFamily(const WebString&); 53 virtual void setDefaultFontSize(int); 54 virtual void setDefaultFixedFontSize(int); 55 virtual void setMinimumFontSize(int); 56 virtual void setMinimumLogicalFontSize(int); 57 virtual void setDefaultTextEncodingName(const WebString&); 58 virtual void setJavaScriptEnabled(bool); 59 virtual void setWebSecurityEnabled(bool); 60 virtual void setJavaScriptCanOpenWindowsAutomatically(bool); 61 virtual void setLoadsImagesAutomatically(bool); 62 virtual void setImagesEnabled(bool); 63 virtual void setPluginsEnabled(bool); 64 virtual void setDOMPasteAllowed(bool); 65 virtual void setDeveloperExtrasEnabled(bool); 66 virtual void setNeedsSiteSpecificQuirks(bool); 67 virtual void setShrinksStandaloneImagesToFit(bool); 68 virtual void setUsesEncodingDetector(bool); 69 virtual void setTextAreasAreResizable(bool); 70 virtual void setJavaEnabled(bool); 71 virtual void setAllowScriptsToCloseWindows(bool); 72 virtual void setUserStyleSheetLocation(const WebURL&); 73 virtual void setAuthorAndUserStylesEnabled(bool); 74 virtual void setUsesPageCache(bool); 75 virtual void setDownloadableBinaryFontsEnabled(bool); 76 virtual void setJavaScriptCanAccessClipboard(bool); 77 virtual void setXSSAuditorEnabled(bool); 78 virtual void setLocalStorageEnabled(bool); 79 virtual void setEditableLinkBehaviorNeverLive(); 80 virtual void setFrameFlatteningEnabled(bool); 81 virtual void setFontRenderingModeNormal(); 82 virtual void setShouldPaintCustomScrollbars(bool); 83 virtual void setAllowUniversalAccessFromFileURLs(bool); 84 virtual void setAllowFileAccessFromFileURLs(bool); 85 virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); 86 virtual void setOfflineWebApplicationCacheEnabled(bool); 87 virtual void setWebAudioEnabled(bool); 88 virtual void setExperimentalWebGLEnabled(bool); 89 virtual void setOpenGLMultisamplingEnabled(bool); 90 virtual void setShowDebugBorders(bool); 91 virtual void setShowFPSCounter(bool); showFPSCounter()92 virtual bool showFPSCounter() const { return m_showFPSCounter; } 93 virtual void setShowPlatformLayerTree(bool); showPlatformLayerTree()94 virtual bool showPlatformLayerTree() const { return m_showPlatformLayerTree; } 95 virtual void setEditingBehavior(EditingBehavior); 96 virtual void setAcceleratedCompositingEnabled(bool); 97 virtual void setForceCompositingMode(bool); 98 virtual void setCompositeToTextureEnabled(bool); compositeToTextureEnabled()99 virtual bool compositeToTextureEnabled() const { return m_compositeToTextureEnabled; } 100 virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool); 101 virtual void setAcceleratedCompositingForVideoEnabled(bool); 102 virtual void setAcceleratedCompositingForPluginsEnabled(bool); 103 virtual void setAcceleratedCompositingForCanvasEnabled(bool); 104 virtual void setAcceleratedCompositingForAnimationEnabled(bool); 105 virtual void setAccelerated2dCanvasEnabled(bool); 106 virtual void setAcceleratedDrawingEnabled(bool); 107 virtual void setMemoryInfoEnabled(bool); 108 virtual void setHyperlinkAuditingEnabled(bool); 109 virtual void setAsynchronousSpellCheckingEnabled(bool); 110 virtual void setCaretBrowsingEnabled(bool); 111 virtual void setInteractiveFormValidationEnabled(bool); 112 virtual void setValidationMessageTimerMagnification(int); 113 virtual void setMinimumTimerInterval(double); 114 virtual void setFullScreenEnabled(bool); 115 116 private: 117 WebCore::Settings* m_settings; 118 bool m_compositeToTextureEnabled; 119 bool m_showFPSCounter; 120 bool m_showPlatformLayerTree; 121 }; 122 123 } // namespace WebKit 124 125 #endif 126