Merge "Implement some new ewk apis in web view." into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / web-view / web-context.cpp
1 /*
2  * Copyright (c) 2020 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
26 WebContext::WebContext( Dali::WebEngineContext& context)
27 : mWebEngineContext( context )
28 {
29 }
30
31 WebContext::~WebContext()
32 {
33 }
34
35 Dali::WebEngineContext::CacheModel WebContext::GetCacheModel() const
36 {
37   return mWebEngineContext.GetCacheModel();
38 }
39
40 void WebContext::SetCacheModel(Dali::WebEngineContext::CacheModel cacheModel )
41 {
42   mWebEngineContext.SetCacheModel( cacheModel );
43 }
44
45 void WebContext::SetProxyUri( const std::string& uri )
46 {
47   mWebEngineContext.SetProxyUri( uri );
48 }
49
50 void WebContext::SetCertificateFilePath( const std::string& certificatePath )
51 {
52   mWebEngineContext.SetCertificateFilePath( certificatePath );
53 }
54
55 void WebContext::DisableCache( bool cacheDisabled )
56 {
57   mWebEngineContext.DisableCache( cacheDisabled );
58 }
59
60 void WebContext::SetDefaultProxyAuth( const std::string& username, const std::string& password )
61 {
62   mWebEngineContext.SetDefaultProxyAuth( username, password );
63 }
64
65 void WebContext::DeleteWebDatabase()
66 {
67   mWebEngineContext.DeleteWebDatabase();
68 }
69
70 void WebContext::DeleteWebStorage()
71 {
72   mWebEngineContext.DeleteWebStorage();
73 }
74
75 void WebContext::DeleteLocalFileSystem()
76 {
77   mWebEngineContext.DeleteLocalFileSystem();
78 }
79
80 void WebContext::ClearCache()
81 {
82   mWebEngineContext.ClearCache();
83 }
84
85 } // namespace Toolkit
86
87 } // namespace Dali