c72012c7a0b57942cc051a64c1eac152144d2fb0
[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 namespace Dali
22 {
23 namespace Toolkit
24 {
25 WebContext::WebContext(Dali::WebEngineContext& context)
26 : mWebEngineContext(context)
27 {
28 }
29
30 WebContext::~WebContext()
31 {
32 }
33
34 Dali::WebEngineContext::CacheModel WebContext::GetCacheModel() const
35 {
36   return mWebEngineContext.GetCacheModel();
37 }
38
39 void WebContext::SetCacheModel(Dali::WebEngineContext::CacheModel cacheModel)
40 {
41   mWebEngineContext.SetCacheModel(cacheModel);
42 }
43
44 void WebContext::SetProxyUri(const std::string& uri)
45 {
46   mWebEngineContext.SetProxyUri(uri);
47 }
48
49 void WebContext::SetCertificateFilePath(const std::string& certificatePath)
50 {
51   mWebEngineContext.SetCertificateFilePath(certificatePath);
52 }
53
54 void WebContext::DisableCache(bool cacheDisabled)
55 {
56   mWebEngineContext.DisableCache(cacheDisabled);
57 }
58
59 void WebContext::SetDefaultProxyAuth(const std::string& username, const std::string& password)
60 {
61   mWebEngineContext.SetDefaultProxyAuth(username, password);
62 }
63
64 void WebContext::DeleteWebDatabase()
65 {
66   mWebEngineContext.DeleteWebDatabase();
67 }
68
69 void WebContext::DeleteWebStorage()
70 {
71   mWebEngineContext.DeleteWebStorage();
72 }
73
74 void WebContext::DeleteLocalFileSystem()
75 {
76   mWebEngineContext.DeleteLocalFileSystem();
77 }
78
79 void WebContext::ClearCache()
80 {
81   mWebEngineContext.ClearCache();
82 }
83
84 } // namespace Toolkit
85
86 } // namespace Dali