1 #ifndef DALI_WEB_ENGINE_SETTINGS_H
2 #define DALI_WEB_ENGINE_SETTINGS_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
26 * @brief A class WebEngineSettings for settings of web engine.
28 class WebEngineSettings
34 WebEngineSettings() = default;
39 virtual ~WebEngineSettings() = default;
42 *@brief Allow running mixed contents or not.
44 * @param[in] allowed if true, allow to run mixed contents,
47 virtual void AllowMixedContents(bool allowed) = 0;
50 * @brief Enable the spatial navigation or not.
52 * @param[in] enabled if true, use spatial navigation,
53 * otherwise to disable
55 virtual void EnableSpatialNavigation(bool enabled) = 0;
58 * @brief Get the default font size.
60 * @return defaut font size.
62 virtual uint32_t GetDefaultFontSize() const = 0;
65 * @brief Set the default font size.
67 * @param[in] size a new default font size to set
69 virtual void SetDefaultFontSize(uint32_t size) = 0;
72 * @brief Enables/disables web security.
74 * @param[in] enabled if true, to enable the web security
75 * otherwise to disable
77 virtual void EnableWebSecurity(bool enabled) = 0;
80 * @brief Allow/Disallow file access from external url
82 * @param[in] allowed if true, to allow file access from external url
83 * otherwise to disallow
85 virtual void AllowFileAccessFromExternalUrl(bool allowed) = 0;
88 * @brief Check if javascript is enabled or not.
90 * @return true if enabled, false if disabled.
92 virtual bool IsJavaScriptEnabled() const = 0;
95 * @brief Enable/Disable javascript
97 * @param[in] enabled if true, to enable javascript
98 * otherwise to disable
100 virtual void EnableJavaScript(bool enabled) = 0;
103 * @brief Allow if the scripts can open new windows.
105 * @param[in] allowed if true, the scripts can open new windows,
108 virtual void AllowScriptsOpenWindows(bool allowed) = 0;
111 * @brief Check if images are loaded automatically or not.
113 * @return true if enabled, false if disabled.
115 virtual bool AreImagesLoadedAutomatically() const = 0;
118 * @brief Allow to load images automatically
120 * @param[in] automatic if true, to load images automatically,
123 virtual void AllowImagesLoadAutomatically(bool automatic) = 0;
126 * @brief Get the default encoding name.
128 * @return defaut encoding name.
130 virtual std::string GetDefaultTextEncodingName() const = 0;
133 * @brief Set the default encoding name.
135 * @param[in] defaultTextEncodingName a default encoding name to set
137 virtual void SetDefaultTextEncodingName(const std::string& defaultTextEncodingName) = 0;
142 #endif // DALI_WEB_ENGINE_SETTINGS_H