Merge "Make not assert when file path is invalid." into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine-plugin.h
1 #ifndef DALI_WEB_ENGINE_PLUGIN_H
2 #define DALI_WEB_ENGINE_PLUGIN_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 <dali/devel-api/common/bitwise-enum.h>
23 #include <dali/public-api/images/native-image-interface.h>
24 #include <dali/public-api/math/rect.h>
25 #include <dali/public-api/signals/dali-signal.h>
26 #include <functional>
27 #include <memory>
28
29 namespace Dali
30 {
31 class KeyEvent;
32 class PixelData;
33 class TouchEvent;
34 class WebEngineBackForwardList;
35 class WebEngineCertificate;
36 class WebEngineConsoleMessage;
37 class WebEngineContext;
38 class WebEngineCookieManager;
39 class WebEngineFormRepostDecision;
40 class WebEngineHttpAuthHandler;
41 class WebEngineLoadError;
42 class WebEnginePolicyDecision;
43 class WebEngineRequestInterceptor;
44 class WebEngineSettings;
45 class HoverEvent;
46 class WheelEvent;
47
48 /**
49  * @brief WebEnginePlugin is an abstract interface, used by dali-adaptor to access WebEngine plugin.
50  * A concrete implementation must be created for each platform and provided as dynamic library.
51  */
52 class WebEnginePlugin
53 {
54 public:
55   /**
56    * @brief WebEngine signal type related with page loading.
57    */
58   using WebEnginePageLoadSignalType = Signal<void(const std::string&)>;
59
60   /**
61    * @brief WebView signal type related with page loading error.
62    */
63   using WebEnginePageLoadErrorSignalType = Signal<void(std::shared_ptr<Dali::WebEngineLoadError>)>;
64
65   // forward declaration.
66   enum class ScrollEdge;
67
68   /**
69    * @brief WebView signal type related with scroll edge reached.
70    */
71   using WebEngineScrollEdgeReachedSignalType = Signal<void(const ScrollEdge)>;
72
73   /**
74    * @brief WebView signal type related with page url changed.
75    */
76   using WebEngineUrlChangedSignalType = Signal<void(const std::string&)>;
77
78   /**
79    * @brief WebView signal type related with screen captured.
80    */
81   using ScreenshotCapturedCallback = std::function<void(Dali::PixelData)>;
82
83   /**
84    * @brief WebView signal type related with geolocation permission.
85    *  Host and protocol of security origin will be provided when requesting
86    *  geolocation permission.
87    *  It returns true if a pop-up is created successfully, false otherwise.
88    */
89   using GeolocationPermissionCallback = std::function<bool(const std::string&, const std::string&)>;
90
91   /**
92    * @brief WebView signal type related with video playing.
93    */
94   using VideoPlayingCallback = std::function<void(bool)>;
95
96   /**
97    * @brief WebView signal type related with http request interceptor.
98    */
99   using WebEngineRequestInterceptorSignalType = Signal<void(std::shared_ptr<Dali::WebEngineRequestInterceptor>)>;
100
101   /**
102    * @brief WebView signal type related with console message will be logged.
103    */
104   using WebEngineConsoleMessageSignalType = Signal<void(std::shared_ptr<Dali::WebEngineConsoleMessage>)>;
105
106   /**
107    * @brief WebView signal type related with certificate changed.
108    */
109   using WebEngineCertificateSignalType = Signal<void(std::shared_ptr<Dali::WebEngineCertificate>)>;
110
111   /**
112    * @brief WebView signal type related with http authentication.
113    */
114   using WebEngineHttpAuthHandlerSignalType = Signal<void(std::shared_ptr<Dali::WebEngineHttpAuthHandler>)>;
115
116   /**
117    * @brief Alert callback when JavaScript alert is called with a message.
118    *  It returns true if a pop-up is created successfully, false otherwise.
119    */
120   using JavaScriptAlertCallback = std::function<bool(const std::string&)>;
121
122   /**
123    * @brief Confirm callback when JavaScript confirm is called with a message.
124    *  It returns true if a pop-up is created successfully, false otherwise.
125    */
126   using JavaScriptConfirmCallback = std::function<bool(const std::string&)>;
127
128   /**
129    * @brief Prompt callback when JavaScript prompt is called with a message
130    *  and an optional value that is the default value for the input field.
131    *  It returns true if a pop-up is created successfully, false otherwise.
132    */
133   using JavaScriptPromptCallback = std::function<bool(const std::string&, const std::string&)>;
134
135   /**
136    * @brief WebView signal type related with form repost decision.
137    */
138   using WebEngineFormRepostDecisionSignalType = Signal<void(std::shared_ptr<Dali::WebEngineFormRepostDecision>)>;
139
140   /**
141    * @brief WebView signal type related with frame rendered.
142    */
143   using WebEngineFrameRenderedSignalType = Signal<void(void)>;
144
145   /**
146    * @brief WebView signal type related with policy would be decided.
147    */
148   using WebEnginePolicyDecisionSignalType = Signal<void(std::shared_ptr<Dali::WebEnginePolicyDecision>)>;
149
150   /**
151    * @brief Enumeration for the scroll edge.
152    */
153   enum class ScrollEdge
154   {
155     LEFT,   ///< Left edge reached.
156     RIGHT,  ///< Right edge reached.
157     TOP,    ///< Top edge reached.
158     BOTTOM, ///< Bottom edge reached.
159   };
160
161   /**
162    * @brief Enumeration that provides the option to find text.
163    */
164   enum class FindOption
165   {
166     NONE                               = 0,      ///<  No search flags, this means a case sensitive, no wrap, forward only search
167     CASE_INSENSITIVE                   = 1 << 0, ///<  Case insensitive search
168     AT_WORD_STARTS                     = 1 << 1, ///<  Search text only at the beginning of the words
169     TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2, ///<  Treat capital letters in the middle of words as word start
170     BACKWARDS                          = 1 << 3, ///<  Search backwards
171     WRAP_AROUND                        = 1 << 4, ///<  If not present the search stops at the end of the document
172     SHOW_OVERLAY                       = 1 << 5, ///<  Show overlay
173     SHOW_FIND_INDICATOR                = 1 << 6, ///<  Show indicator
174     SHOW_HIGHLIGHT                     = 1 << 7, ///<  Show highlight
175   };
176
177   /**
178    * @brief Constructor.
179    */
180   WebEnginePlugin() = default;
181
182   /**
183    * @brief Destructor.
184    */
185   virtual ~WebEnginePlugin() = default;
186
187   /**
188    * @brief Create WebEngine instance.
189    *
190    * @param [in] width The width of Web
191    * @param [in] height The height of Web
192    * @param [in] locale The locale of Web
193    * @param [in] timezoneId The timezoneID of Web
194    */
195   virtual void Create(int width, int height, const std::string& locale, const std::string& timezoneId) = 0;
196
197   /**
198    * @brief Create WebEngine instance.
199    *
200    * @param [in] width The width of Web
201    * @param [in] height The height of Web
202    * @param [in] argc The count of application arguments
203    * @param [in] argv The string array of application arguments
204    */
205   virtual void Create(int width, int height, int argc, char** argv) = 0;
206
207   /**
208    * @brief Destroy WebEngine instance.
209    */
210   virtual void Destroy() = 0;
211
212   /**
213    * @brief Get settings of WebEngine.
214    */
215   virtual WebEngineSettings& GetSettings() const = 0;
216
217   /**
218    * @brief Get context of WebEngine.
219    */
220   virtual WebEngineContext& GetContext() const = 0;
221
222   /**
223    * @brief Get cookie manager of WebEngine.
224    */
225   virtual WebEngineCookieManager& GetCookieManager() const = 0;
226
227   /**
228    * @brief Get back-forward list of WebEngine.
229    */
230   virtual WebEngineBackForwardList& GetBackForwardList() const = 0;
231
232   /**
233    * @brief Load a web page based on a given URL.
234    *
235    * @param [in] url The URL of the resource to load
236    */
237   virtual void LoadUrl(const std::string& url) = 0;
238
239   /**
240    * @brief Return the title of the Web.
241    *
242    * @return The title of web page
243    */
244   virtual std::string GetTitle() const = 0;
245
246   /**
247    * @brief Return the Favicon of the Web.
248    *
249    * @return Favicon of Dali::PixelData& type
250    */
251   virtual Dali::PixelData GetFavicon() const = 0;
252
253   /**
254    * @brief Get image to render.
255    */
256   virtual NativeImageInterfacePtr GetNativeImageSource() = 0;
257
258   /**
259    * @brief Returns the URL of the Web.
260    *
261    * @return Url of string type
262    */
263   virtual const std::string& GetUrl() = 0;
264
265   /**
266    * @brief Load a given string as web contents.
267    *
268    * @param [in] htmlString The string to use as the contents of the web page
269    */
270   virtual void LoadHtmlString(const std::string& htmlString) = 0;
271
272   /**
273    * @brief Load the specified html string as the content of the view overriding current history entry
274    *
275    * @param[in] html HTML data to load
276    * @param[in] basicUri Base URL used for relative paths to external objects
277    * @param[in] unreachableUrl URL that could not be reached
278    *
279    * @return true if successfully loaded, false otherwise
280    */
281   virtual bool LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri, const std::string& unreachableUrl) = 0;
282
283   /**
284    * @brief Request loading the given contents by MIME type into the view object
285    *
286    * @param[in] contents The content to load
287    * @param[in] contentSize The size of contents (in bytes)
288    * @param[in] mimeType The type of contents, if 0 is given "text/html" is assumed
289    * @param[in] encoding The encoding for contents, if 0 is given "UTF-8" is assumed
290    * @param[in] baseUri The base URI to use for relative resources
291    *
292    * @return true if successfully request, false otherwise
293    */
294   virtual bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) = 0;
295
296   /**
297    * @brief Reload the Web.
298    */
299   virtual void Reload() = 0;
300
301   /**
302    * @brief Reload the current page's document without cache
303    */
304   virtual bool ReloadWithoutCache() = 0;
305
306   /**
307    * @brief Stop loading web contents on the current page.
308    */
309   virtual void StopLoading() = 0;
310
311   /**
312    * @brief Suspend the operation associated with the view.
313    */
314   virtual void Suspend() = 0;
315
316   /**
317    * @brief Resume the operation associated with the view object after calling Suspend().
318    */
319   virtual void Resume() = 0;
320
321   /**
322    * @brief To suspend all url loading
323    */
324   virtual void SuspendNetworkLoading() = 0;
325
326   /**
327    * @brief To resume new url network loading
328    */
329   virtual void ResumeNetworkLoading() = 0;
330
331   /**
332    * @brief Add custom header
333    *
334    * @param[in] name custom header name to add the custom header
335    * @param[in] value custom header value to add the custom header
336    *
337    * @return true if succeeded, false otherwise
338    */
339   virtual bool AddCustomHeader(const std::string& name, const std::string& value) = 0;
340
341   /**
342    * @brief Remove custom header
343    *
344    * @param[in] name custom header name to remove the custom header
345    *
346    * @return true if succeeded, false otherwise
347    */
348   virtual bool RemoveCustomHeader(const std::string& name) = 0;
349
350   /**
351    * @brief Start the inspector server
352    *
353    * @param[in] port port number
354    *
355    * @return the port number
356    */
357   virtual uint32_t StartInspectorServer(uint32_t port) = 0;
358
359   /**
360    * @brief Stop the inspector server
361    *
362    * @return true if succeeded, false otherwise
363    */
364   virtual bool StopInspectorServer() = 0;
365
366   /**
367    * @brief Scroll web page of view by deltaX and deltaY.
368    *
369    * @param[in] deltaX horizontal offset to scroll
370    * @param[in] deltaY vertical offset to scroll
371    */
372   virtual void ScrollBy(int deltaX, int deltaY) = 0;
373
374   /**
375    * @brief Scroll edge of view by deltaX and deltaY.
376    *
377    * @param[in] deltaX horizontal offset to scroll
378    * @param[in] deltaY vertical offset to scroll
379    *
380    * @return true if succeeded, false otherwise
381    */
382   virtual bool ScrollEdgeBy(int deltaX, int deltaY) = 0;
383
384   /**
385    * @brief Scroll to the specified position of the given view.
386    */
387   virtual void SetScrollPosition(int x, int y) = 0;
388
389   /**
390    * @brief Get the current scroll position of the given view.
391    */
392   virtual Dali::Vector2 GetScrollPosition() const = 0;
393
394   /**
395    * @brief Get the possible scroll size of the given view.
396    */
397   virtual Dali::Vector2 GetScrollSize() const = 0;
398
399   /**
400    * @brief Get the last known content's size.
401    */
402   virtual Dali::Vector2 GetContentSize() const = 0;
403
404   /**
405    * @brief Return whether forward is possible.
406    *
407    * @return True if forward is possible, false otherwise
408    */
409   virtual bool CanGoForward() = 0;
410
411   /**
412    * @brief Go to forward.
413    */
414   virtual void GoForward() = 0;
415
416   /**
417    * @brief Return whether backward is possible.
418    *
419    * @return True if backward is possible, false otherwise
420    */
421   virtual bool CanGoBack() = 0;
422
423   /**
424    * @brief Go to back.
425    */
426   virtual void GoBack() = 0;
427
428   /**
429    * @brief Evaluates JavaScript code represented as a string.
430    *
431    * @param[in] script The JavaScript code
432    * @param[in] resultHandler The callback function to be called by the JavaScript runtime. This carries evaluation result.
433    */
434   virtual void EvaluateJavaScript(const std::string& script, std::function<void(const std::string&)> resultHandler) = 0;
435
436   /**
437    * @brief Add a message handler into JavaScript.
438    *
439    * @param[in] exposedObjectName The name of exposed object
440    * @param[in] handler The callback function
441    */
442   virtual void AddJavaScriptMessageHandler(const std::string& exposedObjectName, std::function<void(const std::string&)> handler) = 0;
443
444   /**
445    * @brief Register a callback for JavaScript alert.
446    *
447    * @param[in] callback The callback function
448    */
449   virtual void RegisterJavaScriptAlertCallback(JavaScriptAlertCallback callback) = 0;
450
451   /**
452    * @brief Reply for JavaScript alert.
453    */
454   virtual void JavaScriptAlertReply() = 0;
455
456   /**
457    * @brief Register a callback for JavaScript confirm.
458    *
459    * @param[in] callback The callback function
460    */
461   virtual void RegisterJavaScriptConfirmCallback(JavaScriptConfirmCallback callback) = 0;
462
463   /**
464    * @brief Reply for JavaScript confirm.
465    */
466   virtual void JavaScriptConfirmReply(bool confirmed) = 0;
467
468   /**
469    * @brief Register a callback for JavaScript prompt.
470    *
471    * @param[in] callback The callback function
472    */
473   virtual void RegisterJavaScriptPromptCallback(JavaScriptPromptCallback callback) = 0;
474
475   /**
476    * @brief Reply for JavaScript prompt.
477    */
478   virtual void JavaScriptPromptReply(const std::string& result) = 0;
479
480   /**
481    * @brief Clear the history of Web.
482    */
483   virtual void ClearHistory() = 0;
484
485   /**
486    * @brief Clear all tiles resources of Web.
487    */
488   virtual void ClearAllTilesResources() = 0;
489
490   /**
491    * @brief Get user agent string.
492    *
493    * @return The string value of user agent
494    */
495   virtual const std::string& GetUserAgent() const = 0;
496
497   /**
498    * @brief Set user agent string.
499    *
500    * @param[in] userAgent The string value of user agent
501    */
502   virtual void SetUserAgent(const std::string& userAgent) = 0;
503
504   /**
505    * @brief Sets size of Web Page.
506    */
507   virtual void SetSize(int width, int height) = 0;
508
509   /**
510    * @brief Set background color of web page.
511    *
512    * @param[in] color Background color
513    */
514   virtual void SetDocumentBackgroundColor(Dali::Vector4 color) = 0;
515
516   /**
517    * @brief Clear tiles when hidden.
518    *
519    * @param[in] cleared Whether tiles are cleared or not
520    */
521   virtual void ClearTilesWhenHidden(bool cleared) = 0;
522
523   /**
524    * @brief Set multiplier of cover area of tile.
525    *
526    * @param[in] multiplier The multiplier of cover area
527    */
528   virtual void SetTileCoverAreaMultiplier(float multiplier) = 0;
529
530   /**
531    * @brief Enable cursor by client.
532    *
533    * @param[in] enabled Whether cursor is enabled or not
534    */
535   virtual void EnableCursorByClient(bool enabled) = 0;
536
537   /**
538    * @brief Get the selected text.
539    *
540    * @return the selected text
541    */
542   virtual std::string GetSelectedText() const = 0;
543
544   /**
545    * @brief Send Touch Events.
546    */
547   virtual bool SendTouchEvent(const TouchEvent& touch) = 0;
548
549   /**
550    * @brief Send Key Events.
551    */
552   virtual bool SendKeyEvent(const KeyEvent& event) = 0;
553
554   /**
555    * @brief Support mouse events or not.
556    * @param[in] enabled True if enabled, false othewise.
557    */
558   virtual void EnableMouseEvents(bool enabled) = 0;
559
560   /**
561    * @brief Support key events or not.
562    * @param[in] enabled True if enabled, false othewise.
563    */
564   virtual void EnableKeyEvents(bool enabled) = 0;
565
566   /**
567    * @brief Set focus.
568    * @param[in] focused True if focus is gained, false lost.
569    */
570   virtual void SetFocus(bool focused) = 0;
571
572   /**
573    * @brief Set zoom factor of the current page.
574    * @param[in] zoomFactor a new factor to be set.
575    */
576   virtual void SetPageZoomFactor(float zoomFactor) = 0;
577
578   /**
579    * @brief Query the current zoom factor of the page。
580    * @return The current page zoom factor.
581    */
582   virtual float GetPageZoomFactor() const = 0;
583
584   /**
585    * @brief Set the current text zoom level。.
586    * @param[in] zoomFactor a new factor to be set.
587    */
588   virtual void SetTextZoomFactor(float zoomFactor) = 0;
589
590   /**
591    * @brief Get the current text zoom level.
592    * @return The current text zoom factor.
593    */
594   virtual float GetTextZoomFactor() const = 0;
595
596   /**
597    * @brief Get the current load progress of the page.
598    * @return The load progress of the page.
599    */
600   virtual float GetLoadProgressPercentage() const = 0;
601
602   /**
603    * @brief Scale the current page, centered at the given point.
604    * @param[in] scaleFactor a new factor to be scaled.
605    * @param[in] point a center coordinate.
606    */
607   virtual void SetScaleFactor(float scaleFactor, Dali::Vector2 point) = 0;
608
609   /**
610    * @brief Get the current scale factor of the page.
611    * @return The current scale factor.
612    */
613   virtual float GetScaleFactor() const = 0;
614
615   /**
616    * @brief Request to activate/deactivate the accessibility usage set by web app.
617    * @param[in] activated Activate accessibility or not.
618    */
619   virtual void ActivateAccessibility(bool activated) = 0;
620
621   /**
622    * @brief Request to set the current page's visibility.
623    * @param[in] visible Visible or not.
624    *
625    * @return true if succeeded, false otherwise
626    */
627   virtual bool SetVisibility(bool visible) = 0;
628
629   /**
630    * @brief Search and highlight the given string in the document.
631    * @param[in] text The text to find
632    * @param[in] options The options to find
633    * @param[in] maxMatchCount The maximum match count to find
634    *
635    * @return true if found & highlighted, false otherwise
636    */
637   virtual bool HighlightText(const std::string& text, FindOption options, uint32_t maxMatchCount) = 0;
638
639   /**
640    * @brief Add dynamic certificate path.
641    * @param[in] host host that required client authentication
642    * @param[in] certPath the file path stored certificate
643    */
644   virtual void AddDynamicCertificatePath(const std::string& host, const std::string& certPath) = 0;
645
646   /**
647    * @brief Get snapshot of the specified viewArea of page.
648    *
649    * @param[in] viewArea The rectangle of screen shot
650    * @param[in] scaleFactor The scale factor
651    *
652    * @return pixel data of screen shot
653    */
654   virtual Dali::PixelData GetScreenshot(Dali::Rect<int> viewArea, float scaleFactor) = 0;
655
656   /**
657    * @brief Request to get snapshot of the specified viewArea of page asynchronously.
658    *
659    * @param[in] viewArea The rectangle of screen shot
660    * @param[in] scaleFactor The scale factor
661    * @param[in] callback The callback for screen shot
662    *
663    * @return true if requested successfully, false otherwise
664    */
665   virtual bool GetScreenshotAsynchronously(Dali::Rect<int> viewArea, float scaleFactor, ScreenshotCapturedCallback callback) = 0;
666
667   /**
668    * @brief Asynchronously request to check if there is a video playing in the given view.
669    *
670    * @param[in] callback The callback called after checking if video is playing or not
671    *
672    * @return true if requested successfully, false otherwise
673    */
674   virtual bool CheckVideoPlayingAsynchronously(VideoPlayingCallback callback) = 0;
675
676   /**
677    * @brief Set callback which will be called upon geolocation permission request.
678    *
679    * @param[in] callback The callback for requesting geolocation permission
680    */
681   virtual void RegisterGeolocationPermissionCallback(GeolocationPermissionCallback callback) = 0;
682
683   /**
684    * @brief Update display area.
685    * @param[in] displayArea The display area need be updated.
686    */
687   virtual void UpdateDisplayArea(Dali::Rect<int> displayArea) = 0;
688
689   /**
690    * @brief Enable video hole.
691    * @param[in] enabled True if enabled, false othewise.
692    */
693   virtual void EnableVideoHole(bool enabled) = 0;
694
695   /**
696    * @brief Send Hover Events.
697    * @param[in] event The hover event would be sent.
698    */
699   virtual bool SendHoverEvent(const HoverEvent& event) = 0;
700
701   /**
702    * @brief Send Wheel Events.
703    * @param[in] event The wheel event would be sent.
704    */
705   virtual bool SendWheelEvent(const WheelEvent& event) = 0;
706
707   /**
708    * @brief Connect to this signal to be notified when page loading is started.
709    *
710    * @return A signal object to connect with.
711    */
712   virtual WebEnginePageLoadSignalType& PageLoadStartedSignal() = 0;
713
714   /**
715    * @brief Connect to this signal to be notified when page loading is in progress.
716    *
717    * @return A signal object to connect with.
718    */
719   virtual WebEnginePageLoadSignalType& PageLoadInProgressSignal() = 0;
720
721   /**
722    * @brief Connect to this signal to be notified when page loading is finished.
723    *
724    * @return A signal object to connect with.
725    */
726   virtual WebEnginePageLoadSignalType& PageLoadFinishedSignal() = 0;
727
728   /**
729    * @brief Connect to this signal to be notified when an error occurs in page loading.
730    *
731    * @return A signal object to connect with.
732    */
733   virtual WebEnginePageLoadErrorSignalType& PageLoadErrorSignal() = 0;
734
735   /**
736    * @brief Connect to this signal to be notified when scroll edge is reached.
737    *
738    * @return A signal object to connect with.
739    */
740   virtual WebEngineScrollEdgeReachedSignalType& ScrollEdgeReachedSignal() = 0;
741
742   /**
743    * @brief Connect to this signal to be notified when url is changed.
744    *
745    * @return A signal object to connect with.
746    */
747   virtual WebEngineUrlChangedSignalType& UrlChangedSignal() = 0;
748
749   /**
750    * @brief Connect to this signal to be notified when form repost decision is requested.
751    *
752    * @return A signal object to connect with.
753    */
754   virtual WebEngineFormRepostDecisionSignalType& FormRepostDecisionSignal() = 0;
755
756   /**
757    * @brief Connect to this signal to be notified when frame is rendered.
758    *
759    * @return A signal object to connect with.
760    */
761   virtual WebEngineFrameRenderedSignalType& FrameRenderedSignal() = 0;
762
763   /**
764    * @brief Connects to this signal to be notified when http request need be intercepted.
765    *
766    * @return A signal object to connect with.
767    */
768   virtual WebEngineRequestInterceptorSignalType& RequestInterceptorSignal() = 0;
769
770   /**
771    * @brief Connect to this signal to be notified when console message will be logged.
772    *
773    * @return A signal object to connect with.
774    */
775   virtual WebEngineConsoleMessageSignalType& ConsoleMessageSignal() = 0;
776
777   /**
778    * @brief Connects to this signal to be notified when new policy would be decided.
779    *
780    * @return A signal object to connect with.
781    */
782   virtual WebEnginePolicyDecisionSignalType& PolicyDecisionSignal() = 0;
783
784   /**
785    * @brief Connects to this signal to be notified when certificate need be confirmed.
786    *
787    * @return A signal object to connect with.
788    */
789   virtual WebEngineCertificateSignalType& CertificateConfirmSignal() = 0;
790
791   /**
792    * @brief Connects to this signal to be notified when ssl certificate is changed.
793    *
794    * @return A signal object to connect with.
795    */
796   virtual WebEngineCertificateSignalType& SslCertificateChangedSignal() = 0;
797
798   /**
799    * @brief Connects to this signal to be notified when http authentication need be confirmed.
800    *
801    * @return A signal object to connect with.
802    */
803   virtual WebEngineHttpAuthHandlerSignalType& HttpAuthHandlerSignal() = 0;
804 };
805
806 // specialization has to be done in the same namespace
807 template<>
808 struct EnableBitMaskOperators<WebEnginePlugin::FindOption>
809 {
810   static const bool ENABLE = true;
811 };
812
813 } // namespace Dali
814
815 #endif