Merge "Add APIs of webview back forward list" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / web-view / web-context.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 1e0cbbd..413f5ca
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * 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.
 // CLASS HEADER
 #include <dali-toolkit/devel-api/controls/web-view/web-context.h>
 
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/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,64 @@ 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);
+}
+
+void WebContext::SetCertificateFilePath(const std::string& certificatePath)
+{
+  mWebEngineContext.SetCertificateFilePath(certificatePath);
+}
+
+void WebContext::DisableCache(bool cacheDisabled)
+{
+  mWebEngineContext.DisableCache(cacheDisabled);
+}
+
+void WebContext::SetDefaultProxyAuth(const std::string& username, const std::string& password)
+{
+  mWebEngineContext.SetDefaultProxyAuth(username, password);
+}
+
+void WebContext::DeleteAllWebDatabase()
 {
-  mWebEngineContext.SetCacheModel( cacheModel );
+  mWebEngineContext.DeleteAllWebDatabase();
 }
 
-void WebContext::SetProxyUri( const std::string& uri )
+bool WebContext::GetWebDatabaseOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback)
 {
-  mWebEngineContext.SetProxyUri( uri );
+  return mWebEngineContext.GetWebDatabaseOrigins(callback);
 }
 
-void WebContext::SetCertificateFilePath( const std::string& certificatePath )
+bool WebContext::DeleteWebDatabase(Dali::WebEngineSecurityOrigin& origin)
 {
-  mWebEngineContext.SetCertificateFilePath( certificatePath );
+  return mWebEngineContext.DeleteWebDatabase(origin);
 }
 
-void WebContext::DisableCache( bool cacheDisabled )
+bool WebContext::GetWebStorageOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback)
 {
-  mWebEngineContext.DisableCache( cacheDisabled );
+  return mWebEngineContext.GetWebStorageOrigins(callback);
 }
 
-void WebContext::SetDefaultProxyAuth( const std::string& username, const std::string& password )
+bool WebContext::GetWebStorageUsageForOrigin(Dali::WebEngineSecurityOrigin& origin, Dali::WebEngineContext::WebEngineStorageUsageAcquiredCallback callback)
 {
-  mWebEngineContext.SetDefaultProxyAuth( username, password );
+  return mWebEngineContext.GetWebStorageUsageForOrigin(origin, callback);
 }
 
-void WebContext::DeleteWebDatabase()
+void WebContext::DeleteAllWebStorage()
 {
-  mWebEngineContext.DeleteWebDatabase();
+  mWebEngineContext.DeleteAllWebStorage();
 }
 
-void WebContext::DeleteWebStorage()
+bool WebContext::DeleteWebStorageOrigin(Dali::WebEngineSecurityOrigin& origin)
 {
-  mWebEngineContext.DeleteWebStorage();
+  return mWebEngineContext.DeleteWebStorageOrigin(origin);
 }
 
 void WebContext::DeleteLocalFileSystem()
@@ -82,6 +109,25 @@ 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);
+}
+
+} // namespace Toolkit
 } // namespace Dali