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