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_native_embed_info_impl.h"
17 
18 #include "base/bridge/ark_web_bridge_macros.h"
19 
20 namespace OHOS::ArkWeb {
21 
ArkWebNativeEmbedInfoImpl(std::shared_ptr<OHOS::NWeb::NWebNativeEmbedInfo> nweb_native_embed_info)22 ArkWebNativeEmbedInfoImpl::ArkWebNativeEmbedInfoImpl(
23     std::shared_ptr<OHOS::NWeb::NWebNativeEmbedInfo> nweb_native_embed_info)
24     : nweb_native_embed_info_(nweb_native_embed_info)
25 {}
26 
GetWidth()27 int32_t ArkWebNativeEmbedInfoImpl::GetWidth()
28 {
29     return nweb_native_embed_info_->GetWidth();
30 }
31 
GetHeight()32 int32_t ArkWebNativeEmbedInfoImpl::GetHeight()
33 {
34     return nweb_native_embed_info_->GetHeight();
35 }
36 
GetId()37 ArkWebString ArkWebNativeEmbedInfoImpl::GetId()
38 {
39     return ArkWebStringClassToStruct(nweb_native_embed_info_->GetId());
40 }
41 
GetSrc()42 ArkWebString ArkWebNativeEmbedInfoImpl::GetSrc()
43 {
44     return ArkWebStringClassToStruct(nweb_native_embed_info_->GetSrc());
45 }
46 
GetUrl()47 ArkWebString ArkWebNativeEmbedInfoImpl::GetUrl()
48 {
49     return ArkWebStringClassToStruct(nweb_native_embed_info_->GetUrl());
50 }
51 
GetType()52 ArkWebString ArkWebNativeEmbedInfoImpl::GetType()
53 {
54     return ArkWebStringClassToStruct(nweb_native_embed_info_->GetType());
55 }
56 
GetTag()57 ArkWebString ArkWebNativeEmbedInfoImpl::GetTag()
58 {
59     return ArkWebStringClassToStruct(nweb_native_embed_info_->GetTag());
60 }
61 
GetParams()62 ArkWebStringMap ArkWebNativeEmbedInfoImpl::GetParams()
63 {
64     return ArkWebStringMapClassToStruct(nweb_native_embed_info_->GetParams());
65 }
66 
GetX()67 int32_t ArkWebNativeEmbedInfoImpl::GetX()
68 {
69     return nweb_native_embed_info_->GetX();
70 }
71 
GetY()72 int32_t ArkWebNativeEmbedInfoImpl::GetY()
73 {
74     return nweb_native_embed_info_->GetY();
75 }
76 
77 } // namespace OHOS::ArkWeb
78