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