2 * Copyright (c) 2018 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 <dali-toolkit/devel-api/controls/web-view/web-view.h>
22 #include <dali-toolkit/internal/controls/web-view/web-view-impl.h>
34 WebView::WebView( const WebView& WebView )
39 WebView& WebView::operator=( const WebView& view )
43 Control::operator=( view );
53 WebView WebView::New()
55 return Internal::WebView::New();
58 WebView WebView::New( const std::string& locale, const std::string& timezoneId )
60 return Internal::WebView::New( locale, timezoneId );
63 WebView WebView::DownCast( BaseHandle handle )
65 return Control::DownCast< WebView, Internal::WebView >( handle );
68 void WebView::LoadUrl( const std::string& url )
70 Dali::Toolkit::GetImpl( *this ).LoadUrl( url );
73 void WebView::LoadHTMLString( const std::string& htmlString )
75 Dali::Toolkit::GetImpl( *this ).LoadHTMLString( htmlString );
78 void WebView::Reload()
80 Dali::Toolkit::GetImpl( *this ).Reload();
83 void WebView::StopLoading()
85 Dali::Toolkit::GetImpl( *this ).StopLoading();
88 void WebView::Suspend()
90 Dali::Toolkit::GetImpl( *this ).Suspend();
93 void WebView::Resume()
95 Dali::Toolkit::GetImpl( *this ).Resume();
98 bool WebView::CanGoForward()
100 return Dali::Toolkit::GetImpl( *this ).CanGoForward();
103 void WebView::GoForward()
105 Dali::Toolkit::GetImpl( *this ).GoForward();
108 bool WebView::CanGoBack()
110 return Dali::Toolkit::GetImpl( *this ).CanGoBack();
113 void WebView::GoBack()
115 Dali::Toolkit::GetImpl( *this ).GoBack();
118 void WebView::EvaluateJavaScript( const std::string& script, std::function< void( const std::string& ) > resultHandler )
120 Dali::Toolkit::GetImpl( *this ).EvaluateJavaScript( script, resultHandler );
123 void WebView::EvaluateJavaScript( const std::string& script )
125 Dali::Toolkit::GetImpl( *this ).EvaluateJavaScript( script, nullptr );
128 void WebView::AddJavaScriptMessageHandler( const std::string& exposedObjectName, std::function< void( const std::string& ) > handler )
130 Dali::Toolkit::GetImpl( *this ).AddJavaScriptMessageHandler( exposedObjectName, handler );
133 void WebView::ClearHistory()
135 Dali::Toolkit::GetImpl( *this ).ClearHistory();
138 void WebView::ClearCache()
140 Dali::Toolkit::GetImpl( *this ).ClearCache();
143 void WebView::ClearCookies()
145 Dali::Toolkit::GetImpl( *this ).ClearCookies();
148 WebView::WebViewPageLoadSignalType& WebView::PageLoadStartedSignal()
150 return Dali::Toolkit::GetImpl( *this ).PageLoadStartedSignal();
153 WebView::WebViewPageLoadSignalType& WebView::PageLoadFinishedSignal()
155 return Dali::Toolkit::GetImpl( *this ).PageLoadFinishedSignal();
158 WebView::WebViewPageLoadErrorSignalType& WebView::PageLoadErrorSignal()
160 return Dali::Toolkit::GetImpl( *this ).PageLoadErrorSignal();
163 WebView::WebView( Internal::WebView& implementation )
164 : Control( implementation )
168 WebView::WebView( Dali::Internal::CustomActor* internal )
169 : Control( internal )
171 VerifyCustomActorPointer< Internal::WebView >( internal );
174 } // namespace Toolkit