1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "back_forward_cache_options.h"
17 
18 #include <securec.h>
19 
20 #include "napi_parse_utils.h"
21 #include "nweb_log.h"
22 #include "business_error.h"
23 #include "web_errors.h"
24 
25 namespace OHOS::NWeb {
BackForwardCacheOptions()26 BackForwardCacheOptions::BackForwardCacheOptions()
27 {
28     WVLOG_D("Created a BackForwardCacheOptions class.");
29 }
30 
GetSize()31 int32_t BackForwardCacheOptions::GetSize()
32 {
33     return size_;
34 }
35 
GetTimeToLive()36 int32_t BackForwardCacheOptions::GetTimeToLive()
37 {
38     return timeToLive_;
39 }
40 
BackForwardCacheSupportedFeatures()41 BackForwardCacheSupportedFeatures::BackForwardCacheSupportedFeatures()
42 {
43     WVLOG_D("Created a BackForwardCacheSupportedFeatures class.");
44 }
45 
IsEnableNativeEmbed()46 bool BackForwardCacheSupportedFeatures::IsEnableNativeEmbed()
47 {
48     return nativeEmbed_;
49 }
50 
IsEnableMediaTakeOver()51 bool BackForwardCacheSupportedFeatures::IsEnableMediaTakeOver()
52 {
53     return mediaTakeOver_;
54 }
55 
56 }