Updates following web-engine devel header location change
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / web-view / web-context.cpp
index 1e0cbbd..128546b 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
 // CLASS HEADER
 #include <dali-toolkit/devel-api/controls/web-view/web-context.h>
 
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-security-origin.h>
+
 namespace Dali
 {
 namespace Toolkit
 {
-
-WebContext::WebContext( Dali::WebEngineContext& context)
-: mWebEngineContext( context )
+WebContext::WebContext(Dali::WebEngineContext& context)
+: mWebEngineContext(context)
 {
 }
 
@@ -37,39 +39,79 @@ Dali::WebEngineContext::CacheModel WebContext::GetCacheModel() const
   return mWebEngineContext.GetCacheModel();
 }
 
-void WebContext::SetCacheModel(Dali::WebEngineContext::CacheModel cacheModel )
+void WebContext::SetCacheModel(Dali::WebEngineContext::CacheModel cacheModel)
+{
+  mWebEngineContext.SetCacheModel(cacheModel);
+}
+
+void WebContext::SetProxyUri(const std::string& uri)
+{
+  mWebEngineContext.SetProxyUri(uri);
+}
+
+std::string WebContext::GetProxyUri() const
+{
+  return mWebEngineContext.GetProxyUri();
+}
+
+void WebContext::SetProxyBypassRule(const std::string& proxy, const std::string& bypass)
+{
+  mWebEngineContext.SetProxyBypassRule(proxy, bypass);
+}
+
+std::string WebContext::GetProxyBypassRule() const
+{
+  return mWebEngineContext.GetProxyBypassRule();
+}
+
+void WebContext::SetCertificateFilePath(const std::string& certificatePath)
+{
+  mWebEngineContext.SetCertificateFilePath(certificatePath);
+}
+
+std::string WebContext::GetCertificateFilePath() const
+{
+  return mWebEngineContext.GetCertificateFilePath();
+}
+
+void WebContext::SetDefaultProxyAuth(const std::string& username, const std::string& password)
 {
-  mWebEngineContext.SetCacheModel( cacheModel );
+  mWebEngineContext.SetDefaultProxyAuth(username, password);
 }
 
-void WebContext::SetProxyUri( const std::string& uri )
+void WebContext::DeleteAllWebDatabase()
 {
-  mWebEngineContext.SetProxyUri( uri );
+  mWebEngineContext.DeleteAllWebDatabase();
 }
 
-void WebContext::SetCertificateFilePath( const std::string& certificatePath )
+bool WebContext::GetWebDatabaseOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback)
 {
-  mWebEngineContext.SetCertificateFilePath( certificatePath );
+  return mWebEngineContext.GetWebDatabaseOrigins(callback);
 }
 
-void WebContext::DisableCache( bool cacheDisabled )
+bool WebContext::DeleteWebDatabase(Dali::WebEngineSecurityOrigin& origin)
 {
-  mWebEngineContext.DisableCache( cacheDisabled );
+  return mWebEngineContext.DeleteWebDatabase(origin);
 }
 
-void WebContext::SetDefaultProxyAuth( const std::string& username, const std::string& password )
+bool WebContext::GetWebStorageOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback)
 {
-  mWebEngineContext.SetDefaultProxyAuth( username, password );
+  return mWebEngineContext.GetWebStorageOrigins(callback);
 }
 
-void WebContext::DeleteWebDatabase()
+bool WebContext::GetWebStorageUsageForOrigin(Dali::WebEngineSecurityOrigin& origin, Dali::WebEngineContext::WebEngineStorageUsageAcquiredCallback callback)
 {
-  mWebEngineContext.DeleteWebDatabase();
+  return mWebEngineContext.GetWebStorageUsageForOrigin(origin, callback);
 }
 
-void WebContext::DeleteWebStorage()
+void WebContext::DeleteAllWebStorage()
 {
-  mWebEngineContext.DeleteWebStorage();
+  mWebEngineContext.DeleteAllWebStorage();
+}
+
+bool WebContext::DeleteWebStorage(Dali::WebEngineSecurityOrigin& origin)
+{
+  return mWebEngineContext.DeleteWebStorage(origin);
 }
 
 void WebContext::DeleteLocalFileSystem()
@@ -82,6 +124,115 @@ void WebContext::ClearCache()
   mWebEngineContext.ClearCache();
 }
 
-} // namespace Toolkit
+bool WebContext::DeleteApplicationCache(Dali::WebEngineSecurityOrigin& origin)
+{
+  return mWebEngineContext.DeleteApplicationCache(origin);
+}
+
+void WebContext::GetFormPasswordList(Dali::WebEngineContext::WebEngineFormPasswordAcquiredCallback callback)
+{
+  mWebEngineContext.GetFormPasswordList(callback);
+}
+
+void WebContext::RegisterDownloadStartedCallback(Dali::WebEngineContext::WebEngineDownloadStartedCallback callback)
+{
+  mWebEngineContext.RegisterDownloadStartedCallback(callback);
+}
+
+void WebContext::RegisterMimeOverriddenCallback(Dali::WebEngineContext::WebEngineMimeOverriddenCallback callback)
+{
+  mWebEngineContext.RegisterMimeOverriddenCallback(callback);
+}
+
+void WebContext::RegisterRequestInterceptedCallback(Dali::WebEngineContext::WebEngineRequestInterceptedCallback callback)
+{
+  mWebEngineContext.RegisterRequestInterceptedCallback(callback);
+}
+
+void WebContext::EnableCache(bool cacheEnabled)
+{
+  mWebEngineContext.EnableCache(cacheEnabled);
+}
+
+bool WebContext::IsCacheEnabled() const
+{
+  return mWebEngineContext.IsCacheEnabled();
+}
 
+void WebContext::SetAppId(const std::string& appId)
+{
+  mWebEngineContext.SetAppId(appId);
+}
+
+bool WebContext::SetAppVersion(const std::string& appVersion)
+{
+  return mWebEngineContext.SetAppVersion(appVersion);
+}
+
+void WebContext::SetApplicationType(const Dali::WebEngineContext::ApplicationType applicationType)
+{
+  mWebEngineContext.SetApplicationType(applicationType);
+}
+
+void WebContext::SetTimeOffset(float timeOffset)
+{
+  mWebEngineContext.SetTimeOffset(timeOffset);
+}
+
+void WebContext::SetTimeZoneOffset(float timeZoneOffset, float daylightSavingTime)
+{
+  mWebEngineContext.SetTimeZoneOffset(timeZoneOffset, daylightSavingTime);
+}
+
+void WebContext::SetDefaultZoomFactor(float zoomFactor)
+{
+  mWebEngineContext.SetDefaultZoomFactor(zoomFactor);
+}
+
+float WebContext::GetDefaultZoomFactor() const
+{
+  return mWebEngineContext.GetDefaultZoomFactor();
+}
+
+void WebContext::RegisterUrlSchemesAsCorsEnabled(const std::vector<std::string>& schemes)
+{
+  mWebEngineContext.RegisterUrlSchemesAsCorsEnabled(schemes);
+}
+
+void WebContext::RegisterJsPluginMimeTypes(const std::vector<std::string>& mimeTypes)
+{
+  mWebEngineContext.RegisterJsPluginMimeTypes(mimeTypes);
+}
+
+bool WebContext::DeleteAllApplicationCache()
+{
+  return mWebEngineContext.DeleteAllApplicationCache();
+}
+
+bool WebContext::DeleteAllWebIndexedDatabase()
+{
+  return mWebEngineContext.DeleteAllWebIndexedDatabase();
+}
+
+void WebContext::DeleteFormPasswordDataList(const std::vector<std::string>& list)
+{
+  mWebEngineContext.DeleteFormPasswordDataList(list);
+}
+
+void WebContext::DeleteAllFormPasswordData()
+{
+  mWebEngineContext.DeleteAllFormPasswordData();
+}
+
+void WebContext::DeleteAllFormCandidateData()
+{
+  mWebEngineContext.DeleteAllFormCandidateData();
+}
+
+bool WebContext::FreeUnusedMemory()
+{
+  return mWebEngineContext.FreeUnusedMemory();
+}
+
+} // namespace Toolkit
 } // namespace Dali