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 "ohos_nweb/bridge/ark_web_engine_prefetch_args_impl.h"
17 
18 namespace OHOS::ArkWeb {
19 
ArkWebEnginePrefetchArgsImpl(std::shared_ptr<OHOS::NWeb::NWebEnginePrefetchArgs> nweb_engine_pre_args)20 ArkWebEnginePrefetchArgsImpl::ArkWebEnginePrefetchArgsImpl(
21     std::shared_ptr<OHOS::NWeb::NWebEnginePrefetchArgs> nweb_engine_pre_args)
22     : nweb_engine_pre_args_(nweb_engine_pre_args)
23 {}
24 
GetUrl()25 ArkWebString ArkWebEnginePrefetchArgsImpl::GetUrl()
26 {
27     return ArkWebStringClassToStruct(nweb_engine_pre_args_->GetUrl());
28 }
29 
GetMethod()30 ArkWebString ArkWebEnginePrefetchArgsImpl::GetMethod()
31 {
32     return ArkWebStringClassToStruct(nweb_engine_pre_args_->GetMethod());
33 }
34 
GetFormData()35 ArkWebString ArkWebEnginePrefetchArgsImpl::GetFormData()
36 {
37     return ArkWebStringClassToStruct(nweb_engine_pre_args_->GetFormData());
38 }
39 } // namespace OHOS::ArkWeb
40