2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/devel-api/controls/web-view/web-context.h>
22 #include <dali/devel-api/adaptor-framework/web-engine-security-origin.h>
28 WebContext::WebContext(Dali::WebEngineContext& context)
29 : mWebEngineContext(context)
33 WebContext::~WebContext()
37 Dali::WebEngineContext::CacheModel WebContext::GetCacheModel() const
39 return mWebEngineContext.GetCacheModel();
42 void WebContext::SetCacheModel(Dali::WebEngineContext::CacheModel cacheModel)
44 mWebEngineContext.SetCacheModel(cacheModel);
47 void WebContext::SetProxyUri(const std::string& uri)
49 mWebEngineContext.SetProxyUri(uri);
52 void WebContext::SetCertificateFilePath(const std::string& certificatePath)
54 mWebEngineContext.SetCertificateFilePath(certificatePath);
57 void WebContext::DisableCache(bool cacheDisabled)
59 mWebEngineContext.DisableCache(cacheDisabled);
62 void WebContext::SetDefaultProxyAuth(const std::string& username, const std::string& password)
64 mWebEngineContext.SetDefaultProxyAuth(username, password);
67 void WebContext::DeleteAllWebDatabase()
69 mWebEngineContext.DeleteAllWebDatabase();
72 bool WebContext::GetWebDatabaseOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback)
74 return mWebEngineContext.GetWebDatabaseOrigins(callback);
77 bool WebContext::DeleteWebDatabase(Dali::WebEngineSecurityOrigin& origin)
79 return mWebEngineContext.DeleteWebDatabase(origin);
82 bool WebContext::GetWebStorageOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback)
84 return mWebEngineContext.GetWebStorageOrigins(callback);
87 bool WebContext::GetWebStorageUsageForOrigin(Dali::WebEngineSecurityOrigin& origin, Dali::WebEngineContext::WebEngineStorageUsageAcquiredCallback callback)
89 return mWebEngineContext.GetWebStorageUsageForOrigin(origin, callback);
92 void WebContext::DeleteAllWebStorage()
94 mWebEngineContext.DeleteAllWebStorage();
97 bool WebContext::DeleteWebStorageOrigin(Dali::WebEngineSecurityOrigin& origin)
99 return mWebEngineContext.DeleteWebStorageOrigin(origin);
102 void WebContext::DeleteLocalFileSystem()
104 mWebEngineContext.DeleteLocalFileSystem();
107 void WebContext::ClearCache()
109 mWebEngineContext.ClearCache();
112 bool WebContext::DeleteApplicationCache(Dali::WebEngineSecurityOrigin& origin)
114 return mWebEngineContext.DeleteApplicationCache(origin);
117 void WebContext::GetFormPasswordList(Dali::WebEngineContext::WebEngineFormPasswordAcquiredCallback callback)
119 mWebEngineContext.GetFormPasswordList(callback);
122 void WebContext::RegisterDownloadStartedCallback(Dali::WebEngineContext::WebEngineDownloadStartedCallback callback)
124 mWebEngineContext.RegisterDownloadStartedCallback(callback);
127 void WebContext::RegisterMimeOverriddenCallback(Dali::WebEngineContext::WebEngineMimeOverriddenCallback callback)
129 mWebEngineContext.RegisterMimeOverriddenCallback(callback);
132 } // namespace Toolkit