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