Merge "Allow Large font size in dali" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / web-view / web-context.cpp
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali-toolkit/devel-api/controls/web-view/web-context.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/devel-api/adaptor-framework/web-engine-security-origin.h>
23
24 namespace Dali
25 {
26 namespace Toolkit
27 {
28 WebContext::WebContext(Dali::WebEngineContext& context)
29 : mWebEngineContext(context)
30 {
31 }
32
33 WebContext::~WebContext()
34 {
35 }
36
37 Dali::WebEngineContext::CacheModel WebContext::GetCacheModel() const
38 {
39   return mWebEngineContext.GetCacheModel();
40 }
41
42 void WebContext::SetCacheModel(Dali::WebEngineContext::CacheModel cacheModel)
43 {
44   mWebEngineContext.SetCacheModel(cacheModel);
45 }
46
47 void WebContext::SetProxyUri(const std::string& uri)
48 {
49   mWebEngineContext.SetProxyUri(uri);
50 }
51
52 void WebContext::SetCertificateFilePath(const std::string& certificatePath)
53 {
54   mWebEngineContext.SetCertificateFilePath(certificatePath);
55 }
56
57 void WebContext::DisableCache(bool cacheDisabled)
58 {
59   mWebEngineContext.DisableCache(cacheDisabled);
60 }
61
62 void WebContext::SetDefaultProxyAuth(const std::string& username, const std::string& password)
63 {
64   mWebEngineContext.SetDefaultProxyAuth(username, password);
65 }
66
67 void WebContext::DeleteAllWebDatabase()
68 {
69   mWebEngineContext.DeleteAllWebDatabase();
70 }
71
72 bool WebContext::GetWebDatabaseOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback)
73 {
74   return mWebEngineContext.GetWebDatabaseOrigins(callback);
75 }
76
77 bool WebContext::DeleteWebDatabase(Dali::WebEngineSecurityOrigin& origin)
78 {
79   return mWebEngineContext.DeleteWebDatabase(origin);
80 }
81
82 bool WebContext::GetWebStorageOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback)
83 {
84   return mWebEngineContext.GetWebStorageOrigins(callback);
85 }
86
87 bool WebContext::GetWebStorageUsageForOrigin(Dali::WebEngineSecurityOrigin& origin, Dali::WebEngineContext::WebEngineStorageUsageAcquiredCallback callback)
88 {
89   return mWebEngineContext.GetWebStorageUsageForOrigin(origin, callback);
90 }
91
92 void WebContext::DeleteAllWebStorage()
93 {
94   mWebEngineContext.DeleteAllWebStorage();
95 }
96
97 bool WebContext::DeleteWebStorageOrigin(Dali::WebEngineSecurityOrigin& origin)
98 {
99   return mWebEngineContext.DeleteWebStorageOrigin(origin);
100 }
101
102 void WebContext::DeleteLocalFileSystem()
103 {
104   mWebEngineContext.DeleteLocalFileSystem();
105 }
106
107 void WebContext::ClearCache()
108 {
109   mWebEngineContext.ClearCache();
110 }
111
112 bool WebContext::DeleteApplicationCache(Dali::WebEngineSecurityOrigin& origin)
113 {
114   return mWebEngineContext.DeleteApplicationCache(origin);
115 }
116
117 void WebContext::GetFormPasswordList(Dali::WebEngineContext::WebEngineFormPasswordAcquiredCallback callback)
118 {
119   mWebEngineContext.GetFormPasswordList(callback);
120 }
121
122 void WebContext::RegisterDownloadStartedCallback(Dali::WebEngineContext::WebEngineDownloadStartedCallback callback)
123 {
124   mWebEngineContext.RegisterDownloadStartedCallback(callback);
125 }
126
127 void WebContext::RegisterMimeOverriddenCallback(Dali::WebEngineContext::WebEngineMimeOverriddenCallback callback)
128 {
129   mWebEngineContext.RegisterMimeOverriddenCallback(callback);
130 }
131
132 } // namespace Toolkit
133 } // namespace Dali