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 const std::string& WebView::GetUrl()
75 return Dali::Toolkit::GetImpl( *this ).GetUrl();
78 void WebView::LoadHTMLString( const std::string& htmlString )
80 Dali::Toolkit::GetImpl( *this ).LoadHTMLString( htmlString );
83 void WebView::Reload()
85 Dali::Toolkit::GetImpl( *this ).Reload();
88 void WebView::StopLoading()
90 Dali::Toolkit::GetImpl( *this ).StopLoading();
93 bool WebView::CanGoForward()
95 return Dali::Toolkit::GetImpl( *this ).CanGoForward();
98 void WebView::GoForward()
100 Dali::Toolkit::GetImpl( *this ).GoForward();
103 bool WebView::CanGoBack()
105 return Dali::Toolkit::GetImpl( *this ).CanGoBack();
108 void WebView::GoBack()
110 Dali::Toolkit::GetImpl( *this ).GoBack();
113 void WebView::EvaluateJavaScript( const std::string& script )
115 Dali::Toolkit::GetImpl( *this ).EvaluateJavaScript( script );
118 void WebView::AddJavaScriptInterface( const std::string& exposedObjectName, const std::string& jsFunctionName, std::function< std::string(const std::string&) > callback )
120 Dali::Toolkit::GetImpl( *this ).AddJavaScriptInterface( exposedObjectName, jsFunctionName, callback );
123 void WebView::RemoveJavascriptInterface( const std::string& exposedObjectName, const std::string& jsFunctionName )
125 Dali::Toolkit::GetImpl( *this ).RemoveJavascriptInterface( exposedObjectName, jsFunctionName );
128 void WebView::ClearHistory()
130 Dali::Toolkit::GetImpl( *this ).ClearHistory();
133 void WebView::ClearCache()
135 Dali::Toolkit::GetImpl( *this ).ClearCache();
138 WebView::WebViewSignalType& WebView::PageLoadStartedSignal()
140 return Dali::Toolkit::GetImpl( *this ).PageLoadStartedSignal();
143 WebView::WebViewSignalType& WebView::PageLoadFinishedSignal()
145 return Dali::Toolkit::GetImpl( *this ).PageLoadFinishedSignal();
148 WebView::WebView( Internal::WebView& implementation )
149 : Control( implementation )
153 WebView::WebView( Dali::Internal::CustomActor* internal )
154 : Control( internal )
156 VerifyCustomActorPointer< Internal::WebView >( internal );
159 } // namespace Toolkit