--- /dev/null
+#ifndef DALI_WEB_ENGINE_BACK_FORWARD_LIST_ITEM_H
+#define DALI_WEB_ENGINE_BACK_FORWARD_LIST_ITEM_H
+
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+
+namespace Dali
+{
+
+/**
+ * @brief A class WebBackForwardListItem for back forward list item of web engine.
+ */
+class WebEngineBackForwardListItem
+{
+
+public:
+
+ /**
+ * @brief Constructor.
+ */
+ WebEngineBackForwardListItem() = default;
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~WebEngineBackForwardListItem() = default;
+
+ /**
+ * @brief Returns the URL of the item.
+ * @details The returned URL may differ from the original URL (For example,
+ * if the page is redirected).
+ * @return The URL of the item, otherwise "" in case of an error
+ */
+ virtual std::string GetUrl() const = 0;
+
+ /**
+ * @brief Returns the title of the item.
+ * @return The title of the item, otherwise "" in case of an error
+ */
+ virtual std::string GetTitle() const = 0;
+
+ /**
+ * @brief Returns the original URL of the item.
+ * @return The original URL of the item, otherwise "" in case of an error
+ */
+ virtual std::string GetOriginalUrl() const = 0;
+
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_BACK_FORWARD_LIST_ITEM_H
+
--- /dev/null
+#ifndef DALI_WEB_ENGINE_BACK_FORWARD_LIST_H
+#define DALI_WEB_ENGINE_BACK_FORWARD_LIST_H
+
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+#include <dali/devel-api/adaptor-framework/web-engine-back-forward-list-item.h>
+
+namespace Dali
+{
+
+class WebEngineBackForwardListItem;
+
+/**
+ * @brief A class WebBackForwardList for back forward list of web engine.
+ */
+class WebEngineBackForwardList
+{
+
+public:
+
+ /**
+ * @brief Constructor.
+ */
+ WebEngineBackForwardList() = default;
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~WebEngineBackForwardList() = default;
+
+ /**
+ * @brief Returns the current item in the @a list.
+ * @return The item of back-forward list.
+ */
+ virtual WebEngineBackForwardListItem& GetCurrentItem() const = 0;
+
+ /**
+ * @brief Returns the item at a given @a index relative to the current item.
+ * @param[in] index The index of the item
+ * @return The item of back-forward list.
+ */
+ virtual WebEngineBackForwardListItem& GetItemAtIndex( uint32_t index ) const = 0;
+
+ /**
+ * @brief Returns the length of the back-forward list including the current
+ * item.
+ * @return The length of the back-forward list including the current item,
+ * otherwise @c 0 in case of an error
+ */
+ virtual uint32_t GetItemCount() const = 0;
+
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_BACK_FORWARD_LIST_H
--- /dev/null
+#ifndef DALI_WEB_ENGINE_CONTEXT_H
+#define DALI_WEB_ENGINE_CONTEXT_H
+
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+
+namespace Dali
+{
+
+/**
+ * @brief A class WebEngineContext for context of web engine.
+ */
+class WebEngineContext
+{
+
+public:
+
+ /**
+ * @brief Enumeration for cache model options.
+ */
+ enum class CacheModel
+ {
+ DOCUMENT_VIEWER, ///< Use the smallest cache capacity.
+ DOCUMENT_BROWSER, ///< Use the bigger cache capacity than DocumentBrowser.
+ PRIMARY_WEB_BROWSER, ///< Use the biggest cache capacity.
+ };
+
+ /**
+ * @brief Constructor.
+ */
+ WebEngineContext() = default;
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~WebEngineContext() = default;
+
+ /**
+ * @brief Returns the cache model type.
+ * @return #CacheModel
+ */
+ virtual CacheModel GetCacheModel() const = 0;
+
+ /**
+ * @brief Requests to set the cache model.
+ * @param[in] cacheModel The cache model
+ */
+ virtual void SetCacheModel( CacheModel cacheModel ) = 0;
+
+ /**
+ * @brief Sets the given proxy URI to network backend of specific context.
+ * @param[in] uri The proxy URI to set
+ */
+ virtual void SetProxyUri( const std::string& uri ) = 0;
+
+ /**
+ * @brief Sets a proxy auth credential to network backend of specific context.
+ * @details Normally, proxy auth credential should be got from the callback
+ * set by ewk_view_authentication_callback_set, once the username in
+ * this API has been set with a non-null value, the authentication
+ * callback will never been invoked. Try to avoid using this API.
+ * @param[in] username username to set
+ * @param[in] password password to set
+ */
+ virtual void SetDefaultProxyAuth( const std::string& username, const std::string& password ) = 0;
+
+ /**
+ * Adds CA certificates to persistent NSS certificate database
+ * Function accepts a path to a CA certificate file, a path to a directory
+ * containing CA certificate files, or a colon-seprarated list of those.
+ * Certificate files should have *.crt extension.
+ * Directories are traversed recursively.
+ * @param[in] certificatePath path to a CA certificate file(s), see above for details
+ */
+ virtual void SetCertificateFilePath( const std::string& certificatePath ) = 0;
+
+ /**
+ * Requests for deleting all web databases.
+ */
+ virtual void DeleteWebDatabase() = 0;
+
+ /**
+ * @brief Deletes web storage.
+ * @details This function does not ensure that all data will be removed.
+ * Should be used to extend free physical memory.
+ */
+ virtual void DeleteWebStorage() = 0;
+
+ /**
+ * @brief Requests for deleting all local file systems.
+ */
+ virtual void DeleteLocalFileSystem() = 0;
+
+ /**
+ * Toggles the cache to be enabled or disabled
+ * Function works asynchronously.
+ * By default the cache is disabled resulting in not storing network data on disk.
+ * @param[in] cacheDisabled enable or disable cache
+ */
+ virtual void DisableCache( bool cacheDisabled ) = 0;
+
+ /**
+ * @brief Requests to clear cache
+ */
+ virtual void ClearCache() = 0;
+
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_CONTEXT_H
--- /dev/null
+#ifndef DALI_WEB_ENGINE_COOKIE_MANAGER_H
+#define DALI_WEB_ENGINE_COOKIE_MANAGER_H
+
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+
+namespace Dali
+{
+
+/**
+ * @brief A class WebEngineCookieManager to wrap ewk cookie manager.
+ */
+class WebEngineCookieManager
+{
+
+public:
+
+ /**
+ * @brief Enumeration for the cookies accept policies.
+ */
+ enum class CookieAcceptPolicy
+ {
+ ALWAYS, ///< Accepts every cookie sent from any page.
+ NEVER, ///< Rejects all the cookies.
+ NO_THIRD_PARTY, ///< Accepts only cookies set by the main document that is loaded.
+ };
+
+ /**
+ * @brief Enumeration for the cookie persistent storage type.
+ */
+ enum class CookiePersistentStorage
+ {
+ TEXT, ///< Cookies are stored in a text file in the Mozilla "cookies.txt" format.
+ SQLITE, ///< Cookies are stored in a SQLite file in the current Mozilla format.
+ };
+
+ /**
+ * @brief Constructor.
+ */
+ WebEngineCookieManager() = default;
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~WebEngineCookieManager() = default;
+
+ /**
+ * @brief Sets @a policy as the cookie acceptance policy for @a manager.
+ * @details By default, only cookies set by the main document loaded are
+ * accepted.
+ *
+ * @param[in] policy A #Dali::WebEngineCookieManager::CookieAcceptPolicy
+ */
+ virtual void SetCookieAcceptPolicy( CookieAcceptPolicy policy ) = 0;
+
+ /**
+ * @brief Gets the cookie acceptance policy.
+ * The default is Toolkit::WebEngineCookieManager::CookieAcceptPolicy::NO_THIRD_PARTY.
+ * @see Toolkit::WebEngineCookieManager::CookieAcceptPolicy::Type
+ */
+ virtual CookieAcceptPolicy GetCookieAcceptPolicy() const = 0;
+
+ /**
+ * @brief Deletes all the cookies of @a manager.
+ */
+ virtual void ClearCookies() = 0;
+
+ /**
+ * @brief Sets the @a path where non-session cookies are stored persistently using
+ * @a storage as the format to read/write the cookies.
+ * @details Cookies are initially read from @a path/Cookies to create an initial
+ * set of cookies. Then, non-session cookies will be written to @a path/Cookies.
+ * By default, @a manager doesn't store the cookies persistently, so you need to
+ * call this method to keep cookies saved across sessions.
+ * If @a path does not exist it will be created.
+ * @param[in] path The path where to read/write Cookies
+ * @param[in] storage The type of storage
+ */
+ virtual void SetPersistentStorage( const std::string& path, CookiePersistentStorage storage ) = 0;
+
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_COOKIE_MANAGER_H
{
class KeyEvent;
class TouchEvent;
+class WebEngineBackForwardList;
+class WebEngineContext;
+class WebEngineCookieManager;
+class WebEngineSettings;
/**
* @brief WebEnginePlugin is an abstract interface, used by dali-adaptor to access WebEngine plugin.
typedef Signal< void( const ScrollEdge )> WebEngineScrollEdgeReachedSignalType;
/**
- * @brief Enumeration for cache model options.
- */
- enum class CacheModel
- {
- /**
- * @brief Use the smallest cache capacity.
- */
- DOCUMENT_VIEWER,
-
- /**
- * @brief Use the bigger cache capacity than DocumentBrowser.
- */
- DOCUMENT_BROWSER,
-
- /**
- * @brief Use the biggest cache capacity.
- */
- PRIMARY_WEB_BROWSER
- };
-
- /**
- * @brief Enumeration for the cookies accept policies.
- */
- enum class CookieAcceptPolicy
- {
- /**
- * @brief Accepts every cookie sent from any page.
- */
- ALWAYS,
-
- /**
- * @brief Rejects all the cookies.
- */
- NEVER,
-
- /**
- * @brief Accepts only cookies set by the main document that is loaded.
- */
- NO_THIRD_PARTY
- };
-
- /**
* @brief Enumeration for the scroll edge.
*/
enum class ScrollEdge
virtual void Destroy() = 0;
/**
+ * @brief Get settings of WebEngine.
+ */
+ virtual WebEngineSettings& GetSettings() const = 0;
+
+ /**
+ * @brief Get context of WebEngine.
+ */
+ virtual WebEngineContext& GetContext() const = 0;
+
+ /**
+ * @brief Get cookie manager of WebEngine.
+ */
+ virtual WebEngineCookieManager& GetCookieManager() const = 0;
+
+ /**
+ * @brief Get back-forward list of WebEngine.
+ */
+ virtual WebEngineBackForwardList& GetBackForwardList() const = 0;
+
+ /**
* @brief Loads a web page based on a given URL.
*
* @param [in] url The URL of the resource to load
*
* @param [in] htmlString The string to use as the contents of the web page
*/
- virtual void LoadHTMLString(const std::string& htmlString) = 0;
+ virtual void LoadHtmlString(const std::string& htmlString) = 0;
/**
* @brief Reloads the Web.
virtual void ClearHistory() = 0;
/**
- * @brief Clears the cache of Web.
- */
- virtual void ClearCache() = 0;
-
- /**
- * @brief Clears all the cookies of Web.
- */
- virtual void ClearCookies() = 0;
-
- /**
- * @brief Get cache model option. The default is DOCUMENT_VIEWER.
- *
- * @return The cache model option
- */
- virtual CacheModel GetCacheModel() const = 0;
-
- /**
- * @brief Set cache model option. The default is DOCUMENT_VIEWER.
- *
- * @param[in] cacheModel The cache model option
- */
- virtual void SetCacheModel(CacheModel cacheModel) = 0;
-
- /**
- * @brief Gets the cookie acceptance policy. The default is NO_THIRD_PARTY.
- *
- * @return The cookie acceptance policy
- */
- virtual CookieAcceptPolicy GetCookieAcceptPolicy() const = 0;
-
- /**
- * @brief Sets the cookie acceptance policy. The default is NO_THIRD_PARTY.
- *
- * @param[in] policy The cookie acceptance policy
- */
- virtual void SetCookieAcceptPolicy(CookieAcceptPolicy policy) = 0;
-
- /**
* @brief Get user agent string.
*
* @return The string value of user agent
virtual void SetUserAgent(const std::string& userAgent) = 0;
/**
- * @brief Returns whether JavaScript can be executable. The default is true.
- *
- * @return true if JavaScript executing is enabled, false otherwise
- */
- virtual bool IsJavaScriptEnabled() const = 0;
-
- /**
- * @brief Enables/disables JavaScript executing. The default is enabled.
- *
- * @param[in] enabled True if JavaScript executing is enabled, false otherwise
- */
- virtual void EnableJavaScript(bool enabled) = 0;
-
- /**
- * @brief Returns whether images can be loaded automatically. The default is true.
- *
- * @return true if images are loaded automatically, false otherwise
- */
- virtual bool AreImagesAutomaticallyLoaded() const = 0;
-
- /**
- * @brief Enables/disables auto loading of images. The default is enabled.
- *
- * @param[in] automatic True if images are loaded automatically, false otherwise
- */
- virtual void LoadImagesAutomatically(bool automatic) = 0;
-
- /**
- * @brief Gets the default text encoding name (e.g. UTF-8).
- *
- * @return The default text encoding name
- */
- virtual const std::string& GetDefaultTextEncodingName() const = 0;
-
- /**
- * @brief Sets the default text encoding name (e.g. UTF-8).
- *
- * @param[in] defaultTextEncodingName The default text encoding name
- */
- virtual void SetDefaultTextEncodingName(const std::string& defaultTextEncodingName) = 0;
-
- /**
- * @brief Returns the default font size in pixel. The default value is 16.
- *
- * @return The default font size
- */
- virtual int GetDefaultFontSize() const = 0;
-
- /**
- * @brief Sets the default font size in pixel. The default value is 16.
- *
- * @param[in] defaultFontSize A new default font size to set
- */
- virtual void SetDefaultFontSize(int defaultFontSize) = 0;
-
- /**
* @brief Sets size of Web Page.
*/
virtual void SetSize(int width, int height) = 0;
--- /dev/null
+#ifndef DALI_WEB_ENGINE_SETTINGS_H
+#define DALI_WEB_ENGINE_SETTINGS_H
+
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+
+namespace Dali
+{
+
+/**
+ * @brief A class WebEngineSettings for settings of web engine.
+ */
+class WebEngineSettings
+{
+
+public:
+
+ /**
+ * @brief Constructor.
+ */
+ WebEngineSettings() = default;
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~WebEngineSettings() = default;
+
+ /**
+ *@brief Allow running mixed contents or not.
+ *
+ * @param[in] allowed if true, allow to run mixed contents,
+ * otherwise not allow
+ */
+ virtual void AllowMixedContents( bool allowed ) = 0;
+
+ /**
+ * @brief Enable the spatial navigation or not.
+ *
+ * @param[in] enabled if true, use spatial navigation,
+ * otherwise to disable
+ */
+ virtual void EnableSpatialNavigation( bool enabled ) = 0;
+
+ /**
+ * @brief Get the default font size.
+ *
+ * @return defaut font size.
+ */
+ virtual uint32_t GetDefaultFontSize() const = 0;
+
+ /**
+ * @brief Set the default font size.
+ *
+ * @param[in] size a new default font size to set
+ */
+ virtual void SetDefaultFontSize( uint32_t size ) = 0;
+
+ /**
+ * @brief Enables/disables web security.
+ *
+ * @param[in] enabled if true, to enable the web security
+ * otherwise to disable
+ */
+ virtual void EnableWebSecurity( bool enabled ) = 0;
+
+ /**
+ * @brief Allow/Disallow file access from external url
+ *
+ * @param[in] allowed if true, to allow file access from external url
+ * otherwise to disallow
+ */
+ virtual void AllowFileAccessFromExternalUrl( bool allowed ) = 0;
+
+ /**
+ * @brief Check if javascript is enabled or not.
+ *
+ * @return true if enabled, false if disabled.
+ */
+ virtual bool IsJavaScriptEnabled() const = 0;
+
+ /**
+ * @brief Enable/Disable javascript
+ *
+ * @param[in] enabled if true, to enable javascript
+ * otherwise to disable
+ */
+ virtual void EnableJavaScript( bool enabled ) = 0;
+
+ /**
+ * @brief Allow if the scripts can open new windows.
+ *
+ * @param[in] allowed if true, the scripts can open new windows,
+ * otherwise not
+ */
+ virtual void AllowScriptsOpenWindows( bool allowed ) = 0;
+
+ /**
+ * @brief Check if images are loaded automatically or not.
+ *
+ * @return true if enabled, false if disabled.
+ */
+ virtual bool AreImagesLoadedAutomatically() const = 0;
+
+ /**
+ * @brief Allow to load images automatically
+ *
+ * @param[in] automatic if true, to load images automatically,
+ * otherwise not
+ */
+ virtual void AllowImagesLoadAutomatically( bool automatic ) = 0;
+
+ /**
+ * @brief Get the default encoding name.
+ *
+ * @return defaut encoding name.
+ */
+ virtual std::string GetDefaultTextEncodingName() const = 0;
+
+ /**
+ * @brief Set the default encoding name.
+ *
+ * @param[in] defaultTextEncodingName a default encoding name to set
+ */
+ virtual void SetDefaultTextEncodingName( const std::string& defaultTextEncodingName ) = 0;
+
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_SETTINGS_H
#include <dali/devel-api/adaptor-framework/web-engine.h>
// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/web-engine-back-forward-list.h>
+#include <dali/devel-api/adaptor-framework/web-engine-context.h>
+#include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
+#include <dali/devel-api/adaptor-framework/web-engine-settings.h>
#include <dali/internal/web-engine/common/web-engine-impl.h>
namespace Dali
return GetImplementation(*this).GetNativeImageSource();
}
+Dali::WebEngineSettings& WebEngine::GetSettings() const
+{
+ return GetImplementation( *this ).GetSettings();
+}
+
+Dali::WebEngineContext& WebEngine::GetContext() const
+{
+ return GetImplementation( *this ).GetContext();
+}
+
+Dali::WebEngineCookieManager& WebEngine::GetCookieManager() const
+{
+ return GetImplementation( *this ).GetCookieManager();
+}
+
+Dali::WebEngineBackForwardList& WebEngine::GetBackForwardList() const
+{
+ return GetImplementation( *this ).GetBackForwardList();
+}
+
void WebEngine::LoadUrl(const std::string& url)
{
return GetImplementation(*this).LoadUrl(url);
return GetImplementation(*this).GetUrl();
}
-void WebEngine::LoadHTMLString(const std::string& htmlString)
+void WebEngine::LoadHtmlString(const std::string& htmlString)
{
- GetImplementation(*this).LoadHTMLString(htmlString);
+ GetImplementation(*this).LoadHtmlString(htmlString);
}
void WebEngine::Reload()
return GetImplementation(*this).ClearHistory();
}
-void WebEngine::ClearCache()
-{
- return GetImplementation(*this).ClearCache();
-}
-
-void WebEngine::ClearCookies()
-{
- return GetImplementation(*this).ClearCookies();
-}
-
-Dali::WebEnginePlugin::CacheModel WebEngine::GetCacheModel() const
-{
- return GetImplementation(*this).GetCacheModel();
-}
-
-void WebEngine::SetCacheModel(Dali::WebEnginePlugin::CacheModel cacheModel)
-{
- GetImplementation(*this).SetCacheModel(cacheModel);
-}
-
-Dali::WebEnginePlugin::CookieAcceptPolicy WebEngine::GetCookieAcceptPolicy() const
-{
- return GetImplementation(*this).GetCookieAcceptPolicy();
-}
-
-void WebEngine::SetCookieAcceptPolicy(Dali::WebEnginePlugin::CookieAcceptPolicy policy)
-{
- GetImplementation(*this).SetCookieAcceptPolicy(policy);
-}
-
const std::string& WebEngine::GetUserAgent() const
{
return GetImplementation(*this).GetUserAgent();
GetImplementation(*this).SetUserAgent(userAgent);
}
-bool WebEngine::IsJavaScriptEnabled() const
-{
- return GetImplementation(*this).IsJavaScriptEnabled();
-}
-
-void WebEngine::EnableJavaScript(bool enabled)
-{
- GetImplementation(*this).EnableJavaScript(enabled);
-}
-
-bool WebEngine::AreImagesAutomaticallyLoaded() const
-{
- return GetImplementation(*this).AreImagesAutomaticallyLoaded();
-}
-
-void WebEngine::LoadImagesAutomatically(bool automatic)
-{
- GetImplementation(*this).LoadImagesAutomatically(automatic);
-}
-
-const std::string& WebEngine::GetDefaultTextEncodingName() const
-{
- return GetImplementation(*this).GetDefaultTextEncodingName();
-}
-
-void WebEngine::SetDefaultTextEncodingName(const std::string& defaultTextEncodingName)
-{
- GetImplementation(*this).SetDefaultTextEncodingName(defaultTextEncodingName);
-}
-
-int WebEngine::GetDefaultFontSize() const
-{
- return GetImplementation(*this).GetDefaultFontSize();
-}
-
-void WebEngine::SetDefaultFontSize(int defaultFontSize)
-{
- GetImplementation(*this).SetDefaultFontSize(defaultFontSize);
-}
-
void WebEngine::SetSize(int width, int height)
{
return GetImplementation(*this).SetSize(width, height);
NativeImageInterfacePtr GetNativeImageSource();
/**
+ * @brief Get settings of WebEngine.
+ */
+ Dali::WebEngineSettings& GetSettings() const;
+
+ /**
+ * @brief Get context of WebEngine.
+ */
+ Dali::WebEngineContext& GetContext() const;
+
+ /**
+ * @brief Get cookie manager of WebEngine.
+ */
+ Dali::WebEngineCookieManager& GetCookieManager() const;
+
+ /**
+ * @brief Get back-forward list of WebEngine.
+ */
+ Dali::WebEngineBackForwardList& GetBackForwardList() const;
+
+ /**
* @brief Loads a web page based on a given URL.
*
* @param [in] url The URL of the resource to load
*
* @param [in] htmlString The string to use as the contents of the web page
*/
- void LoadHTMLString(const std::string& htmlString);
+ void LoadHtmlString(const std::string& htmlString);
/**
* @brief Reloads the Web.
void ClearHistory();
/**
- * @brief Clears the cache of Web.
- */
- void ClearCache();
-
- /**
- * @brief Clears all the cookies of Web.
- */
- void ClearCookies();
-
- /**
- * @brief Get cache model option. The default is DOCUMENT_VIEWER.
- *
- * @return The cache model option
- */
- Dali::WebEnginePlugin::CacheModel GetCacheModel() const;
-
- /**
- * @brief Set cache model option. The default is DOCUMENT_VIEWER.
- *
- * @param[in] cacheModel The cache model option
- */
- void SetCacheModel(Dali::WebEnginePlugin::CacheModel cacheModel);
-
- /**
- * @brief Gets the cookie acceptance policy. The default is NO_THIRD_PARTY.
- *
- * @return The cookie acceptance policy
- */
- Dali::WebEnginePlugin::CookieAcceptPolicy GetCookieAcceptPolicy() const;
-
- /**
- * @brief Sets the cookie acceptance policy. The default is NO_THIRD_PARTY.
- *
- * @param[in] policy The cookie acceptance policy
- */
- void SetCookieAcceptPolicy(Dali::WebEnginePlugin::CookieAcceptPolicy policy);
-
- /**
* @brief Get user agent string.
*
* @return The string value of user agent
void SetUserAgent(const std::string& userAgent);
/**
- * @brief Returns whether JavaScript can be executable. The default is true.
- *
- * @return true if JavaScript executing is enabled, false otherwise
- */
- bool IsJavaScriptEnabled() const;
-
- /**
- * @brief Enables/disables JavaScript executing. The default is enabled.
- *
- * @param[in] enabled True if JavaScript executing is enabled, false otherwise
- */
- void EnableJavaScript(bool enabled);
-
- /**
- * @brief Returns whether JavaScript can be executable. The default is true.
- *
- * @return true if images are loaded automatically, false otherwise
- */
- bool AreImagesAutomaticallyLoaded() const;
-
- /**
- * @brief Enables/disables auto loading of images. The default is enabled.
- *
- * @param[in] automatic True if images are loaded automatically, false otherwise
- */
- void LoadImagesAutomatically(bool automatic);
-
- /**
- * @brief Gets the default text encoding name.
- *
- * @return The default text encoding name
- */
- const std::string& GetDefaultTextEncodingName() const;
-
- /**
- * @brief Sets the default text encoding name.
- *
- * @param[in] defaultTextEncodingName The default text encoding name
- */
- void SetDefaultTextEncodingName(const std::string& defaultTextEncodingName);
-
- /**
- * @brief Returns the default font size in pixel. The default value is 16.
- *
- * @return The default font size
- */
- int GetDefaultFontSize() const;
-
- /**
- * @brief Sets the default font size in pixel. The default value is 16.
- *
- * @param[in] defaultFontSize A new default font size to set
- */
- void SetDefaultFontSize(int defaultFontSize);
-
- /**
* @brief Sets the size of Web Pages.
*/
void SetSize(int width, int height);
${adaptor_devel_api_dir}/adaptor-framework/video-player.h
${adaptor_devel_api_dir}/adaptor-framework/video-player-plugin.h
${adaptor_devel_api_dir}/adaptor-framework/web-engine.h
+ ${adaptor_devel_api_dir}/adaptor-framework/web-engine-back-forward-list-item.h
+ ${adaptor_devel_api_dir}/adaptor-framework/web-engine-back-forward-list.h
+ ${adaptor_devel_api_dir}/adaptor-framework/web-engine-context.h
+ ${adaptor_devel_api_dir}/adaptor-framework/web-engine-cookie-manager.h
${adaptor_devel_api_dir}/adaptor-framework/web-engine-plugin.h
+ ${adaptor_devel_api_dir}/adaptor-framework/web-engine-settings.h
${adaptor_devel_api_dir}/adaptor-framework/key-extension-plugin.h
${adaptor_devel_api_dir}/adaptor-framework/virtual-keyboard.h
${adaptor_devel_api_dir}/adaptor-framework/physical-keyboard.h
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/devel-api/adaptor-framework/web-engine-back-forward-list.h>
+#include <dali/devel-api/adaptor-framework/web-engine-context.h>
+#include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
+#include <dali/devel-api/adaptor-framework/web-engine-settings.h>
#include <dali/internal/system/common/environment-variables.h>
#include <dali/public-api/adaptor-framework/native-image-source.h>
return mPlugin->GetNativeImageSource();
}
+Dali::WebEngineSettings& WebEngine::GetSettings() const
+{
+ return mPlugin->GetSettings();
+}
+
+Dali::WebEngineContext& WebEngine::GetContext() const
+{
+ return mPlugin->GetContext();
+}
+
+Dali::WebEngineCookieManager& WebEngine::GetCookieManager() const
+{
+ return mPlugin->GetCookieManager();
+}
+
+Dali::WebEngineBackForwardList& WebEngine::GetBackForwardList() const
+{
+ return mPlugin->GetBackForwardList();
+}
+
void WebEngine::LoadUrl( const std::string& url )
{
mPlugin->LoadUrl( url );
return mPlugin->GetUrl();
}
-void WebEngine::LoadHTMLString( const std::string& htmlString )
+void WebEngine::LoadHtmlString( const std::string& htmlString )
{
- mPlugin->LoadHTMLString( htmlString );
+ mPlugin->LoadHtmlString( htmlString );
}
void WebEngine::Reload()
mPlugin->AddJavaScriptMessageHandler( exposedObjectName, handler );
}
-void WebEngine::ClearHistory()
-{
- mPlugin->ClearHistory();
-}
-
-void WebEngine::ClearCache()
-{
- mPlugin->ClearCache();
-}
-
-void WebEngine::ClearCookies()
-{
- mPlugin->ClearCookies();
-}
-
-Dali::WebEnginePlugin::CacheModel WebEngine::GetCacheModel() const
-{
- return mPlugin->GetCacheModel();
-}
-
-void WebEngine::SetCacheModel( Dali::WebEnginePlugin::CacheModel cacheModel )
-{
- mPlugin->SetCacheModel( cacheModel );
-}
-
-Dali::WebEnginePlugin::CookieAcceptPolicy WebEngine::GetCookieAcceptPolicy() const
-{
- return mPlugin->GetCookieAcceptPolicy();
-}
-
-void WebEngine::SetCookieAcceptPolicy( Dali::WebEnginePlugin::CookieAcceptPolicy policy )
-{
- mPlugin->SetCookieAcceptPolicy( policy );
-}
-
const std::string& WebEngine::GetUserAgent() const
{
return mPlugin->GetUserAgent();
mPlugin->SetUserAgent( userAgent );
}
-bool WebEngine::IsJavaScriptEnabled() const
-{
- return mPlugin->IsJavaScriptEnabled();
-}
-
-void WebEngine::EnableJavaScript( bool enabled )
-{
- mPlugin->EnableJavaScript( enabled );
-}
-
-bool WebEngine::AreImagesAutomaticallyLoaded() const
-{
- return mPlugin->AreImagesAutomaticallyLoaded();
-}
-
-void WebEngine::LoadImagesAutomatically( bool automatic )
-{
- mPlugin->LoadImagesAutomatically( automatic );
-}
-
-const std::string& WebEngine::GetDefaultTextEncodingName() const
-{
- return mPlugin->GetDefaultTextEncodingName();
-}
-
-void WebEngine::SetDefaultTextEncodingName( const std::string& defaultTextEncodingName )
-{
- mPlugin->SetDefaultTextEncodingName( defaultTextEncodingName );
-}
-
-int WebEngine::GetDefaultFontSize() const
-{
- return mPlugin->GetDefaultFontSize();
-}
-
-void WebEngine::SetDefaultFontSize( int defaultFontSize )
+void WebEngine::ClearHistory()
{
- mPlugin->SetDefaultFontSize( defaultFontSize );
+ mPlugin->ClearHistory();
}
void WebEngine::SetSize( int width, int height )
namespace Dali
{
+// forward declaration
+class WebEngineBackForwardList;
+class WebEngineContext;
+class WebEngineCookieManager;
+class WebEngineSettings;
+
namespace Internal
{
Dali::NativeImageInterfacePtr GetNativeImageSource();
/**
+ * @copydoc Dali::WebEngine::GetSettings()
+ */
+ Dali::WebEngineSettings& GetSettings() const;
+
+ /**
+ * @copydoc Dali::WebEngine::GetContext()
+ */
+ Dali::WebEngineContext& GetContext() const;
+
+ /**
+ * @copydoc Dali::WebEngine::GetCookieManager()
+ */
+ Dali::WebEngineCookieManager& GetCookieManager() const;
+
+ /**
+ * @copydoc Dali::WebEngine::GetBackForwardList()
+ */
+ Dali::WebEngineBackForwardList& GetBackForwardList() const;
+
+ /**
* @copydoc Dali::WebEngine::LoadUrl()
*/
void LoadUrl( const std::string& url );
const std::string& GetUrl();
/**
- * @copydoc Dali::WebEngine::LoadHTMLString()
+ * @copydoc Dali::WebEngine::LoadHtmlString()
*/
- void LoadHTMLString( const std::string& htmlString );
+ void LoadHtmlString( const std::string& htmlString );
/**
* @copydoc Dali::WebEngine::Reload()
void AddJavaScriptMessageHandler( const std::string& exposedObjectName, std::function< void(const std::string&) > handler );
/**
- * @copydoc Dali::WebEngine::ClearHistory()
- */
- void ClearHistory();
-
- /**
- * @copydoc Dali::WebEngine::ClearCache()
- */
- void ClearCache();
-
- /**
- * @copydoc Dali::WebEngine::ClearCookies()
- */
- void ClearCookies();
-
- /**
- * @copydoc Dali::WebEngine::GetCacheModel()
- */
- Dali::WebEnginePlugin::CacheModel GetCacheModel() const;
-
- /**
- * @copydoc Dali::WebEngine::SetCacheModel()
- */
- void SetCacheModel( Dali::WebEnginePlugin::CacheModel cacheModel );
-
- /**
- * @copydoc Dali::WebEngine::GetCookieAcceptPolicy()
- */
- Dali::WebEnginePlugin::CookieAcceptPolicy GetCookieAcceptPolicy() const;
-
- /**
- * @copydoc Dali::WebEngine::SetCookieAcceptPolicy()
- */
- void SetCookieAcceptPolicy( Dali::WebEnginePlugin::CookieAcceptPolicy policy );
-
- /**
* @copydoc Dali::WebEngine::GetUserAgent()
*/
const std::string& GetUserAgent() const;
void SetUserAgent( const std::string& userAgent );
/**
- * @copydoc Dali::WebEngine::IsJavaScriptEnabled()
- */
- bool IsJavaScriptEnabled() const;
-
- /**
- * @copydoc Dali::WebEngine::EnableJavaScript()
- */
- void EnableJavaScript( bool enabled );
-
- /**
- * @copydoc Dali::WebEngine::AreImagesAutomaticallyLoaded()
- */
- bool AreImagesAutomaticallyLoaded() const;
-
- /**
- * @copydoc Dali::WebEngine::LoadImagesAutomatically()
- */
- void LoadImagesAutomatically( bool automatic );
-
- /**
- * @copydoc Dali::WebEngine::GetDefaultTextEncodingName()
- */
- const std::string& GetDefaultTextEncodingName() const;
-
- /**
- * @copydoc Dali::WebEngine::SetDefaultTextEncodingName()
- */
- void SetDefaultTextEncodingName( const std::string& defaultTextEncodingName );
-
- /**
- * @copydoc Dali::WebEngine::GetDefaultFontSize()
- */
- int GetDefaultFontSize() const;
-
- /**
- * @copydoc Dali::WebEngine::SetDefaultFontSize()
+ * @copydoc Dali::WebEngine::ClearHistory()
*/
- void SetDefaultFontSize( int defaultFontSize );
+ void ClearHistory();
/**
* @copydoc Dali::WebEngine::SetSize()