2 * Copyright (c) 2020 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>
29 WebSettings::WebSettings( Dali::WebEngineSettings& settings )
30 : mWebEngineSettings( settings )
34 WebSettings::~WebSettings()
38 void WebSettings::AllowMixedContents( bool allowed )
40 mWebEngineSettings.AllowMixedContents( allowed );
43 void WebSettings::EnableSpatialNavigation( bool enabled )
45 mWebEngineSettings.AllowMixedContents( enabled );
48 int WebSettings::GetDefaultFontSize() const
50 return mWebEngineSettings.GetDefaultFontSize();
53 void WebSettings::SetDefaultFontSize( int defaultFontSize )
55 mWebEngineSettings.SetDefaultFontSize( defaultFontSize );
58 void WebSettings::EnableWebSecurity( bool enabled )
60 mWebEngineSettings.EnableWebSecurity( enabled );
63 void WebSettings::AllowFileAccessFromExternalUrl( bool allowed )
65 mWebEngineSettings.AllowFileAccessFromExternalUrl( allowed );
68 bool WebSettings::IsJavaScriptEnabled() const
70 return mWebEngineSettings.IsJavaScriptEnabled();
73 void WebSettings::EnableJavaScript( bool enabled )
75 mWebEngineSettings.EnableJavaScript( enabled );
78 void WebSettings::AllowScriptsOpenWindows( bool allowed )
80 mWebEngineSettings.AllowScriptsOpenWindows( allowed );
83 bool WebSettings::AreImagesLoadedAutomatically() const
85 return mWebEngineSettings.AreImagesLoadedAutomatically();
88 void WebSettings::AllowImagesLoadAutomatically( bool automatic )
90 mWebEngineSettings.AllowImagesLoadAutomatically( automatic );
93 std::string WebSettings::GetDefaultTextEncodingName() const
95 return mWebEngineSettings.GetDefaultTextEncodingName();
98 void WebSettings::SetDefaultTextEncodingName( const std::string& defaultTextEncodingName )
100 mWebEngineSettings.SetDefaultTextEncodingName( defaultTextEncodingName );
103 } // namespace Toolkit