2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/devel-api/controls/web-view/web-settings.h>
22 #include <dali/devel-api/adaptor-framework/web-engine-settings.h>
28 WebSettings::WebSettings(Dali::WebEngineSettings& settings)
29 : mWebEngineSettings(settings)
33 WebSettings::~WebSettings()
37 void WebSettings::AllowMixedContents(bool allowed)
39 mWebEngineSettings.AllowMixedContents(allowed);
42 void WebSettings::EnableSpatialNavigation(bool enabled)
44 mWebEngineSettings.AllowMixedContents(enabled);
47 int WebSettings::GetDefaultFontSize() const
49 return mWebEngineSettings.GetDefaultFontSize();
52 void WebSettings::SetDefaultFontSize(int defaultFontSize)
54 mWebEngineSettings.SetDefaultFontSize(defaultFontSize);
57 void WebSettings::EnableWebSecurity(bool enabled)
59 mWebEngineSettings.EnableWebSecurity(enabled);
62 void WebSettings::EnableCacheBuilder(bool enabled)
64 mWebEngineSettings.EnableCacheBuilder(enabled);
67 void WebSettings::UseScrollbarThumbFocusNotifications(bool used)
69 mWebEngineSettings.UseScrollbarThumbFocusNotifications(used);
72 void WebSettings::EnableDoNotTrack( bool enabled )
74 mWebEngineSettings.EnableDoNotTrack(enabled);
77 void WebSettings::AllowFileAccessFromExternalUrl(bool allowed)
79 mWebEngineSettings.AllowFileAccessFromExternalUrl(allowed);
82 bool WebSettings::IsJavaScriptEnabled() const
84 return mWebEngineSettings.IsJavaScriptEnabled();
87 void WebSettings::EnableJavaScript(bool enabled)
89 mWebEngineSettings.EnableJavaScript(enabled);
92 bool WebSettings::IsAutoFittingEnabled() const
94 return mWebEngineSettings.IsAutoFittingEnabled();
97 void WebSettings::EnableAutoFitting(bool enabled)
99 mWebEngineSettings.EnableAutoFitting(enabled);
102 bool WebSettings::ArePluginsEnabled() const
104 return mWebEngineSettings.ArePluginsEnabled();
107 void WebSettings::EnablePlugins(bool enabled)
109 mWebEngineSettings.EnablePlugins(enabled);
112 bool WebSettings::IsPrivateBrowsingEnabled() const
114 return mWebEngineSettings.IsPrivateBrowsingEnabled();
117 void WebSettings::EnablePrivateBrowsing(bool enabled)
119 mWebEngineSettings.EnablePrivateBrowsing(enabled);
122 bool WebSettings::IsLinkMagnifierEnabled() const
124 return mWebEngineSettings.IsLinkMagnifierEnabled();
127 void WebSettings::EnableLinkMagnifier(bool enabled)
129 mWebEngineSettings.EnableLinkMagnifier(enabled);
132 bool WebSettings::IsKeypadWithoutUserActionUsed() const
134 return mWebEngineSettings.IsKeypadWithoutUserActionUsed();
137 void WebSettings::UseKeypadWithoutUserAction(bool used)
139 mWebEngineSettings.UseKeypadWithoutUserAction(used);
142 bool WebSettings::IsAutofillPasswordFormEnabled() const
144 return mWebEngineSettings.IsAutofillPasswordFormEnabled();
147 void WebSettings::EnableAutofillPasswordForm(bool enabled)
149 mWebEngineSettings.EnableAutofillPasswordForm(enabled);
152 bool WebSettings::IsFormCandidateDataEnabled() const
154 return mWebEngineSettings.IsFormCandidateDataEnabled();
157 void WebSettings::EnableFormCandidateData( bool enabled )
159 mWebEngineSettings.EnableFormCandidateData(enabled);
162 bool WebSettings::IsTextSelectionEnabled() const
164 return mWebEngineSettings.IsTextSelectionEnabled();
167 void WebSettings::EnableTextSelection( bool enabled )
169 return mWebEngineSettings.EnableTextSelection(enabled);
172 bool WebSettings::IsTextAutosizingEnabled() const
174 return mWebEngineSettings.IsTextAutosizingEnabled();
177 void WebSettings::EnableTextAutosizing( bool enabled )
179 return mWebEngineSettings.EnableTextAutosizing(enabled);
182 bool WebSettings::IsArrowScrollEnabled() const
184 return mWebEngineSettings.IsArrowScrollEnabled();
187 void WebSettings::EnableArrowScroll( bool enabled )
189 return mWebEngineSettings.EnableArrowScroll(enabled);
192 bool WebSettings::IsClipboardEnabled() const
194 return mWebEngineSettings.IsClipboardEnabled();
197 void WebSettings::EnableClipboard( bool enabled )
199 return mWebEngineSettings.EnableClipboard(enabled);
202 bool WebSettings::IsImePanelEnabled() const
204 return mWebEngineSettings.IsImePanelEnabled();
207 void WebSettings::EnableImePanel( bool enabled )
209 return mWebEngineSettings.EnableImePanel(enabled);
212 void WebSettings::AllowScriptsOpenWindows(bool allowed)
214 mWebEngineSettings.AllowScriptsOpenWindows(allowed);
217 bool WebSettings::AreImagesLoadedAutomatically() const
219 return mWebEngineSettings.AreImagesLoadedAutomatically();
222 void WebSettings::AllowImagesLoadAutomatically(bool automatic)
224 mWebEngineSettings.AllowImagesLoadAutomatically(automatic);
227 std::string WebSettings::GetDefaultTextEncodingName() const
229 return mWebEngineSettings.GetDefaultTextEncodingName();
232 void WebSettings::SetDefaultTextEncodingName(const std::string& defaultTextEncodingName)
234 mWebEngineSettings.SetDefaultTextEncodingName(defaultTextEncodingName);
237 } // namespace Toolkit