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::AllowFileAccessFromExternalUrl(bool allowed)
64 mWebEngineSettings.AllowFileAccessFromExternalUrl(allowed);
67 bool WebSettings::IsJavaScriptEnabled() const
69 return mWebEngineSettings.IsJavaScriptEnabled();
72 void WebSettings::EnableJavaScript(bool enabled)
74 mWebEngineSettings.EnableJavaScript(enabled);
77 void WebSettings::AllowScriptsOpenWindows(bool allowed)
79 mWebEngineSettings.AllowScriptsOpenWindows(allowed);
82 bool WebSettings::AreImagesLoadedAutomatically() const
84 return mWebEngineSettings.AreImagesLoadedAutomatically();
87 void WebSettings::AllowImagesLoadAutomatically(bool automatic)
89 mWebEngineSettings.AllowImagesLoadAutomatically(automatic);
92 std::string WebSettings::GetDefaultTextEncodingName() const
94 return mWebEngineSettings.GetDefaultTextEncodingName();
97 void WebSettings::SetDefaultTextEncodingName(const std::string& defaultTextEncodingName)
99 mWebEngineSettings.SetDefaultTextEncodingName(defaultTextEncodingName);
102 } // namespace Toolkit