1 #ifndef DALI_WEB_ENGINE_PLUGIN_H
2 #define DALI_WEB_ENGINE_PLUGIN_H
5 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/images/native-image-interface.h>
23 #include <dali/public-api/math/rect.h>
28 #include <dali/devel-api/adaptor-framework/accessibility.h>
29 #include <dali/devel-api/adaptor-framework/web-engine/web-engine-hit-test.h>
30 #include <dali/devel-api/common/bitwise-enum.h>
31 #include <dali/public-api/adaptor-framework/native-image-source.h>
38 class WebEngineBackForwardList;
39 class WebEngineCertificate;
40 class WebEngineConsoleMessage;
41 class WebEngineContextMenu;
42 class WebEngineFormRepostDecision;
43 class WebEngineHitTest;
44 class WebEngineHttpAuthHandler;
45 class WebEngineLoadError;
46 class WebEnginePolicyDecision;
47 class WebEngineSettings;
52 * @brief WebEnginePlugin is an abstract interface, used by dali-adaptor to access WebEngine plugin.
53 * A concrete implementation must be created for each platform and provided as dynamic library.
59 * @brief WebEngine callback related with page loading.
61 using WebEnginePageLoadCallback = std::function<void(const std::string&)>;
64 * @brief WebView callback related with page loading error.
66 using WebEnginePageLoadErrorCallback = std::function<void(std::unique_ptr<Dali::WebEngineLoadError>)>;
68 // forward declaration.
69 enum class ScrollEdge;
72 * @brief WebView callback related with scroll edge reached.
74 using WebEngineScrollEdgeReachedCallback = std::function<void(const ScrollEdge)>;
77 * @brief WebView callback related with page url changed.
79 using WebEngineUrlChangedCallback = std::function<void(const std::string&)>;
82 * @brief WebView callback related with screen captured.
84 using ScreenshotCapturedCallback = std::function<void(Dali::PixelData)>;
87 * @brief WebView callback related with geolocation permission.
88 * Host and protocol of security origin will be provided when requesting
89 * geolocation permission.
90 * It returns true if a pop-up is created successfully, false otherwise.
92 using GeolocationPermissionCallback = std::function<bool(const std::string&, const std::string&)>;
95 * @brief WebView callback related with video playing.
97 using VideoPlayingCallback = std::function<void(bool)>;
100 * @brief WebView callback related with console message logged.
102 using WebEngineConsoleMessageReceivedCallback = std::function<void(std::unique_ptr<Dali::WebEngineConsoleMessage>)>;
105 * @brief WebView callback related with certificate changed.
107 using WebEngineCertificateCallback = std::function<void(std::unique_ptr<Dali::WebEngineCertificate>)>;
110 * @brief WebView callback related with http authentication.
112 using WebEngineHttpAuthHandlerCallback = std::function<void(std::unique_ptr<Dali::WebEngineHttpAuthHandler>)>;
115 * @brief WebView callback related with context menu shown.
117 using WebEngineContextMenuShownCallback = std::function<void(std::unique_ptr<Dali::WebEngineContextMenu>)>;
120 * @brief WebView callback related with context menu hidden.
122 using WebEngineContextMenuHiddenCallback = std::function<void(std::unique_ptr<Dali::WebEngineContextMenu>)>;
125 * @brief Message result callback when JavaScript is executed with a message.
127 using JavaScriptMessageHandlerCallback = std::function<void(const std::string&)>;
130 * @brief Alert callback when JavaScript alert is called with a message.
131 * It returns true if a pop-up is created successfully, false otherwise.
133 using JavaScriptAlertCallback = std::function<bool(const std::string&)>;
136 * @brief Confirm callback when JavaScript confirm is called with a message.
137 * It returns true if a pop-up is created successfully, false otherwise.
139 using JavaScriptConfirmCallback = std::function<bool(const std::string&)>;
142 * @brief Prompt callback when JavaScript prompt is called with a message
143 * and an optional value that is the default value for the input field.
144 * It returns true if a pop-up is created successfully, false otherwise.
146 using JavaScriptPromptCallback = std::function<bool(const std::string&, const std::string&)>;
149 * @brief WebView callback related with form repost decision.
151 using WebEngineFormRepostDecidedCallback = std::function<void(std::unique_ptr<Dali::WebEngineFormRepostDecision>)>;
154 * @brief WebView callback related with frame rendered.
156 using WebEngineFrameRenderedCallback = std::function<void(void)>;
159 * @brief WebView callback related with response policy would be decided.
161 using WebEngineResponsePolicyDecidedCallback = std::function<void(std::unique_ptr<Dali::WebEnginePolicyDecision>)>;
164 * @brief WebView callback related with navigation policy would be decided.
166 using WebEngineNavigationPolicyDecidedCallback = std::function<void(std::unique_ptr<Dali::WebEnginePolicyDecision>)>;
169 * @brief WebView callback related with new window policy would be decided.
171 using WebEngineNewWindowPolicyDecidedCallback = std::function<void(std::unique_ptr<Dali::WebEnginePolicyDecision>)>;
174 * @brief WebView callback related with a new window would be created.
176 using WebEngineNewWindowCreatedCallback = std::function<void(Dali::WebEnginePlugin*&)>;
179 * @brief Hit test callback called after hit test is created asynchronously.
181 using WebEngineHitTestCreatedCallback = std::function<bool(std::unique_ptr<Dali::WebEngineHitTest>)>;
184 * @brief WebView callback called after fullscreen is entered.
186 using WebEngineFullscreenEnteredCallback = std::function<void(void)>;
189 * @brief WebView callback called after fullscreen is exited.
191 using WebEngineFullscreenExitedCallback = std::function<void(void)>;
194 * @brief WebView callback called after text is found.
196 using WebEngineTextFoundCallback = std::function<void(uint32_t)>;
199 * @brief The callback to be called when the web engine received a plain text of current web page.
201 using PlainTextReceivedCallback = std::function<void(const std::string&)>;
204 * @brief Enumeration for the scroll edge.
206 enum class ScrollEdge
208 LEFT, ///< Left edge reached.
209 RIGHT, ///< Right edge reached.
210 TOP, ///< Top edge reached.
211 BOTTOM, ///< Bottom edge reached.
215 * @brief Enumeration that provides the option to find text.
217 enum class FindOption
219 NONE = 0, ///< No search flags, this means a case sensitive, no wrap, forward only search
220 CASE_INSENSITIVE = 1 << 0, ///< Case insensitive search
221 AT_WORD_STARTS = 1 << 1, ///< Search text only at the beginning of the words
222 TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2, ///< Treat capital letters in the middle of words as word start
223 BACKWARDS = 1 << 3, ///< Search backwards
224 WRAP_AROUND = 1 << 4, ///< If not present the search stops at the end of the document
225 SHOW_OVERLAY = 1 << 5, ///< Show overlay
226 SHOW_FIND_INDICATOR = 1 << 6, ///< Show indicator
227 SHOW_HIGHLIGHT = 1 << 7, ///< Show highlight
231 * @brief Constructor.
233 WebEnginePlugin() = default;
238 virtual ~WebEnginePlugin() = default;
241 * @brief Create WebEngine instance.
243 * @param [in] width The width of Web
244 * @param [in] height The height of Web
245 * @param [in] locale The locale of Web
246 * @param [in] timezoneId The timezoneID of Web
248 virtual void Create(uint32_t width, uint32_t height, const std::string& locale, const std::string& timezoneId) = 0;
251 * @brief Create WebEngine instance.
253 * @param [in] width The width of Web
254 * @param [in] height The height of Web
255 * @param [in] argc The count of application arguments
256 * @param [in] argv The string array of application arguments
258 virtual void Create(uint32_t width, uint32_t height, uint32_t argc, char** argv) = 0;
261 * @brief Destroy WebEngine instance.
263 virtual void Destroy() = 0;
266 * @brief Get settings of WebEngine.
268 virtual WebEngineSettings& GetSettings() const = 0;
271 * @brief Get back-forward list of WebEngine.
273 virtual WebEngineBackForwardList& GetBackForwardList() const = 0;
276 * @brief Load a web page based on a given URL.
278 * @param [in] url The URL of the resource to load
280 virtual void LoadUrl(const std::string& url) = 0;
283 * @brief Return the title of the Web.
285 * @return The title of web page
287 virtual std::string GetTitle() const = 0;
290 * @brief Return the Favicon of the Web.
292 * @return Favicon of Dali::PixelData& type
294 virtual Dali::PixelData GetFavicon() const = 0;
297 * @brief Get image to render.
299 virtual NativeImageSourcePtr GetNativeImageSource() = 0;
302 * @brief Change orientation.
304 virtual void ChangeOrientation(int orientation) = 0;
307 * @brief Return the URL of the Web.
309 * @return Url of string type
311 virtual std::string GetUrl() const = 0;
314 * @brief Load a given string as web contents.
316 * @param [in] htmlString The string to use as the contents of the web page
318 virtual void LoadHtmlString(const std::string& htmlString) = 0;
321 * @brief Load the specified html string as the content of the view overriding current history entry
323 * @param[in] html HTML data to load
324 * @param[in] basicUri Base URL used for relative paths to external objects
325 * @param[in] unreachableUrl URL that could not be reached
327 * @return true if successfully loaded, false otherwise
329 virtual bool LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri, const std::string& unreachableUrl) = 0;
332 * @brief Request loading the given contents by MIME type into the view object
334 * @param[in] contents The content to load
335 * @param[in] contentSize The size of contents (in bytes)
336 * @param[in] mimeType The type of contents, if 0 is given "text/html" is assumed
337 * @param[in] encoding The encoding for contents, if 0 is given "UTF-8" is assumed
338 * @param[in] baseUri The base URI to use for relative resources
340 * @return true if successfully request, false otherwise
342 virtual bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) = 0;
345 * @brief Reload the Web.
347 virtual void Reload() = 0;
350 * @brief Reload the current page's document without cache
352 virtual bool ReloadWithoutCache() = 0;
355 * @brief Stop loading web contents on the current page.
357 virtual void StopLoading() = 0;
360 * @brief Suspend the operation associated with the view.
362 virtual void Suspend() = 0;
365 * @brief Resume the operation associated with the view object after calling Suspend().
367 virtual void Resume() = 0;
370 * @brief To suspend all url loading
372 virtual void SuspendNetworkLoading() = 0;
375 * @brief To resume new url network loading
377 virtual void ResumeNetworkLoading() = 0;
380 * @brief Add custom header
382 * @param[in] name custom header name to add the custom header
383 * @param[in] value custom header value to add the custom header
385 * @return true if succeeded, false otherwise
387 virtual bool AddCustomHeader(const std::string& name, const std::string& value) = 0;
390 * @brief Remove custom header
392 * @param[in] name custom header name to remove the custom header
394 * @return true if succeeded, false otherwise
396 virtual bool RemoveCustomHeader(const std::string& name) = 0;
399 * @brief Start the inspector server
401 * @param[in] port port number
403 * @return the port number
405 virtual uint32_t StartInspectorServer(uint32_t port) = 0;
408 * @brief Stop the inspector server
410 * @return true if succeeded, false otherwise
412 virtual bool StopInspectorServer() = 0;
415 * @brief Scroll web page of view by deltaX and deltaY.
417 * @param[in] deltaX horizontal offset to scroll
418 * @param[in] deltaY vertical offset to scroll
420 virtual void ScrollBy(int32_t deltaX, int32_t deltaY) = 0;
423 * @brief Scroll edge of view by deltaX and deltaY.
425 * @param[in] deltaX horizontal offset to scroll
426 * @param[in] deltaY vertical offset to scroll
428 * @return true if succeeded, false otherwise
430 virtual bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY) = 0;
433 * @brief Scroll to the specified position of the given view.
435 virtual void SetScrollPosition(int32_t x, int32_t y) = 0;
438 * @brief Get the current scroll position of the given view.
440 virtual Dali::Vector2 GetScrollPosition() const = 0;
443 * @brief Get the possible scroll size of the given view.
445 virtual Dali::Vector2 GetScrollSize() const = 0;
448 * @brief Get the last known content's size.
450 virtual Dali::Vector2 GetContentSize() const = 0;
453 * @brief Return whether forward is possible.
455 * @return True if forward is possible, false otherwise
457 virtual bool CanGoForward() = 0;
460 * @brief Go to forward.
462 virtual void GoForward() = 0;
465 * @brief Return whether backward is possible.
467 * @return True if backward is possible, false otherwise
469 virtual bool CanGoBack() = 0;
474 virtual void GoBack() = 0;
477 * @brief Evaluate JavaScript code represented as a string.
479 * @param[in] script The JavaScript code
480 * @param[in] resultHandler The callback function to be called by the JavaScript runtime. This carries evaluation result.
482 virtual void EvaluateJavaScript(const std::string& script, JavaScriptMessageHandlerCallback resultHandler) = 0;
485 * @brief Add a message handler into JavaScript.
487 * @param[in] exposedObjectName The name of exposed object
488 * @param[in] handler The callback function
490 virtual void AddJavaScriptMessageHandler(const std::string& exposedObjectName, JavaScriptMessageHandlerCallback handler) = 0;
493 * @brief Register a callback for JavaScript alert.
495 * @param[in] callback The callback function
497 virtual void RegisterJavaScriptAlertCallback(JavaScriptAlertCallback callback) = 0;
500 * @brief Reply for JavaScript alert.
502 virtual void JavaScriptAlertReply() = 0;
505 * @brief Register a callback for JavaScript confirm.
507 * @param[in] callback The callback function
509 virtual void RegisterJavaScriptConfirmCallback(JavaScriptConfirmCallback callback) = 0;
512 * @brief Reply for JavaScript confirm.
514 virtual void JavaScriptConfirmReply(bool confirmed) = 0;
517 * @brief Register a callback for JavaScript prompt.
519 * @param[in] callback The callback function
521 virtual void RegisterJavaScriptPromptCallback(JavaScriptPromptCallback callback) = 0;
524 * @brief Reply for JavaScript prompt.
526 virtual void JavaScriptPromptReply(const std::string& result) = 0;
529 * @brief Create a new hit test.
531 * @param[in] x the horizontal position to query
532 * @param[in] y the vertical position to query
533 * @param[in] mode the mode of hit test
535 * @return a new hit test object.
537 virtual std::unique_ptr<Dali::WebEngineHitTest> CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode) = 0;
540 * @brief create a hit test asynchronously.
542 * @param[in] x the horizontal position to query
543 * @param[in] y the vertical position to query
544 * @param[in] mode the mode of hit test
545 * @param[in] callback The callback function
547 * @return true if succeeded, false otherwise
549 virtual bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, WebEngineHitTestCreatedCallback callback) = 0;
552 * @brief Clear the history of Web.
554 virtual void ClearHistory() = 0;
557 * @brief Clear all tiles resources of Web.
559 virtual void ClearAllTilesResources() = 0;
562 * @brief Get user agent string.
564 * @return The string value of user agent
566 virtual std::string GetUserAgent() const = 0;
569 * @brief Set user agent string.
571 * @param[in] userAgent The string value of user agent
573 virtual void SetUserAgent(const std::string& userAgent) = 0;
576 * @brief Set size of Web Page.
578 virtual void SetSize(uint32_t width, uint32_t height) = 0;
581 * @brief Set background color of web page.
583 * @param[in] color Background color
585 virtual void SetDocumentBackgroundColor(Dali::Vector4 color) = 0;
588 * @brief Clear tiles when hidden.
590 * @param[in] cleared Whether tiles are cleared or not
592 virtual void ClearTilesWhenHidden(bool cleared) = 0;
595 * @brief Set multiplier of cover area of tile.
597 * @param[in] multiplier The multiplier of cover area
599 virtual void SetTileCoverAreaMultiplier(float multiplier) = 0;
602 * @brief Enable cursor by client.
604 * @param[in] enabled Whether cursor is enabled or not
606 virtual void EnableCursorByClient(bool enabled) = 0;
609 * @brief Get the selected text.
611 * @return the selected text
613 virtual std::string GetSelectedText() const = 0;
616 * @brief Send Touch Events.
618 virtual bool SendTouchEvent(const TouchEvent& touch) = 0;
621 * @brief Send Key Events.
623 virtual bool SendKeyEvent(const KeyEvent& event) = 0;
626 * @brief Support mouse events or not.
627 * @param[in] enabled True if enabled, false othewise.
629 virtual void EnableMouseEvents(bool enabled) = 0;
632 * @brief Support key events or not.
633 * @param[in] enabled True if enabled, false othewise.
635 virtual void EnableKeyEvents(bool enabled) = 0;
639 * @param[in] focused True if focus is gained, false lost.
641 virtual void SetFocus(bool focused) = 0;
644 * @brief Set zoom factor of the current page.
645 * @param[in] zoomFactor a new factor to be set.
647 virtual void SetPageZoomFactor(float zoomFactor) = 0;
650 * @brief Query the current zoom factor of the page。
651 * @return The current page zoom factor.
653 virtual float GetPageZoomFactor() const = 0;
656 * @brief Set the current text zoom level。.
657 * @param[in] zoomFactor a new factor to be set.
659 virtual void SetTextZoomFactor(float zoomFactor) = 0;
662 * @brief Get the current text zoom level.
663 * @return The current text zoom factor.
665 virtual float GetTextZoomFactor() const = 0;
668 * @brief Get the current load progress of the page.
669 * @return The load progress of the page.
671 virtual float GetLoadProgressPercentage() const = 0;
674 * @brief Scale the current page, centered at the given point.
675 * @param[in] scaleFactor a new factor to be scaled.
676 * @param[in] point a center coordinate.
678 virtual void SetScaleFactor(float scaleFactor, Dali::Vector2 point) = 0;
681 * @brief Get the current scale factor of the page.
682 * @return The current scale factor.
684 virtual float GetScaleFactor() const = 0;
687 * @brief Request to activate/deactivate the accessibility usage set by web app.
688 * @param[in] activated Activate accessibility or not.
690 virtual void ActivateAccessibility(bool activated) = 0;
693 * @brief Get the accessibility address (bus and path) for embedding.
694 * @return Accessibility address of the root web content element.
696 virtual Accessibility::Address GetAccessibilityAddress() = 0;
699 * @brief Request to set the current page's visibility.
700 * @param[in] visible Visible or not.
702 * @return true if succeeded, false otherwise
704 virtual bool SetVisibility(bool visible) = 0;
707 * @brief Search and highlight the given string in the document.
708 * @param[in] text The text to find
709 * @param[in] options The options to find
710 * @param[in] maxMatchCount The maximum match count to find
712 * @return true if found & highlighted, false otherwise
714 virtual bool HighlightText(const std::string& text, FindOption options, uint32_t maxMatchCount) = 0;
717 * @brief Add dynamic certificate path.
718 * @param[in] host host that required client authentication
719 * @param[in] certPath the file path stored certificate
721 virtual void AddDynamicCertificatePath(const std::string& host, const std::string& certPath) = 0;
724 * @brief Get snapshot of the specified viewArea of page.
726 * @param[in] viewArea The rectangle of screen shot
727 * @param[in] scaleFactor The scale factor
729 * @return pixel data of screen shot
731 virtual Dali::PixelData GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor) = 0;
734 * @brief Request to get snapshot of the specified viewArea of page asynchronously.
736 * @param[in] viewArea The rectangle of screen shot
737 * @param[in] scaleFactor The scale factor
738 * @param[in] callback The callback for screen shot
740 * @return true if requested successfully, false otherwise
742 virtual bool GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, ScreenshotCapturedCallback callback) = 0;
745 * @brief Asynchronously request to check if there is a video playing in the given view.
747 * @param[in] callback The callback called after checking if video is playing or not
749 * @return true if requested successfully, false otherwise
751 virtual bool CheckVideoPlayingAsynchronously(VideoPlayingCallback callback) = 0;
754 * @brief Set callback which will be called upon geolocation permission request.
756 * @param[in] callback The callback for requesting geolocation permission
758 virtual void RegisterGeolocationPermissionCallback(GeolocationPermissionCallback callback) = 0;
761 * @brief Update display area.
762 * @param[in] displayArea The display area need be updated.
764 virtual void UpdateDisplayArea(Dali::Rect<int32_t> displayArea) = 0;
767 * @brief Enable video hole.
768 * @param[in] enabled True if enabled, false othewise.
770 virtual void EnableVideoHole(bool enabled) = 0;
773 * @brief Send Hover Events.
774 * @param[in] event The hover event would be sent.
776 virtual bool SendHoverEvent(const HoverEvent& event) = 0;
779 * @brief Send Wheel Events.
780 * @param[in] event The wheel event would be sent.
782 virtual bool SendWheelEvent(const WheelEvent& event) = 0;
785 * @brief Exit fullscreen.
787 virtual void ExitFullscreen() = 0;
790 * @brief Callback to be called when frame would be rendered.
792 * @param[in] callback
794 virtual void RegisterFrameRenderedCallback(WebEngineFrameRenderedCallback callback) = 0;
797 * @brief Callback to be called when page loading is started.
799 * @param[in] callback
801 virtual void RegisterPageLoadStartedCallback(WebEnginePageLoadCallback callback) = 0;
804 * @brief Callback to be called when page loading is in progress.
806 * @param[in] callback
808 virtual void RegisterPageLoadInProgressCallback(WebEnginePageLoadCallback callback) = 0;
811 * @brief Callback to be called when page loading is finished.
813 * @param[in] callback
815 virtual void RegisterPageLoadFinishedCallback(WebEnginePageLoadCallback callback) = 0;
818 * @brief Callback to be called when an error occurs in page loading.
820 * @param[in] callback
822 virtual void RegisterPageLoadErrorCallback(WebEnginePageLoadErrorCallback callback) = 0;
825 * @brief Callback to be called when scroll edge is reached.
827 * @param[in] callback
829 virtual void RegisterScrollEdgeReachedCallback(WebEngineScrollEdgeReachedCallback callback) = 0;
832 * @brief Callback to be called when url is changed.
834 * @param[in] callback
836 virtual void RegisterUrlChangedCallback(WebEngineUrlChangedCallback callback) = 0;
839 * @brief Callback to be called when form repost decision is requested.
841 * @param[in] callback
843 virtual void RegisterFormRepostDecidedCallback(WebEngineFormRepostDecidedCallback callback) = 0;
846 * @brief Callback to be called when console message will be logged.
848 * @param[in] callback
850 virtual void RegisterConsoleMessageReceivedCallback(WebEngineConsoleMessageReceivedCallback callback) = 0;
853 * @brief Callback to be called when response policy would be decided.
855 * @param[in] callback
857 virtual void RegisterResponsePolicyDecidedCallback(WebEngineResponsePolicyDecidedCallback callback) = 0;
860 * @brief Callback to be called when navigation policy would be decided.
862 * @param[in] callback
864 virtual void RegisterNavigationPolicyDecidedCallback(WebEngineNavigationPolicyDecidedCallback callback) = 0;
867 * @brief Callback to be called when new window policy would be decided.
869 * @param[in] callback
871 virtual void RegisterNewWindowPolicyDecidedCallback(WebEngineNewWindowPolicyDecidedCallback callback) = 0;
874 * @brief Callback to be called when a new window would be created.
876 * @param[in] callback
878 virtual void RegisterNewWindowCreatedCallback(WebEngineNewWindowCreatedCallback callback) = 0;
881 * @brief Callback to be called when certificate need be confirmed.
883 * @param[in] callback
885 virtual void RegisterCertificateConfirmedCallback(WebEngineCertificateCallback callback) = 0;
888 * @brief Callback to be called when ssl certificate is changed.
890 * @param[in] callback
892 virtual void RegisterSslCertificateChangedCallback(WebEngineCertificateCallback callback) = 0;
895 * @brief Callback to be called when http authentication need be confirmed.
897 * @param[in] callback
899 virtual void RegisterHttpAuthHandlerCallback(WebEngineHttpAuthHandlerCallback callback) = 0;
902 * @brief Callback to be called when context menu would be shown.
904 * @param[in] callback
906 virtual void RegisterContextMenuShownCallback(WebEngineContextMenuShownCallback callback) = 0;
909 * @brief Callback to be called when context menu would be hidden.
911 * @param[in] callback
913 virtual void RegisterContextMenuHiddenCallback(WebEngineContextMenuHiddenCallback callback) = 0;
916 * @brief Callback to be called when fullscreen would be entered.
918 * @param[in] callback
920 virtual void RegisterFullscreenEnteredCallback(WebEngineFullscreenEnteredCallback callback) = 0;
923 * @brief Callback to be called when fullscreen would be exited.
925 * @param[in] callback
927 virtual void RegisterFullscreenExitedCallback(WebEngineFullscreenExitedCallback callback) = 0;
930 * @brief Callback to be called when text would be found.
932 * @param[in] callback
934 virtual void RegisterTextFoundCallback(WebEngineTextFoundCallback callback) = 0;
937 * @brief Get a plain text of current web page asynchronously.
939 * @param[in] callback The callback function called asynchronously.
941 virtual void GetPlainTextAsynchronously(PlainTextReceivedCallback callback) = 0;
944 // specialization has to be done in the same namespace
946 struct EnableBitMaskOperators<WebEnginePlugin::FindOption>
948 static const bool ENABLE = true;