2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include "toolkit-web-view-lite.h"
30 class WebViewLite: public Dali::BaseObject
39 Dali::WebEngineLitePlugin::WebEngineLiteSignalType mFinishedSignal;
44 inline WebViewLite& GetImplementation( Dali::WebEngineLite& webViewLite )
46 DALI_ASSERT_ALWAYS(webViewLite && "WebViewLite handle is empty");
47 BaseObject& handle = webViewLite.GetBaseObject();
48 return static_cast< Internal::Adaptor::WebEngineLite& >( handle );
51 inline const WebViewLite& GetImplementation( const Dali::WebEngineLite& webViewLite )
53 DALI_ASSERT_ALWAYS(webViewLite && "WebViewLite handle is empty");
54 const BaseObject& handle = webViewLite.GetBaseObject();
55 return static_cast< const Internal::Adaptor::WebEngineLite& >( handle );
58 } // namespace Adaptor
60 } // namespace Internal
63 /********************************************************************************/
64 /********************************* PUBLIC CLASS *******************************/
65 /********************************************************************************/
67 WebViewLite::WebViewLite()
71 WebViewLite::WebViewLite( Internal::Adaptor::WebEngineLite* internal )
72 : BaseHandle( internal )
76 WebViewLite::~WebViewLite()
80 WebViewLite WebViewLite::New()
82 Internal::Adaptor::WebEngineLite* webViewLite = new Internal::Adaptor::WebEngineLite();
84 return WebViewLite( webViewLite );
87 WebViewLite::WebViewLite( const WebViewLite& webViewLite )
88 : BaseHandle( webViewLite )
92 WebViewLite& WebViewLite::operator=( const WebViewLite& webViewLite )
94 BaseHandle::operator=( webViewLite );
98 WebViewLite WebViewLite::DownCast( BaseHandle handle )
100 WebViewLite webViewLite;
104 void WebViewLite::CreateInstance(int width, int height, int windowX, int windowY, const std::sting& locale, const std::string& timezoneID)
106 Internal::Adaptor::GetImplementation( *this ).CreateInstance(width, height, windowX, windowY, locale, timezoneID);
109 void WebViewLite::DestroyInstance()
111 Internal::Adaptor::GetImplementation( *this ).DestroyInstance();
114 void WebViewLite::LoadHtml(const std::string& path)
116 return Internal::Adaptor::GetImplementation( *this ).LoadHtml(path);
119 Dali::WebEngineLitePlugin::WebEngineLiteSignalType& WebViewLite::FinishedSignal()
121 return Internal::Adaptor::GetImplementation( *this ).mFinishedSignal;