X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Fweb-view%2Fweb-context.cpp;h=2a7090b2476fc99e200d2b135be65a7cda7f94fb;hb=4bcf7c57006f4241565c31c13dde06b8eea99855;hp=1e0cbbdd84d608ba25fa8d9676defc7dd8afdc97;hpb=d30d320c158f38d9c1ff49e01627467d3950698d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/controls/web-view/web-context.cpp b/dali-toolkit/devel-api/controls/web-view/web-context.cpp index 1e0cbbd..2a7090b 100755 --- a/dali-toolkit/devel-api/controls/web-view/web-context.cpp +++ b/dali-toolkit/devel-api/controls/web-view/web-context.cpp @@ -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. @@ -18,13 +18,15 @@ // CLASS HEADER #include +// EXTERNAL INCLUDES +#include + namespace Dali { namespace Toolkit { - -WebContext::WebContext( Dali::WebEngineContext& context) -: mWebEngineContext( context ) +WebContext::WebContext(Dali::WebEngineContext& context) +: mWebEngineContext(context) { } @@ -37,39 +39,59 @@ 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::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 +104,130 @@ 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::EnableCache(bool cacheEnabled) +{ + mWebEngineContext.EnableCache(cacheEnabled); +} + +bool WebContext::IsCacheEnabled() const +{ + return mWebEngineContext.IsCacheEnabled(); +} + +std::string WebContext::GetContextCertificateFile() const +{ + return mWebEngineContext.GetContextCertificateFile(); +} + +void WebContext::SetContextAppId(const std::string& appID) +{ + mWebEngineContext.SetContextAppId(appID); +} + +bool WebContext::SetContextAppVersion(const std::string& appVersion) +{ + return mWebEngineContext.SetContextAppVersion(appVersion); +} + +void WebContext::SetContextApplicationType(const Dali::WebEngineContext::ApplicationType applicationType) +{ + mWebEngineContext.SetContextApplicationType(applicationType); +} + +void WebContext::SetContextTimeOffset(float timeOffset) +{ + mWebEngineContext.SetContextTimeOffset(timeOffset); +} + +void WebContext::SetContextTimeZoneOffset(float timeZoneOffset, float daylightSavingTime) +{ + mWebEngineContext.SetContextTimeZoneOffset(timeZoneOffset, daylightSavingTime); +} + +void WebContext::RegisterUrlSchemesAsCorsEnabled(const std::vector& schemes) +{ + mWebEngineContext.RegisterUrlSchemesAsCorsEnabled(schemes); +} + +void WebContext::RegisterJsPluginMimeTypes(const std::vector& mimeTypes) +{ + mWebEngineContext.RegisterJsPluginMimeTypes(mimeTypes); +} + +void WebContext::SetDefaultZoomFactor(float zoomFactor) +{ + mWebEngineContext.SetDefaultZoomFactor(zoomFactor); +} + +float WebContext::GetContextDefaultZoomFactor() const +{ + return mWebEngineContext.GetContextDefaultZoomFactor(); +} + +bool WebContext::DeleteAllApplicationCache() +{ + return mWebEngineContext.DeleteAllApplicationCache(); +} + +bool WebContext::DeleteAllWebIndexedDatabase() +{ + return mWebEngineContext.DeleteAllWebIndexedDatabase(); +} +void WebContext::DeleteFormPasswordDataList(const std::vector& list) +{ + mWebEngineContext.DeleteFormPasswordDataList(list); +} + +void WebContext::DeleteAllFormPasswordData() +{ + mWebEngineContext.DeleteAllFormPasswordData(); +} + +void WebContext::DeleteAllFormCandidateData() +{ + mWebEngineContext.DeleteAllFormCandidateData(); +} + +std::string WebContext::GetContextProxy() const +{ + return mWebEngineContext.GetContextProxy(); +} + +void WebContext::SetContextProxy(const std::string& proxy, const std::string& bypass) +{ + mWebEngineContext.SetContextProxy(proxy, bypass); +} + +std::string WebContext::GetProxyBypassRule() const +{ + return mWebEngineContext.GetProxyBypassRule(); +} + +bool WebContext::FreeUnusedMemory() +{ + return mWebEngineContext.FreeUnusedMemory(); +} + +} // namespace Toolkit } // namespace Dali