5f5160dade47c02ba5771a15ce0293ec227314a7
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-web-engine.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 #include "toolkit-timer.h"
19
20 #include <dali/devel-api/adaptor-framework/web-engine.h>
21 #include <dali/devel-api/adaptor-framework/web-engine-back-forward-list.h>
22 #include <dali/devel-api/adaptor-framework/web-engine-back-forward-list-item.h>
23 #include <dali/devel-api/adaptor-framework/web-engine-context.h>
24 #include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
25 #include <dali/devel-api/adaptor-framework/web-engine-settings.h>
26 #include <dali/public-api/adaptor-framework/native-image-source.h>
27 #include <dali/public-api/images/pixel-data.h>
28 #include <dali/public-api/object/any.h>
29 #include <dali/public-api/object/base-object.h>
30 #include <toolkit-application.h>
31
32 namespace Dali
33 {
34
35 namespace Internal
36 {
37
38 namespace Adaptor
39 {
40
41 class WebEngine;
42
43 namespace
44 {
45 static WebEngine* gInstance = NULL;
46 static int gInstanceCount = 0;
47
48 bool OnGoBack();
49 bool OnGoForward();
50 bool OnLoadUrl();
51 bool OnEvaluteJavaScript();
52 bool OnClearHistory();
53 bool OnPlainTextReceived();
54
55 static void ConnectToGlobalSignal( bool (*func)() )
56 {
57   Dali::Timer timer = Dali::Timer::New( 0 );
58   timer.TickSignal().Connect( func );
59 }
60
61 static void DisconnectFromGlobalSignal( bool (*func)() )
62 {
63   Dali::Timer timer = Dali::Timer::New( 0 );
64   timer.TickSignal().Disconnect( func );
65 }
66 }
67
68 class MockWebEngineContext : public Dali::WebEngineContext
69 {
70 public:
71   MockWebEngineContext()
72     : mockModel( Dali::WebEngineContext::CacheModel::DOCUMENT_VIEWER )
73   {
74   }
75
76   Dali::WebEngineContext::CacheModel GetCacheModel() const override
77   {
78     return mockModel;
79   }
80
81   void SetCacheModel( Dali::WebEngineContext::CacheModel cacheModel ) override
82   {
83     mockModel = cacheModel;
84   }
85
86   void SetProxyUri( const std::string& uri ) override
87   {
88   }
89
90   void SetDefaultProxyAuth( const std::string& username, const std::string& password ) override
91   {
92   }
93
94   void SetCertificateFilePath( const std::string& certificatePath ) override
95   {
96   }
97
98   void DeleteWebDatabase() override
99   {
100   }
101
102   void DeleteWebStorage() override
103   {
104   }
105
106   void DeleteLocalFileSystem() override
107   {
108   }
109
110   void DisableCache( bool cacheDisabled ) override
111   {
112   }
113
114   void ClearCache() override
115   {
116   }
117
118 private:
119   Dali::WebEngineContext::CacheModel mockModel;
120 };
121
122 class MockWebEngineCookieManager : public Dali::WebEngineCookieManager
123 {
124 public:
125   MockWebEngineCookieManager()
126     : mockCookieAcceptPolicy( Dali::WebEngineCookieManager::CookieAcceptPolicy::NO_THIRD_PARTY )
127   {
128   }
129
130   void SetCookieAcceptPolicy( Dali::WebEngineCookieManager::CookieAcceptPolicy policy ) override
131   {
132     mockCookieAcceptPolicy = policy;
133   }
134
135   Dali::WebEngineCookieManager::CookieAcceptPolicy GetCookieAcceptPolicy() const override
136   {
137     return mockCookieAcceptPolicy;
138   }
139
140   void ClearCookies() override
141   {
142   }
143
144   void SetPersistentStorage( const std::string& path, Dali::WebEngineCookieManager::CookiePersistentStorage storage ) override
145   {
146   }
147
148 private:
149   Dali::WebEngineCookieManager::CookieAcceptPolicy mockCookieAcceptPolicy;
150 };
151
152 class MockWebEngineBackForwardListItem : public Dali::WebEngineBackForwardListItem
153 {
154 public:
155   MockWebEngineBackForwardListItem()
156     : mockUrl( "http://url" ),
157       mockTitle( "title" ),
158       mockOriginalUrl( "http://originalurl" )
159   {
160   }
161
162   std::string GetUrl() const override
163   {
164     return mockUrl;
165   }
166
167   std::string GetTitle() const override
168   {
169     return mockTitle;
170   }
171
172   std::string GetOriginalUrl() const override
173   {
174     return mockOriginalUrl;
175   }
176
177 private:
178   std::string mockUrl;
179   std::string mockTitle;
180   std::string mockOriginalUrl;
181 };
182
183 class MockWebEngineBackForwardList : public Dali::WebEngineBackForwardList
184 {
185 public:
186   MockWebEngineBackForwardList( )
187     : mockItem(),
188       pMockItem( &mockItem )
189   {
190   }
191
192   Dali::WebEngineBackForwardListItem& GetCurrentItem() const override
193   {
194     return *pMockItem;
195   }
196
197   Dali::WebEngineBackForwardListItem& GetItemAtIndex( uint32_t index ) const override
198   {
199     return *pMockItem;
200   }
201
202   uint32_t GetItemCount() const override
203   {
204     return 1;
205   }
206
207 private:
208   MockWebEngineBackForwardListItem mockItem;
209   WebEngineBackForwardListItem* pMockItem;
210 };
211
212 class MockWebEngineSettings : public WebEngineSettings
213 {
214 public:
215   MockWebEngineSettings()
216     : mockDefaultFontSize( 16 ),
217       mockJavaScriptEnabled( true ),
218       mockImageLoadedAutomatically( true ),
219       mockDefaultTextEncodingName()
220   {
221   }
222
223   uint32_t GetDefaultFontSize() const override
224   {
225     return mockDefaultFontSize;
226   }
227
228   void SetDefaultFontSize( uint32_t size ) override
229   {
230     mockDefaultFontSize = size;
231   }
232
233   bool IsJavaScriptEnabled() const override
234   {
235     return mockJavaScriptEnabled;
236   }
237
238   void EnableJavaScript( bool enabled ) override
239   {
240     mockJavaScriptEnabled = enabled;
241   }
242
243   bool AreImagesLoadedAutomatically() const override
244   {
245     return mockImageLoadedAutomatically;
246   }
247
248   void AllowImagesLoadAutomatically( bool automatic ) override
249   {
250     mockImageLoadedAutomatically = automatic;
251   }
252
253   std::string GetDefaultTextEncodingName() const override
254   {
255     return mockDefaultTextEncodingName;
256   }
257
258   void SetDefaultTextEncodingName( const std::string& defaultTextEncodingName ) override
259   {
260     mockDefaultTextEncodingName = defaultTextEncodingName;
261   }
262
263   void AllowMixedContents( bool allowed ) override
264   {
265   }
266
267   void EnableSpatialNavigation( bool enabled ) override
268   {
269   }
270
271   void EnableWebSecurity( bool enabled ) override
272   {
273   }
274
275   void AllowFileAccessFromExternalUrl( bool allowed ) override
276   {
277   }
278
279   void AllowScriptsOpenWindows( bool allowed ) override
280   {
281   }
282
283 private:
284   int mockDefaultFontSize;
285   bool mockJavaScriptEnabled;
286   bool mockImageLoadedAutomatically;
287   std::string mockDefaultTextEncodingName;
288 };
289
290 class WebEngine: public Dali::BaseObject
291 {
292 public:
293
294   WebEngine()
295     : mUrl()
296     , mCurrentPlusOnePos( 0 )
297     , mUserAgent()
298     , mEvaluating( false )
299     , mScrollPosition( 0, 0 )
300     , mScrollSize( 500, 500 )
301     , mContentSize( 500, 500 )
302   {
303     gInstanceCount++;
304     gInstance = this;
305
306     mockWebEngineSettings = new MockWebEngineSettings();
307     mockWebEngineContext = new MockWebEngineContext();
308     mockWebEngineCookieManager = new MockWebEngineCookieManager();
309     mockWebEngineBackForwardList = new MockWebEngineBackForwardList();
310   }
311
312   virtual ~WebEngine()
313   {
314     gInstanceCount--;
315     if( !gInstanceCount )
316     {
317       gInstance = NULL;
318     }
319
320     delete mockWebEngineSettings;
321     delete mockWebEngineContext;
322     delete mockWebEngineCookieManager;
323     delete mockWebEngineBackForwardList;
324   }
325
326   Dali::WebEngineSettings& GetSettings() const
327   {
328     return *mockWebEngineSettings;
329   }
330
331   Dali::WebEngineContext& GetContext() const
332   {
333     return *mockWebEngineContext;
334   }
335
336   Dali::WebEngineCookieManager& GetCookieManager() const
337   {
338     return *mockWebEngineCookieManager;
339   }
340
341   Dali::WebEngineBackForwardList& GetBackForwardList() const
342   {
343     return *mockWebEngineBackForwardList;
344   }
345
346   void LoadUrl( const std::string& url )
347   {
348     mUrl = url;
349     ConnectToGlobalSignal( &OnLoadUrl );
350   }
351
352   const std::string& GetUrl() const
353   {
354     return mUrl;
355   }
356
357   std::string GetTitle() const
358   {
359     return std::string("title");
360   }
361
362   Dali::PixelData GetFavicon() const
363   {
364     uint8_t* faviconData = new uint8_t[ 16 ];
365
366     faviconData[ 0 ] = 0xff;
367     faviconData[ 1 ] = 0x00;
368     faviconData[ 2 ] = 0x00;
369     faviconData[ 3 ] = 0xff;
370     faviconData[ 4 ] = 0xff;
371     faviconData[ 5 ] = 0x00;
372     faviconData[ 6 ] = 0x00;
373     faviconData[ 7 ] = 0xff;
374     faviconData[ 8 ] = 0xff;
375     faviconData[ 9 ] = 0x00;
376     faviconData[ 10 ] = 0x00;
377     faviconData[ 11 ] = 0xff;
378     faviconData[ 12 ] = 0xff;
379     faviconData[ 13 ] = 0x00;
380     faviconData[ 14 ] = 0x00;
381     faviconData[ 15 ] = 0xff;
382
383     return Dali::PixelData::New( faviconData, 16, 2, 2,
384                                  Dali::Pixel::Format::RGBA8888,
385                                  Dali::PixelData::ReleaseFunction::DELETE_ARRAY );
386   }
387
388   bool CanGoForward() const
389   {
390     return mHistory.size() > mCurrentPlusOnePos;
391   }
392
393   void GoForward()
394   {
395     ConnectToGlobalSignal( &OnGoForward );
396   }
397
398   bool CanGoBack() const
399   {
400     return mCurrentPlusOnePos > 1;
401   }
402
403   void GoBack()
404   {
405     ConnectToGlobalSignal( &OnGoBack );
406   }
407
408   void EvaluateJavaScript( const std::string& script, std::function< void( const std::string& ) > resultHandler )
409   {
410     if( resultHandler )
411     {
412       if( !mEvaluating )
413       {
414         ConnectToGlobalSignal( &OnEvaluteJavaScript );
415       }
416       mResultCallbacks.push_back( resultHandler );
417     }
418   }
419
420   void ClearHistory()
421   {
422     ConnectToGlobalSignal( &OnClearHistory );
423   }
424
425   const std::string& GetUserAgent() const
426   {
427     return mUserAgent;
428   }
429
430   void SetUserAgent( const std::string& userAgent )
431   {
432     mUserAgent = userAgent;
433   }
434
435   void ScrollBy( int dx, int dy )
436   {
437     mScrollPosition += Dali::Vector2( dx, dy );
438     if ( mScrollPosition.y + mScrollSize.height > mContentSize.height )
439     {
440       gInstance->mScrollEdgeReachedSignal.Emit( Dali::WebEnginePlugin::ScrollEdge::BOTTOM );
441     }
442   }
443
444   void SetScrollPosition( int x, int y )
445   {
446     mScrollPosition.x = x;
447     mScrollPosition.y = y;
448   }
449
450   void GetScrollPosition( int& x, int& y ) const
451   {
452     x = mScrollPosition.x;
453     y = mScrollPosition.y;
454   }
455
456   void GetScrollSize( int& w, int& h ) const
457   {
458     w = mScrollSize.width;
459     h = mScrollSize.height;
460   }
461
462   void GetContentSize( int& w, int& h ) const
463   {
464     w = mContentSize.width;
465     h = mContentSize.height;
466   }
467
468   Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal()
469   {
470     return mPageLoadStartedSignal;
471   }
472
473   Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadFinishedSignal()
474   {
475     return mPageLoadFinishedSignal;
476   }
477
478   Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& PageLoadErrorSignal()
479   {
480     return mPageLoadErrorSignal;
481   }
482
483   Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& ScrollEdgeReachedSignal()
484   {
485     return mScrollEdgeReachedSignal;
486   }
487
488   void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback)
489   {
490     if (callback)
491     {
492       ConnectToGlobalSignal(&OnPlainTextReceived);
493       mPlainTextReceivedCallback = callback;
494     }
495   }
496
497   std::string                                                mUrl;
498   std::vector< std::string >                                 mHistory;
499   size_t                                                     mCurrentPlusOnePos;
500   std::string                                                mUserAgent;
501   Dali::WebEnginePlugin::WebEnginePageLoadSignalType         mPageLoadStartedSignal;
502   Dali::WebEnginePlugin::WebEnginePageLoadSignalType         mPageLoadFinishedSignal;
503   Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType    mPageLoadErrorSignal;
504   std::vector< std::function< void( const std::string& ) > > mResultCallbacks;
505   bool                                                       mEvaluating;
506
507   Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType mScrollEdgeReachedSignal;
508   Dali::Vector2                                               mScrollPosition;
509   Dali::Vector2                                               mScrollSize;
510   Dali::Vector2                                               mContentSize;
511   WebEngineBackForwardList*                                   mockWebEngineBackForwardList;
512   WebEngineContext*                                           mockWebEngineContext;
513   WebEngineCookieManager*                                     mockWebEngineCookieManager;
514   WebEngineSettings*                                          mockWebEngineSettings;
515   Dali::WebEnginePlugin::PlainTextReceivedCallback            mPlainTextReceivedCallback;
516 };
517
518 inline WebEngine& GetImplementation( Dali::WebEngine& webEngine )
519 {
520   DALI_ASSERT_ALWAYS( webEngine && "WebEngine handle is empty." );
521   BaseObject& handle = webEngine.GetBaseObject();
522   return static_cast< Internal::Adaptor::WebEngine& >( handle );
523 }
524
525 inline const WebEngine& GetImplementation( const Dali::WebEngine& webEngine )
526 {
527   DALI_ASSERT_ALWAYS( webEngine && "WebEngine handle is empty." );
528   const BaseObject& handle = webEngine.GetBaseObject();
529   return static_cast< const Internal::Adaptor::WebEngine& >( handle );
530 }
531
532 namespace
533 {
534
535 bool OnGoBack()
536 {
537   DisconnectFromGlobalSignal( &OnGoBack );
538
539   if( gInstance && gInstance->CanGoBack() )
540   {
541     gInstance->mCurrentPlusOnePos--;
542   }
543   return false;
544 }
545
546 bool OnGoForward()
547 {
548   DisconnectFromGlobalSignal( &OnGoForward );
549
550   if( gInstance && gInstance->CanGoForward() )
551   {
552     gInstance->mCurrentPlusOnePos++;
553   }
554   return false;
555 }
556
557 bool OnLoadUrl()
558 {
559   DisconnectFromGlobalSignal( &OnLoadUrl );
560
561   if( gInstance )
562   {
563     if( gInstance->mHistory.size() > gInstance->mCurrentPlusOnePos )
564     {
565       gInstance->mHistory.erase( gInstance->mHistory.begin() + gInstance->mCurrentPlusOnePos, gInstance->mHistory.end() );
566     }
567     gInstance->mHistory.push_back( gInstance->mUrl );
568     gInstance->mCurrentPlusOnePos++;
569     gInstance->mPageLoadStartedSignal.Emit( gInstance->mUrl );
570     gInstance->mPageLoadFinishedSignal.Emit( gInstance->mUrl );
571   }
572   return false;
573 }
574
575 bool OnEvaluteJavaScript()
576 {
577   DisconnectFromGlobalSignal( &OnEvaluteJavaScript );
578
579   if( gInstance )
580   {
581     for( auto& func : gInstance->mResultCallbacks )
582     {
583       func("undefined");
584     }
585     gInstance->mResultCallbacks.clear();
586   }
587   return false;
588 }
589
590 bool OnClearHistory()
591 {
592   DisconnectFromGlobalSignal( &OnClearHistory );
593
594   if( gInstance && gInstance->mCurrentPlusOnePos ) {
595     std::string url = gInstance->mHistory[ gInstance->mCurrentPlusOnePos - 1 ];
596     std::vector< std::string >().swap( gInstance->mHistory );
597     gInstance->mHistory.push_back( url );
598     gInstance->mCurrentPlusOnePos = 1;
599   }
600   return false;
601 }
602
603 bool OnPlainTextReceived()
604 {
605   DisconnectFromGlobalSignal(&OnPlainTextReceived);
606   if (gInstance)
607   {
608     std::string dummyResultText;
609     gInstance->mPlainTextReceivedCallback(dummyResultText);
610   }
611   return false;
612 }
613
614 } // namespace
615
616 } // namespace Adaptor
617
618 } // namespace Internal
619
620
621 // Dali::WebEngine Implementation
622 WebEngine::WebEngine()
623 {
624 }
625
626 WebEngine::WebEngine( Internal::Adaptor::WebEngine* internal )
627 : BaseHandle( internal )
628 {
629 }
630
631 WebEngine::~WebEngine()
632 {
633 }
634
635 WebEngine WebEngine::New()
636 {
637   Internal::Adaptor::WebEngine* baseObject = new Internal::Adaptor::WebEngine();
638
639   return WebEngine( baseObject );
640 }
641
642 WebEngine::WebEngine( const WebEngine& WebEngine )
643 : BaseHandle( WebEngine )
644 {
645 }
646
647 WebEngine& WebEngine::operator=( const WebEngine& webEngine )
648 {
649   BaseHandle::operator=( webEngine );
650   return *this;
651 }
652
653 WebEngine WebEngine::DownCast( BaseHandle handle )
654 {
655   return WebEngine( dynamic_cast< Internal::Adaptor::WebEngine* >( handle.GetObjectPtr() ) );
656 }
657
658 void WebEngine::Create( int width, int height, const std::string& locale, const std::string& timezoneId )
659 {
660 }
661
662 void WebEngine::Create( int width, int height, int argc, char** argv )
663 {
664 }
665
666 void WebEngine::Destroy()
667 {
668 }
669
670 WebEngineSettings& WebEngine::GetSettings() const
671 {
672   return Internal::Adaptor::GetImplementation( *this ).GetSettings();
673 }
674
675 WebEngineContext& WebEngine::GetContext() const
676 {
677   return Internal::Adaptor::GetImplementation( *this ).GetContext();
678 }
679
680 WebEngineCookieManager& WebEngine::GetCookieManager() const
681 {
682   return Internal::Adaptor::GetImplementation( *this ).GetCookieManager();
683 }
684
685 WebEngineBackForwardList& WebEngine::GetBackForwardList() const
686 {
687   return Internal::Adaptor::GetImplementation( *this ).GetBackForwardList();
688 }
689
690 void WebEngine::LoadUrl( const std::string& url )
691 {
692   return Internal::Adaptor::GetImplementation( *this ).LoadUrl( url );
693 }
694
695 std::string WebEngine::GetTitle() const
696 {
697   return Internal::Adaptor::GetImplementation( *this ).GetTitle();
698 }
699
700 Dali::PixelData WebEngine::GetFavicon() const
701 {
702   return Internal::Adaptor::GetImplementation( *this ).GetFavicon();
703 }
704
705 const std::string& WebEngine::GetUrl()
706 {
707   return Internal::Adaptor::GetImplementation( *this ).GetUrl();
708 }
709
710 NativeImageInterfacePtr WebEngine::GetNativeImageSource()
711 {
712   Any source;
713   Dali::NativeImageSourcePtr sourcePtr = Dali::NativeImageSource::New( source );
714   return sourcePtr;
715 }
716
717 void WebEngine::LoadHtmlString( const std::string& htmlString )
718 {
719 }
720
721 void WebEngine::Reload()
722 {
723 }
724
725 void WebEngine::StopLoading()
726 {
727 }
728
729 void WebEngine::Suspend()
730 {
731 }
732
733 void WebEngine::Resume()
734 {
735 }
736
737 bool WebEngine::CanGoForward()
738 {
739   return Internal::Adaptor::GetImplementation( *this ).CanGoForward();
740 }
741
742 void WebEngine::GoForward()
743 {
744   Internal::Adaptor::GetImplementation( *this ).GoForward();
745 }
746
747 bool WebEngine::CanGoBack()
748 {
749   return Internal::Adaptor::GetImplementation( *this ).CanGoBack();
750 }
751
752 void WebEngine::GoBack()
753 {
754   Internal::Adaptor::GetImplementation( *this ).GoBack();
755 }
756
757 void WebEngine::EvaluateJavaScript( const std::string& script, std::function< void( const std::string& ) > resultHandler )
758 {
759   Internal::Adaptor::GetImplementation( *this ).EvaluateJavaScript( script, resultHandler );
760 }
761
762 void WebEngine::AddJavaScriptMessageHandler( const std::string& exposedObjectName, std::function< void(const std::string&) > handler )
763 {
764 }
765
766 void WebEngine::ClearAllTilesResources()
767 {
768 }
769
770 void WebEngine::ClearHistory()
771 {
772   Internal::Adaptor::GetImplementation( *this ).ClearHistory();
773 }
774
775 const std::string& WebEngine::GetUserAgent() const
776 {
777   return Internal::Adaptor::GetImplementation( *this ).GetUserAgent();
778 }
779
780 void WebEngine::SetUserAgent( const std::string& userAgent )
781 {
782   Internal::Adaptor::GetImplementation( *this ).SetUserAgent( userAgent );
783 }
784
785 void WebEngine::ScrollBy( int dx, int dy )
786 {
787   Internal::Adaptor::GetImplementation( *this ).ScrollBy( dx, dy );
788 }
789
790 void WebEngine::SetScrollPosition( int x, int y )
791 {
792   Internal::Adaptor::GetImplementation( *this ).SetScrollPosition( x, y );
793 }
794
795 void WebEngine::GetScrollPosition( int& x, int& y ) const
796 {
797   Internal::Adaptor::GetImplementation( *this ).GetScrollPosition( x, y );
798 }
799
800 void WebEngine::GetScrollSize( int& w, int& h ) const
801 {
802   Internal::Adaptor::GetImplementation( *this ).GetScrollSize( w, h );
803 }
804
805 void WebEngine::GetContentSize( int& w, int& h ) const
806 {
807   Internal::Adaptor::GetImplementation( *this ).GetContentSize( w, h );
808 }
809
810 void WebEngine::SetSize( int width, int height )
811 {
812 }
813
814 bool WebEngine::SendTouchEvent( const TouchEvent& touch )
815 {
816   return true;
817 }
818
819 bool WebEngine::SendKeyEvent( const KeyEvent& event )
820 {
821   return true;
822 }
823
824 void WebEngine::SetFocus( bool focused )
825 {
826 }
827
828 void WebEngine::UpdateDisplayArea( Dali::Rect< int > displayArea )
829 {
830 }
831
832 void WebEngine::EnableVideoHole( bool enabled )
833 {
834 }
835
836 Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
837 {
838   return Internal::Adaptor::GetImplementation( *this ).PageLoadStartedSignal();
839 }
840
841 Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadFinishedSignal()
842 {
843   return Internal::Adaptor::GetImplementation( *this ).PageLoadFinishedSignal();
844 }
845
846 Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& WebEngine::PageLoadErrorSignal()
847 {
848   return Internal::Adaptor::GetImplementation( *this ).PageLoadErrorSignal();
849 }
850
851 Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& WebEngine::ScrollEdgeReachedSignal()
852 {
853   return Internal::Adaptor::GetImplementation( *this ).ScrollEdgeReachedSignal();
854 }
855
856 void WebEngine::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback)
857 {
858   Internal::Adaptor::GetImplementation(*this).GetPlainTextAsynchronously(callback);
859 }
860
861 } // namespace Dali;
862