[dali_2.3.41] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / web-view / web-view.h
1 #ifndef DALI_TOOLKIT_WEB_VIEW_H
2 #define DALI_TOOLKIT_WEB_VIEW_H
3
4 /*
5  * Copyright (c) 2024 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <functional>
23 #include <memory>
24
25 // INTERNAL INCLUDES
26 #include <dali-toolkit/public-api/controls/control.h>
27 #include <dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h>
28
29 namespace Dali
30 {
31 class WebEngineContext;
32 class WebEngineCookieManager;
33
34 namespace Toolkit
35 {
36 class ImageView;
37 class WebBackForwardList;
38 class WebSettings;
39
40 namespace Internal DALI_INTERNAL
41 {
42 class WebView;
43 } // namespace DALI_INTERNAL
44
45 /**
46  * @addtogroup dali_toolkit_controls_web_view
47  * @{
48  */
49
50 /**
51  * @brief WebView is a control for displaying web content.
52  *
53  * This enables embedding web pages in the application.
54  *
55  * For working WebView, a web engine plugin for a platform should be provided.
56  *
57  */
58 class DALI_TOOLKIT_API WebView : public Control
59 {
60 public:
61   /**
62    * @brief Enumeration for the start and end property ranges for this control.
63    */
64   enum PropertyRange
65   {
66     PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
67     PROPERTY_END_INDEX   = PROPERTY_START_INDEX + 1000,
68   };
69
70   /**
71    * @brief Enumeration for the instance of properties belonging to the WebView class.
72    */
73   struct Property
74   {
75     enum
76     {
77       /**
78        * @brief The url to load.
79        * @details name "url", type Property::STRING.
80        */
81       URL = PROPERTY_START_INDEX,
82
83       /**
84        * @brief The user agent string.
85        * @details name "userAgent", type Property::STRING.
86        */
87       USER_AGENT,
88
89       /**
90        * @brief The current position of scroll.
91        * @details name "scrollPosition", type Property::VECTOR2.
92        */
93       SCROLL_POSITION,
94
95       /**
96        * @brief The current size of scroll.
97        * @details name "scrollSize", type Property::VECTOR2.
98        * @note The value is read-only.
99        */
100       SCROLL_SIZE,
101
102       /**
103        * @brief The current size of content.
104        * @details name "contentSize", type Property::VECTOR2.
105        * @note The value is read-only.
106        */
107       CONTENT_SIZE,
108
109       /**
110        * @brief The title of web page.
111        * @details name "title", type Property::STRING.
112        * @note The value is read-only.
113        */
114       TITLE,
115
116       /**
117        * @brief Whether video hole is enabled or not.
118        * @details name "videoHoleEnabled", type Property::BOOLEAN.
119        * @note False by default.
120        */
121       VIDEO_HOLE_ENABLED,
122
123       /**
124        * @brief Whether mouse event is enabled.
125        * @details name "mouseEventsEnabled", type Property::BOOLEAN.
126        * @note Default is true.
127        */
128       MOUSE_EVENTS_ENABLED,
129
130       /**
131        * @brief Whether key event is enabled.
132        * @details name "keyEventsEnabled", type Property::BOOLEAN.
133        * @note Default is true.
134        */
135       KEY_EVENTS_ENABLED,
136
137       /**
138        * @brief The background color of web page.
139        * @details name "documentBackgroundColor", type Property::VECTOR4.
140        */
141       DOCUMENT_BACKGROUND_COLOR,
142
143       /**
144        * @brief Whether tiles can be cleared or not when hidden.
145        * @details name "tilesClearedWhenHidden", type BOOLEAN.
146        */
147       TILES_CLEARED_WHEN_HIDDEN,
148
149       /**
150        * @brief The multiplier of cover area of tile when rendering web page.
151        * @details name "tileCoverAreaMultiplier", type FLOAT.
152        */
153       TILE_COVER_AREA_MULTIPLIER,
154
155       /**
156        * @brief Whether cursor is enabled or not by client.
157        * @details name "cursorEnabledByClient", type BOOLEAN.
158        */
159       CURSOR_ENABLED_BY_CLIENT,
160
161       /**
162        * @brief The selected text of web page.
163        * @details name "selectedText", type Property::STRING.
164        * @note The value is read-only.
165        */
166       SELECTED_TEXT,
167
168       /**
169        * @brief Zoom factor of web page.
170        * @details name "pageZoomFactor", type Property::FLOAT.
171        */
172       PAGE_ZOOM_FACTOR,
173
174       /**
175        * @brief Zoom factor of text.
176        * @details name "textZoomFactor", type Property::FLOAT.
177        */
178       TEXT_ZOOM_FACTOR,
179
180       /**
181        * @brief progress percentage of loading a web page.
182        * @details name "loadProgressPercentage", type Property::FLOAT.
183        * @note The value is read-only.
184        */
185       LOAD_PROGRESS_PERCENTAGE,
186     };
187   };
188
189   /**
190    * @brief WebView callback related with screen-shot captured.
191    */
192   using WebViewScreenshotCapturedCallback = std::function<void(Dali::Toolkit::ImageView)>;
193
194 public:
195   /**
196    * @brief Create an initialized WebView.
197    * @return A handle to a newly allocated Dali WebView
198    *
199    * @note WebView will not display anything
200    */
201   static WebView New();
202
203   /**
204    * @brief Create an initialized WebView.
205    *
206    * @param [in] locale The locale of Web
207    * @param [in] timezoneId The timezoneId of Web
208    */
209   static WebView New(const std::string& locale, const std::string& timezoneId);
210
211   /**
212    * @brief Create an initialized WebView.
213    *
214    * @param [in] argc The count of arguments of Applications
215    * @param [in] argv The string array of arguments of Applications
216    */
217   static WebView New(uint32_t argc, char** argv);
218
219   /**
220    * @brief Find web view by web engine plugin.
221    */
222   static Toolkit::WebView FindWebView(Dali::WebEnginePlugin* plugin);
223
224   /**
225    * @brief Get context of web engine.
226    */
227   static Dali::WebEngineContext* GetContext();
228
229   /**
230    * @brief Get cookie manager of web engine.
231    */
232   static Dali::WebEngineCookieManager* GetCookieManager();
233
234   /**
235    * @brief Create an uninitialized WebView.
236    */
237   WebView();
238
239   /**
240    * @brief Destructor.
241    *
242    * This is non-virtual since derived Handel types must not contain data or virtual methods.
243    */
244   ~WebView();
245
246   /*
247    * @brief Copy constructor.
248    *
249    * @param[in] WebView WebView to copy. The copied WebView will point at the same implementation
250    */
251   WebView(const WebView& WebView);
252
253   /**
254    * @brief Assignment operator.
255    *
256    * @param[in] WebView The WebView to assign from
257    * @return The updated WebView
258    */
259   WebView& operator=(const WebView& WebView);
260
261   /**
262    * @brief Downcast a handle to WebView handle.
263    *
264    * If handle points to a WebView, the downcast produces valid handle.
265    * If not, the returned handle is left uninitialized.
266    *
267    * @param[in] handle Handle to an object
268    * @return Handle to a WebView or an uninitialized handle
269    */
270   static WebView DownCast(BaseHandle handle);
271
272   /**
273    * @brief Change orientation.
274    */
275   void ChangeOrientation(int orientation);
276
277   /**
278    * @brief Get WebSettings of WebEngine.
279    */
280   Dali::Toolkit::WebSettings* GetSettings() const;
281
282   /**
283    * @brief Get WebBackForwardList of WebEngine.
284    */
285   Dali::Toolkit::WebBackForwardList* GetBackForwardList() const;
286
287   /**
288    * @brief Gets web engine plugin.
289    */
290   Dali::WebEnginePlugin* GetPlugin() const;
291
292   /**
293    * @brief Get favicon of web page.
294    *
295    * @return Handle to a favicon
296    */
297   Dali::Toolkit::ImageView GetFavicon() const;
298
299   /**
300    * @brief Load a web page based on a given URL.
301    *
302    * @param [in] url The URL of the resource to load
303    */
304   void LoadUrl(const std::string& url);
305
306   /**
307    * @brief Load a given string as web contents.
308    *
309    * @param [in] htmlString The string to use as the contents of the web page
310    */
311   void LoadHtmlString(const std::string& htmlString);
312
313   /**
314    * @brief Load the specified html string as the content of the view overriding current history entry
315    *
316    * @param[in] html HTML data to load
317    * @param[in] basicUri Base URL used for relative paths to external objects
318    * @param[in] unreachableUrl URL that could not be reached
319    *
320    * @return true if successfully loaded, false otherwise
321    */
322   bool LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri, const std::string& unreachableUrl);
323
324   /**
325    * @brief Request loading the given contents by MIME type into the view object
326    *
327    * @param[in] contents The content to load
328    * @param[in] contentSize The size of contents (in bytes)
329    * @param[in] mimeType The type of contents, if 0 is given "text/html" is assumed
330    * @param[in] encoding The encoding for contents, if 0 is given "UTF-8" is assumed
331    * @param[in] baseUri The base URI to use for relative resources
332    *
333    * @return true if successfully request, false otherwise
334    */
335   bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
336
337   /**
338    * @brief Reload the Web.
339    */
340   void Reload();
341
342   /**
343    * @brief Reload the current page's document without cache
344    */
345   bool ReloadWithoutCache();
346
347   /**
348    * @brief Stop loading web contents on the current page.
349    */
350   void StopLoading();
351
352   /**
353    * @brief Suspend the operation associated with the view.
354    */
355   void Suspend();
356
357   /**
358    * @brief Resume the operation associated with the view object after calling Suspend().
359    */
360   void Resume();
361
362   /**
363    * @brief To suspend all url loading
364    */
365   void SuspendNetworkLoading();
366
367   /**
368    * @brief To resume new url network loading
369    */
370   void ResumeNetworkLoading();
371
372   /**
373    * @brief Add custom header
374    *
375    * @param[in] name custom header name to add the custom header
376    * @param[in] value custom header value to add the custom header
377    *
378    * @return true if succeeded, false otherwise
379    */
380   bool AddCustomHeader(const std::string& name, const std::string& value);
381
382   /**
383    * @brief Remove custom header
384    *
385    * @param[in] name custom header name to remove the custom header
386    *
387    * @return true if succeeded, false otherwise
388    */
389   bool RemoveCustomHeader(const std::string& name);
390
391   /**
392    * @brief Start the inspector server
393    *
394    * @param[in] port port number
395    *
396    * @return the port number
397    */
398   uint32_t StartInspectorServer(uint32_t port);
399
400   /**
401    * @brief Stop the inspector server
402    *
403    * @return true if succeeded, false otherwise
404    */
405   bool StopInspectorServer();
406
407   /**
408    * @brief Scroll web page of view by deltaX and deltaY.
409    * @param[in] deltaX The delta x of scroll
410    * @param[in] deltaY The delta y of scroll
411    */
412   void ScrollBy(int32_t deltaX, int32_t deltaY);
413
414   /**
415    * @brief Scroll edge of view by deltaX and deltaY.
416    *
417    * @param[in] deltaX horizontal offset to scroll
418    * @param[in] deltaY vertical offset to scroll
419    *
420    * @return true if succeeded, false otherwise
421    */
422   bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY);
423
424   /**
425    * @brief Return whether forward is possible.
426    *
427    * @return True if forward is possible, false otherwise
428    */
429   bool CanGoForward();
430
431   /**
432    * @brief Go forward in the navigation history.
433    */
434   void GoForward();
435
436   /**
437    * @brief Return whether backward is possible.
438    *
439    * @return True if backward is possible, false otherwise
440    */
441   bool CanGoBack();
442
443   /**
444    * @brief Go back in the navigation history.
445    */
446   void GoBack();
447
448   /**
449    * @brief Evaluate JavaScript code represented as a string.
450    *
451    * @param[in] script The JavaScript code
452    * @param[in] resultHandler The callback to be called by the JavaScript runtime. This carries evaluation result
453    */
454   void EvaluateJavaScript(const std::string& script, Dali::WebEnginePlugin::JavaScriptMessageHandlerCallback resultHandler);
455
456   /**
457    * @brief Evaluate JavaScript code represented as a string.
458    *
459    * @param[in] script The JavaScript code
460    */
461   void EvaluateJavaScript(const std::string& script);
462
463   /**
464    * @brief Inject a JavaScript object with a message handler into the WebView.
465    *
466    * @note The injected object will appear in the JavaScript context to be loaded next.
467    *
468    * Example:
469    *
470    * 1. Native
471    *
472    *     webview.AddJavaScriptMessageHandler( "myObject", []( const std::string& message ) {
473    *         printf( "Received a message from JS: %s", message.c_str() );
474    *     });
475    *
476    *     // Start WebView by loading URL
477    *     webview.LoadUrl( url );
478    *
479    * 2. JavaScript
480    *
481    *     myObject.postMessage( "Hello World!" ); // "Received a message from JS: Hello World!"
482    *
483    *
484    * @param[in] exposedObjectName The name of exposed object
485    * @param[in] handler The callback function
486    */
487   void AddJavaScriptMessageHandler(const std::string& exposedObjectName, Dali::WebEnginePlugin::JavaScriptMessageHandlerCallback handler);
488
489   /**
490    * @brief Inject a JavaScript object with a message handler into the WebView.
491    *
492    * @param[in] exposedObjectName The name of exposed object
493    * @param[in] handler The callback function
494    */
495   void AddJavaScriptEntireMessageHandler(const std::string& exposedObjectName, Dali::WebEnginePlugin::JavaScriptEntireMessageHandlerCallback handler);
496
497   /**
498    * @brief Register alert callback for javascript.
499    *
500    * @param[in] callback The callback function to be called by the JavaScript runtime.
501    */
502   void RegisterJavaScriptAlertCallback(Dali::WebEnginePlugin::JavaScriptAlertCallback callback);
503
504   /**
505    * @brief Reply for JavaScript alert.
506    */
507   void JavaScriptAlertReply();
508
509   /**
510    * @brief Register confirm callback for javascript.
511    *
512    * @param[in] callback The callback function to be called by the JavaScript runtime.
513    */
514   void RegisterJavaScriptConfirmCallback(Dali::WebEnginePlugin::JavaScriptConfirmCallback callback);
515
516   /**
517    * @brief Reply for JavaScript confirm.
518    * @param[in] confirmed True if confirmed, false otherwise
519    */
520   void JavaScriptConfirmReply(bool confirmed);
521
522   /**
523    * @brief Register prompt callback for javascript.
524    *
525    * @param[in] callback The callback function to be called by the JavaScript runtime.
526    */
527   void RegisterJavaScriptPromptCallback(Dali::WebEnginePlugin::JavaScriptPromptCallback callback);
528
529   /**
530    * @brief Reply for JavaScript prompt.
531    * @param[in] result The result from input-field of prompt popup.
532    */
533   void JavaScriptPromptReply(const std::string& result);
534
535   /**
536    * @brief Create a new hit test.
537    *
538    * @param[in] x the horizontal position to query
539    * @param[in] y the vertical position to query
540    * @param[in] mode the mode of hit test
541    *
542    * @return a new hit test object.
543    */
544   std::unique_ptr<Dali::WebEngineHitTest> CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode);
545
546   /**
547    * @brief Create a hit test asynchronously.
548    *
549    * @param[in] x the horizontal position to query
550    * @param[in] y the vertical position to query
551    * @param[in] mode the mode of hit test
552    * @param[in] callback The callback function
553    *
554    * @return true if succeeded, false otherwise.
555    */
556   bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback);
557
558   /**
559    * @brief Exit fullscreen.
560    */
561   void ExitFullscreen();
562
563   /**
564    * @brief Clear the history of Web.
565    */
566   void ClearHistory();
567
568   /**
569    * @brief Clear all tiles resources of Web.
570    */
571   void ClearAllTilesResources();
572
573   /**
574    * @brief Scale the current page, centered at the given point.
575    * @param[in] scaleFactor a new factor to be scaled.
576    * @param[in] point a center coordinate.
577    */
578   void SetScaleFactor(float scaleFactor, Dali::Vector2 point);
579
580   /**
581    * @brief Get the current scale factor of the page.
582    * @return The current scale factor.
583    */
584   float GetScaleFactor() const;
585
586   /**
587    * @brief Request to activate/deactivate the accessibility usage set by web app.
588    * @param[in] activated Activate accessibility or not.
589    */
590   void ActivateAccessibility(bool activated);
591
592   /**
593    * @brief Search and highlights the given string in the document.
594    * @param[in] text The text to find
595    * @param[in] options The options to find
596    * @param[in] maxMatchCount The maximum match count to find
597    *
598    * @return true if found & highlighted, false otherwise
599    */
600   bool HighlightText(const std::string& text, Dali::WebEnginePlugin::FindOption options, uint32_t maxMatchCount);
601
602   /**
603    * @brief Add dynamic certificate path.
604    * @param[in] host host that required client authentication
605    * @param[in] certPath the file path stored certificate
606    */
607   void AddDynamicCertificatePath(const std::string& host, const std::string& certPath);
608
609   /**
610    * @brief Get snapshot of the specified viewArea of page.
611    *
612    * @param[in] viewArea The rectangle of screen shot
613    * @param[in] scaleFactor The scale factor
614    *
615    * @return image view of screen shot
616    */
617   Dali::Toolkit::ImageView GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor);
618
619   /**
620    * @brief Request to get snapshot of the specified viewArea of page asynchronously.
621    *
622    * @param[in] viewArea The rectangle of screen shot
623    * @param[in] scaleFactor The scale factor
624    * @param[in] callback The callback for screen shot
625    *
626    * @return true if requested successfully, false otherwise
627    */
628   bool GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, WebViewScreenshotCapturedCallback callback);
629
630   /**
631    * @brief Asynchronous request to check if there is a video playing in the given view.
632    *
633    * @param[in] callback The callback called after checking if video is playing or not
634    *
635    * @return true if requested successfully, false otherwise
636    */
637   bool CheckVideoPlayingAsynchronously(Dali::WebEnginePlugin::VideoPlayingCallback callback);
638
639   /**
640    * @brief Set callback which will be called upon geolocation permission request.
641    *
642    * @param[in] callback The callback for requesting geolocation permission
643    */
644   void RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::GeolocationPermissionCallback callback);
645
646   /**
647    * @brief Set or unset TTS focus of the webview.
648    * @param[in] focused True if it is gained, false lost.
649    * @note It only works when the webview does not have keyinput focus. If it has keyinput focus, the TTS focus is set automatically.
650    */
651   void SetTtsFocus(bool focused);
652
653   /**
654    * @brief Callback to be called when page loading is started.
655    *
656    * @param[in] callback
657    */
658   void RegisterPageLoadStartedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
659
660   /**
661    * @brief Callback to be called when page loading is in progress.
662    *
663    * @param[in] callback
664    */
665   void RegisterPageLoadInProgressCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
666
667   /**
668    * @brief Callback to be called when page loading is finished.
669    *
670    * @param[in] callback
671    */
672   void RegisterPageLoadFinishedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
673
674   /**
675    * @brief Callback to be called when an error occurs in page loading.
676    *
677    * @param[in] callback
678    */
679   void RegisterPageLoadErrorCallback(Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback callback);
680
681   /**
682    * @brief Callback to be called when scroll edge is reached.
683    *
684    * @param[in] callback
685    */
686   void RegisterScrollEdgeReachedCallback(Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback callback);
687
688   /**
689    * @brief Callback to be called when url is changed.
690    *
691    * @param[in] callback
692    */
693   void RegisterUrlChangedCallback(Dali::WebEnginePlugin::WebEngineUrlChangedCallback callback);
694
695   /**
696    * @brief Callback to be called when form repost decision is requested.
697    *
698    * @param[in] callback
699    */
700   void RegisterFormRepostDecidedCallback(Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback callback);
701
702   /**
703    * @brief Callback to be called when frame is rendered.
704    *
705    * @param[in] callback
706    */
707   void RegisterFrameRenderedCallback(Dali::WebEnginePlugin::WebEngineFrameRenderedCallback callback);
708
709   /**
710    * @brief Callback to be called when console message will be logged.
711    *
712    * @param[in] callback
713    */
714   void RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback);
715
716   /**
717    * @brief Callback to be called when response policy would be decided.
718    *
719    * @param[in] callback
720    */
721   void RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback callback);
722
723   /**
724    * @brief Callback to be called when navigation policy would be decided.
725    *
726    * @param[in] callback
727    */
728   void RegisterNavigationPolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineNavigationPolicyDecidedCallback callback);
729
730   /**
731    * @brief Callback to be called when new window policy would be decided.
732    *
733    * @param[in] callback
734    */
735   void RegisterNewWindowPolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineNewWindowPolicyDecidedCallback callback);
736
737   /**
738    * @brief Callback to be called when a new window would be created.
739    *
740    * @param[in] callback
741    */
742   void RegisterNewWindowCreatedCallback(Dali::WebEnginePlugin::WebEngineNewWindowCreatedCallback callback);
743
744   /**
745    * @brief Callback to be called when certificate need be confirmed.
746    *
747    * @param[in] callback
748    */
749   void RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback);
750
751   /**
752    * @brief Callback to be called when ssl certificate is changed.
753    *
754    * @param[in] callback
755    */
756   void RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback);
757
758   /**
759    * @brief Callback to be called when http authentication need be confirmed.
760    *
761    * @param[in] callback
762    */
763   void RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback callback);
764
765   /**
766    * @brief Callback to be called when context menu would be shown.
767    *
768    * @param[in] callback
769    */
770   void RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineContextMenuShownCallback callback);
771
772   /**
773    * @brief Callback to be called when context menu would be hidden.
774    *
775    * @param[in] callback
776    */
777   void RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback callback);
778
779   /**
780    * @brief Callback to be called when fullscreen would be entered.
781    *
782    * @param[in] callback
783    */
784   void RegisterFullscreenEnteredCallback(Dali::WebEnginePlugin::WebEngineFullscreenEnteredCallback callback);
785
786   /**
787    * @brief Callback to be called when fullscreen would be exited.
788    *
789    * @param[in] callback
790    */
791   void RegisterFullscreenExitedCallback(Dali::WebEnginePlugin::WebEngineFullscreenExitedCallback callback);
792
793   /**
794    * @brief Callback to be called when text would be found.
795    *
796    * @param[in] callback
797    */
798   void RegisterTextFoundCallback(Dali::WebEnginePlugin::WebEngineTextFoundCallback callback);
799
800   /**
801    * @brief Get a plain text of current web page asynchronously.
802    *
803    * @param[in] callback The callback function called asynchronously.
804    */
805   void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
806
807 public: // Not intended for application developers
808   /// @cond internal
809   /**
810    * @brief Create a handle using the Toolkit::Internal implementation.
811    *
812    * @param[in] implementation The WebView implementation
813    */
814   DALI_INTERNAL WebView(Internal::WebView& implementation);
815
816   /**
817    * @brief Allow the creation of this WebView from an Internal::CustomActor pointer.
818    *
819    * @param[in] internal A pointer to the internal CustomActor
820    */
821   explicit DALI_INTERNAL WebView(Dali::Internal::CustomActor* internal);
822   /// @endcond
823 };
824
825 /**
826  * @}
827  */
828
829 } // namespace Toolkit
830
831 } // namespace Dali
832
833 #endif // DALI_TOOLKIT_WEB_VIEW_H