X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-web-engine.cpp;h=8f8853c369595e1739aa94b5edf8cf0ae58a20ea;hp=14f2c1f6212fbffc0c519217eb2aad7f006aef3d;hb=8ebe42b2ca06a57a08b02a975146af34c1b9bcd6;hpb=ee67cff961ec6b3003586c542dc473dd980c18c9 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp index 14f2c1f..8f8853c 100755 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp @@ -23,18 +23,23 @@ #include #include #include +#include +#include #include #include #include +#include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -49,14 +54,16 @@ namespace Adaptor { class WebEngine; +class MockWebEngineContext; namespace { // Generally only one WebEngine instance exists. // If > 1, a new web engine has been created by CreateWindowSignal. -static WebEngine* gInstance = 0; +static WebEngine* gInstance = nullptr; static int gInstanceCount = 0; +static MockWebEngineContext* gWebEngineContextInstance = nullptr; bool OnGoBack(); bool OnGoForward(); @@ -65,11 +72,20 @@ bool OnEvaluteJavaScript(); bool OnJavaScriptAlert(); bool OnJavaScriptConfirm(); bool OnJavaScriptPrompt(); +bool OnHitTestCreated(); bool OnScrollEdge(); bool OnScreenshotCaptured(); bool OnVideoPlaying(); bool OnGeolocationPermission(); bool OnClearHistory(); +bool OnSecurityOriginAcquired(); +bool OnStorageUsageAcquired(); +bool OnFormPasswordAcquired(); +bool OnDownloadStarted(); +bool OnMimeOverridden(); +bool OnRequestIntercepted(); +bool OnChangesWatch(); +bool OnPlainTextReceived(); static void ConnectToGlobalSignal( bool ( *func )() ) { @@ -104,6 +120,22 @@ public: void SetProxyUri( const std::string& uri ) override { + mockProxyUri = uri; + } + + std::string GetProxyUri() const override + { + return mockProxyUri; + } + + void SetProxyBypassRule(const std::string& proxy, const std::string& bypass) override + { + mockBypassRule = bypass; + } + + std::string GetProxyBypassRule() const override + { + return mockBypassRule; } void SetDefaultProxyAuth( const std::string& username, const std::string& password ) override @@ -112,21 +144,63 @@ public: void SetCertificateFilePath( const std::string& certificatePath ) override { + mockCertificateFilePath = certificatePath; } - void DeleteWebDatabase() override + std::string GetCertificateFilePath() const override { + return mockCertificateFilePath; } - void DeleteWebStorage() override + void DeleteAllWebDatabase() override { } - void DeleteLocalFileSystem() override + bool GetWebDatabaseOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback) override + { + if (callback) + { + ConnectToGlobalSignal(&OnSecurityOriginAcquired); + mSecurityOriginAcquiredCallback = callback; + } + return true; + } + + bool DeleteWebDatabase(Dali::WebEngineSecurityOrigin& origin) override + { + return true; + } + + bool GetWebStorageOrigins(Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback callback) override + { + if (callback) + { + ConnectToGlobalSignal(&OnSecurityOriginAcquired); + mSecurityOriginAcquiredCallback = callback; + } + return true; + } + + bool GetWebStorageUsageForOrigin(Dali::WebEngineSecurityOrigin& origin, Dali::WebEngineContext::WebEngineStorageUsageAcquiredCallback callback) override + { + if (callback) + { + ConnectToGlobalSignal(&OnStorageUsageAcquired); + mStorageUsageAcquiredCallback = callback; + } + return true; + } + + void DeleteAllWebStorage() override + { + } + + bool DeleteWebStorage(Dali::WebEngineSecurityOrigin& origin) override { + return true; } - void DisableCache( bool cacheDisabled ) override + void DeleteLocalFileSystem() override { } @@ -134,8 +208,138 @@ public: { } + bool DeleteApplicationCache(Dali::WebEngineSecurityOrigin& origin) override + { + return true; + } + + void GetFormPasswordList(Dali::WebEngineContext::WebEngineFormPasswordAcquiredCallback callback) override + { + if (callback) + { + ConnectToGlobalSignal(&OnFormPasswordAcquired); + mFormPasswordAcquiredCallback = callback; + } + } + + void RegisterDownloadStartedCallback(Dali::WebEngineContext::WebEngineDownloadStartedCallback callback) override + { + if (callback) + { + ConnectToGlobalSignal(&OnDownloadStarted); + mDownloadStartedCallback = callback; + } + } + + void RegisterMimeOverriddenCallback(Dali::WebEngineContext::WebEngineMimeOverriddenCallback callback) override + { + if (callback) + { + ConnectToGlobalSignal(&OnMimeOverridden); + mMimeOverriddenCallback = callback; + } + } + + void RegisterRequestInterceptedCallback(Dali::WebEngineContext::WebEngineRequestInterceptedCallback callback) override + { + if (callback) + { + ConnectToGlobalSignal(&OnRequestIntercepted); + mRequestInterceptedCallback = callback; + } + } + + void EnableCache( bool cacheEnabled ) override + { + mockCacheEnabled = cacheEnabled; + } + + bool IsCacheEnabled() const override + { + return mockCacheEnabled; + } + + void SetAppId(const std::string& appID) override + { + } + + bool SetAppVersion(const std::string& appVersion) override + { + return true; + } + + void SetApplicationType(const Dali::WebEngineContext::ApplicationType applicationType) override + { + } + + void SetTimeOffset(float timeOffset) override + { + } + + void SetTimeZoneOffset(float timeZoneOffset, float daylightSavingTime) override + { + } + + void RegisterUrlSchemesAsCorsEnabled(const std::vector& schemes) override + { + } + + void RegisterJsPluginMimeTypes(const std::vector& mimeTypes) override + { + } + + void SetDefaultZoomFactor(float zoomFactor) override + { + mockZoomFactor = zoomFactor; + } + + float GetDefaultZoomFactor() const override + { + return mockZoomFactor; + } + + bool DeleteAllApplicationCache() override + { + return true; + } + + bool DeleteAllWebIndexedDatabase() override + { + return true; + } + + void DeleteFormPasswordDataList(const std::vector& list) override + { + } + + void DeleteAllFormPasswordData() override + { + } + + void DeleteAllFormCandidateData() override + { + } + + bool FreeUnusedMemory() override + { + return true; + } + +public: + Dali::WebEngineContext::WebEngineSecurityOriginAcquiredCallback mSecurityOriginAcquiredCallback; + Dali::WebEngineContext::WebEngineStorageUsageAcquiredCallback mStorageUsageAcquiredCallback; + Dali::WebEngineContext::WebEngineFormPasswordAcquiredCallback mFormPasswordAcquiredCallback; + Dali::WebEngineContext::WebEngineDownloadStartedCallback mDownloadStartedCallback; + Dali::WebEngineContext::WebEngineMimeOverriddenCallback mMimeOverriddenCallback; + Dali::WebEngineContext::WebEngineRequestInterceptedCallback mRequestInterceptedCallback; + private: Dali::WebEngineContext::CacheModel mockModel; + std::string mockProxyUri; + std::string mockBypassRule; + std::string mockCertificateFilePath; + bool mockCacheEnabled; + float mockZoomFactor; }; class MockWebEngineCookieManager : public Dali::WebEngineCookieManager @@ -164,6 +368,18 @@ public: { } + void ChangesWatch( Dali::WebEngineCookieManager::WebEngineCookieManagerChangesWatchCallback callback ) override + { + if ( callback ) + { + ConnectToGlobalSignal( &OnChangesWatch ); + mChangesWatchCallback = callback; + } + } + +public: + Dali::WebEngineCookieManager::WebEngineCookieManagerChangesWatchCallback mChangesWatchCallback; + private: Dali::WebEngineCookieManager::CookieAcceptPolicy mockCookieAcceptPolicy; }; @@ -203,19 +419,31 @@ class MockWebEngineBackForwardList : public Dali::WebEngineBackForwardList { public: MockWebEngineBackForwardList() - : mockItem(), - pMockItem( &mockItem ) { } - Dali::WebEngineBackForwardListItem& GetCurrentItem() const override + std::unique_ptr GetCurrentItem() const override { - return *pMockItem; + std::unique_ptr ret(new MockWebEngineBackForwardListItem()); + return ret; } - Dali::WebEngineBackForwardListItem& GetItemAtIndex( uint32_t index ) const override + std::unique_ptr GetPreviousItem() const override { - return *pMockItem; + std::unique_ptr ret(new MockWebEngineBackForwardListItem()); + return ret; + } + + std::unique_ptr GetNextItem() const override + { + std::unique_ptr ret(new MockWebEngineBackForwardListItem()); + return ret; + } + + std::unique_ptr GetItemAtIndex( uint32_t index ) const override + { + std::unique_ptr ret(new MockWebEngineBackForwardListItem()); + return ret; } uint32_t GetItemCount() const override @@ -223,11 +451,24 @@ public: return 1; } -private: - MockWebEngineBackForwardListItem mockItem; - WebEngineBackForwardListItem* pMockItem; + std::vector> GetBackwardItems(int limit) override + { + std::vector> ret; + std::unique_ptr item(new MockWebEngineBackForwardListItem()); + ret.push_back(std::move(item)); + return ret; + } + + std::vector> GetForwardItems(int limit) override + { + std::vector> ret; + std::unique_ptr item(new MockWebEngineBackForwardListItem()); + ret.push_back(std::move(item)); + return ret; + } }; + class MockWebEngineCertificate : public Dali::WebEngineCertificate { public: @@ -381,25 +622,55 @@ public: return "http://test.html"; } + Dali::Property::Map GetHeaders() const override + { + return mockHeadersMap; + } + + std::string GetMethod() const override + { + return "GET"; + } + bool Ignore() override { return true; } - bool SetResponseStatus(int statusCode, const std::string &customedStatusText) override + bool SetResponseStatus(int statusCode, const std::string& customedStatusText) override + { + return true; + } + + bool AddResponseHeader(const std::string& fieldName, const std::string& fieldValue) override + { + mockHeadersMap.Add(fieldName, fieldValue); + return true; + } + + bool AddResponseHeaders(const Dali::Property::Map& headers) override + { + mockHeadersMap.Merge(headers); + return true; + } + + bool AddResponseBody(const std::string& body, uint32_t length) override { return true; } - bool AddResponseHeader(const std::string &fieldName, const std::string &fieldValue) override + bool AddResponse(const std::string& headers, const std::string& body, uint32_t length) override { return true; } - bool AddResponseBody(const std::string &body, uint32_t length) override + bool WriteResponseChunk(const std::string& chunk, uint32_t length) override { return true; } + +private: + Dali::Property::Map mockHeadersMap; }; class MockWebEngineConsoleMessage : public Dali::WebEngineConsoleMessage @@ -462,6 +733,196 @@ private: std::string mockUrl; }; +class MockWebEngineContextMenuItem : public Dali::WebEngineContextMenuItem +{ +public: + MockWebEngineContextMenuItem() + { + } + + ItemTag GetTag() const override + { + return ItemTag::NO_ACTION; + } + + ItemType GetType() const override + { + return ItemType::ACTION; + } + + bool IsEnabled() const override + { + return true; + } + + std::string GetLinkUrl() const override + { + return "http://test.html"; + } + + std::string GetImageUrl() const override + { + return "http://test.jpg"; + } + + std::string GetTitle() const override + { + return "title"; + } + + std::unique_ptr GetParentMenu() const override + { + std::unique_ptr result; + return result; + } +}; + +class MockWebEngineContextMenu : public Dali::WebEngineContextMenu +{ +public: + MockWebEngineContextMenu() + { + } + + uint32_t GetItemCount() const override + { + return 1; + } + + std::unique_ptr GetItemAt(uint32_t index) const override + { + std::unique_ptr webitem(new MockWebEngineContextMenuItem()); + return webitem; + } + + std::vector> GetItemList() const override + { + std::vector> result; + std::unique_ptr webitem(new MockWebEngineContextMenuItem()); + result.push_back(std::move(webitem)); + return result; + } + + bool RemoveItem(WebEngineContextMenuItem& item) override + { + return true; + } + + bool AppendItemAsAction(WebEngineContextMenuItem::ItemTag tag, const std::string& title, bool enabled) override + { + return true; + } + + bool AppendItem(WebEngineContextMenuItem::ItemTag tag, const std::string& title, const std::string& iconFile, bool enabled) override + { + return true; + } + + bool SelectItem(WebEngineContextMenuItem& item) override + { + return true; + } + + bool Hide() override + { + return true; + } +}; + +class MockWebEngineHitTest : public Dali::WebEngineHitTest +{ +public: + MockWebEngineHitTest() + { + } + + ResultContext GetResultContext() const override + { + return ResultContext::DOCUMENT; + } + + std::string GetLinkUri() const override + { + return "http://test.html"; + } + + std::string GetLinkTitle() const override + { + return "test"; + } + + std::string GetLinkLabel() const override + { + return "label"; + } + + std::string GetImageUri() const override + { + return "http://test.jpg"; + } + + std::string GetMediaUri() const override + { + return "http://test.mp4"; + } + + std::string GetTagName() const override + { + return "img"; + } + + std::string GetNodeValue() const override + { + return "test"; + } + + Dali::Property::Map GetAttributes() const override + { + return mockAttributesMap; + } + + std::string GetImageFileNameExtension() const override + { + return "jpg"; + } + + Dali::PixelData GetImageBuffer() override + { + uint8_t* imageData = new uint8_t[16]; + memset(imageData, 0xff, 16); + return Dali::PixelData::New(imageData, 16, 2, 2, + Dali::Pixel::Format::RGBA8888, + Dali::PixelData::ReleaseFunction::DELETE_ARRAY); + } + +private: + mutable Dali::Property::Map mockAttributesMap; +}; + +class MockWebEngineSecurityOrigin : public Dali::WebEngineSecurityOrigin +{ +public: + MockWebEngineSecurityOrigin() + : mockUrl("https://test.html") + , mockPotocol("https") + { + } + + std::string GetHost() const + { + return mockUrl; + } + + std::string GetProtocol() const + { + return mockPotocol; + } + +private: + std::string mockUrl; + std::string mockPotocol; +}; + class MockWebEngineSettings : public WebEngineSettings { public: @@ -677,6 +1138,40 @@ public: { } + bool SetViewportMetaTag(bool enable) override + { + return true; + } + + bool SetForceZoom(bool enable) override + { + return true; + } + + bool IsZoomForced() const override + { + return true; + } + + bool SetTextZoomEnabled(bool enable) override + { + return true; + } + + bool IsTextZoomEnabled() const override + { + return true; + } + + void SetExtraFeature(const std::string& feature, bool enable) override + { + } + + bool IsExtraFeatureEnabled(const std::string& feature) const override + { + return true; + } + private: int mockDefaultFontSize; bool mockJavaScriptEnabled; @@ -700,8 +1195,6 @@ class WebEngine: public Dali::BaseObject { public: - using JavaScriptEvaluatedResultCallback = std::function; - WebEngine() : mUrl() , mCurrentPlusOnePos( 0 ) @@ -718,7 +1211,12 @@ public: } mockWebEngineSettings = new MockWebEngineSettings(); - mockWebEngineContext = new MockWebEngineContext(); + MockWebEngineContext* engineContext = new MockWebEngineContext(); + mockWebEngineContext = engineContext; + if ( gInstanceCount == 1 ) + { + gWebEngineContextInstance = engineContext; + } mockWebEngineCookieManager = new MockWebEngineCookieManager(); mockWebEngineBackForwardList = new MockWebEngineBackForwardList(); } @@ -729,6 +1227,7 @@ public: if( !gInstanceCount ) { gInstance = 0; + gWebEngineContextInstance = 0; } delete mockWebEngineSettings; @@ -763,7 +1262,7 @@ public: ConnectToGlobalSignal( &OnLoadUrl ); } - const std::string& GetUrl() const + std::string GetUrl() const { return mUrl; } @@ -775,28 +1274,20 @@ public: Dali::PixelData GetFavicon() const { - uint8_t* faviconData = new uint8_t[ 16 ]; - - faviconData[ 0 ] = 0xff; - faviconData[ 1 ] = 0x00; - faviconData[ 2 ] = 0x00; - faviconData[ 3 ] = 0xff; - faviconData[ 4 ] = 0xff; - faviconData[ 5 ] = 0x00; - faviconData[ 6 ] = 0x00; - faviconData[ 7 ] = 0xff; - faviconData[ 8 ] = 0xff; - faviconData[ 9 ] = 0x00; - faviconData[ 10 ] = 0x00; - faviconData[ 11 ] = 0xff; - faviconData[ 12 ] = 0xff; - faviconData[ 13 ] = 0x00; - faviconData[ 14 ] = 0x00; - faviconData[ 15 ] = 0xff; - - return Dali::PixelData::New( faviconData, 16, 2, 2, - Dali::Pixel::Format::RGBA8888, - Dali::PixelData::ReleaseFunction::DELETE_ARRAY ); + static int testGetFaviconCount = 0; + if (testGetFaviconCount == 0) + { + testGetFaviconCount++; + uint8_t* faviconData = new uint8_t[16]; + memset(faviconData, 0xff, 16); + return Dali::PixelData::New(faviconData, 16, 2, 2, + Dali::Pixel::Format::RGBA8888, + Dali::PixelData::ReleaseFunction::DELETE_ARRAY); + } + else + { + return Dali::PixelData(); + } } bool CanGoForward() const @@ -858,12 +1349,28 @@ public: } } + std::unique_ptr CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode) + { + std::unique_ptr hitTest(new MockWebEngineHitTest()); + return hitTest; + } + + bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback) + { + if (callback) + { + ConnectToGlobalSignal( &OnHitTestCreated ); + mHitTestCreatedCallback = callback; + } + return true; + } + void ClearHistory() { ConnectToGlobalSignal( &OnClearHistory ); } - const std::string& GetUserAgent() const + std::string GetUserAgent() const { return mUserAgent; } @@ -873,7 +1380,7 @@ public: mUserAgent = userAgent; } - void ScrollBy( int dx, int dy ) + void ScrollBy( int32_t dx, int32_t dy ) { mScrollPosition += Dali::Vector2( dx, dy ); if ( mScrollPosition.y + mScrollSize.height > mContentSize.height ) @@ -882,7 +1389,7 @@ public: } } - bool ScrollEdgeBy( int dx, int dy ) + bool ScrollEdgeBy( int32_t dx, int32_t dy ) { mScrollPosition += Dali::Vector2( dx, dy ); if ( mScrollPosition.y + mScrollSize.height > mContentSize.height ) @@ -892,7 +1399,7 @@ public: return true; } - void SetScrollPosition( int x, int y ) + void SetScrollPosition( int32_t x, int32_t y ) { mScrollPosition.x = x; mScrollPosition.y = y; @@ -948,7 +1455,7 @@ public: return mScaleFactor; } - Dali::PixelData GetScreenshot(Dali::Rect viewArea, float scaleFactor) + Dali::PixelData GetScreenshot(Dali::Rect viewArea, float scaleFactor) { uint32_t bufferSize = viewArea.width * viewArea.height * 4 ; uint8_t* pixel = new uint8_t[ bufferSize ]; @@ -958,7 +1465,7 @@ public: Dali::PixelData::ReleaseFunction::DELETE_ARRAY ); } - bool GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) + bool GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) { if ( callback ) { @@ -987,74 +1494,88 @@ public: } } - Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal() + Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& FrameRenderedSignal() { - return mPageLoadStartedSignal; + return mFrameRenderedSignal; } - Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadInProgressSignal() + void RegisterPageLoadStartedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback) { - return mPageLoadInProgressSignal; + mPageLoadStartedCallback = callback; } - Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadFinishedSignal() + void RegisterPageLoadInProgressCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback) { - return mPageLoadFinishedSignal; + mPageLoadInProgressCallback = callback; } - Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& PageLoadErrorSignal() + void RegisterPageLoadFinishedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback) { - return mPageLoadErrorSignal; + mPageLoadFinishedCallback = callback; } - Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& ScrollEdgeReachedSignal() + void RegisterPageLoadErrorCallback(Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback callback) { - return mScrollEdgeReachedSignal; + mPageLoadErrorCallback = callback; } - Dali::WebEnginePlugin::WebEngineUrlChangedSignalType& UrlChangedSignal() + void RegisterScrollEdgeReachedCallback(Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback callback) { - return mUrlChangedSignal; + mScrollEdgeReachedCallback = callback; } - Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& FormRepostDecisionSignal() + void RegisterUrlChangedCallback(Dali::WebEnginePlugin::WebEngineUrlChangedCallback callback) { - return mFormRepostDecisionSignal; + mUrlChangedCallback = callback; } - Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& FrameRenderedSignal() + void RegisterFormRepostDecidedCallback(Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback callback) { - return mFrameRenderedSignal; + mFormRepostDecidedCallback = callback; } - Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType& RequestInterceptorSignal() + void RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback) { - return mRequestInterceptorSignal; + mConsoleMessageCallback = callback; } - Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& ConsoleMessageSignal() + void RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback callback) { - return mConsoleMessageSignal; + mResponsePolicyDecisionCallback = callback; } - Dali::WebEnginePlugin::WebEnginePolicyDecisionSignalType& PolicyDecisionSignal() + void RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback) { - return mPolicyDecisionSignal; + mCertificateConfirmCallback = callback; } - Dali::WebEnginePlugin::WebEngineCertificateSignalType& CertificateConfirmSignal() + void RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback) { - return mCertificateConfirmSignal; + mSslCertificateChangedCallback = callback; } - Dali::WebEnginePlugin::WebEngineCertificateSignalType& SslCertificateChangedSignal() + void RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback callback) { - return mSslCertificateChangedSignal; + mHttpAuthHandlerCallback = callback; } - Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& HttpAuthHandlerSignal() + void RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineContextMenuShownCallback callback) { - return mHttpAuthHandlerSignal; + mContextMenuShownCallback = callback; + } + + void RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback callback) + { + mContextMenuHiddenCallback = callback; + } + + void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback) + { + if (callback) + { + ConnectToGlobalSignal(&OnPlainTextReceived); + mPlainTextReceivedCallback = callback; + } } std::string mUrl; @@ -1062,20 +1583,7 @@ public: size_t mCurrentPlusOnePos; std::string mUserAgent; - Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadStartedSignal; - Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadInProgressSignal; - Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadFinishedSignal; - Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType mPageLoadErrorSignal; - Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType mScrollEdgeReachedSignal; - Dali::WebEnginePlugin::WebEngineUrlChangedSignalType mUrlChangedSignal; - Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType mFormRepostDecisionSignal; - Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType mFrameRenderedSignal; - Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType mRequestInterceptorSignal; - Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType mConsoleMessageSignal; - Dali::WebEnginePlugin::WebEnginePolicyDecisionSignalType mPolicyDecisionSignal; - Dali::WebEnginePlugin::WebEngineCertificateSignalType mCertificateConfirmSignal; - Dali::WebEnginePlugin::WebEngineCertificateSignalType mSslCertificateChangedSignal; - Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType mHttpAuthHandlerSignal; + Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType mFrameRenderedSignal; bool mEvaluating; float mPageZoomFactor; @@ -1090,13 +1598,31 @@ public: WebEngineCookieManager* mockWebEngineCookieManager; WebEngineSettings* mockWebEngineSettings; - std::vector mResultCallbacks; - Dali::WebEnginePlugin::JavaScriptAlertCallback mJavaScriptAlertCallback; - Dali::WebEnginePlugin::JavaScriptConfirmCallback mJavaScriptConfirmCallback; - Dali::WebEnginePlugin::JavaScriptPromptCallback mJavaScriptPromptCallback; - Dali::WebEnginePlugin::ScreenshotCapturedCallback mScreenshotCapturedCallback; - Dali::WebEnginePlugin::VideoPlayingCallback mVideoPlayingCallback; - Dali::WebEnginePlugin::GeolocationPermissionCallback mGeolocationPermissionCallback; + std::vector mResultCallbacks; + + Dali::WebEnginePlugin::WebEnginePageLoadCallback mPageLoadStartedCallback; + Dali::WebEnginePlugin::WebEnginePageLoadCallback mPageLoadInProgressCallback; + Dali::WebEnginePlugin::WebEnginePageLoadCallback mPageLoadFinishedCallback; + Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback mPageLoadErrorCallback; + Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback mScrollEdgeReachedCallback; + Dali::WebEnginePlugin::WebEngineUrlChangedCallback mUrlChangedCallback; + Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback mFormRepostDecidedCallback; + Dali::WebEnginePlugin::WebEngineFrameRenderedCallback mFrameRenderedCallback; + Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback mConsoleMessageCallback; + Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback mResponsePolicyDecisionCallback; + Dali::WebEnginePlugin::WebEngineCertificateCallback mCertificateConfirmCallback; + Dali::WebEnginePlugin::WebEngineCertificateCallback mSslCertificateChangedCallback; + Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback mHttpAuthHandlerCallback; + Dali::WebEnginePlugin::WebEngineContextMenuShownCallback mContextMenuShownCallback; + Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback mContextMenuHiddenCallback; + Dali::WebEnginePlugin::JavaScriptAlertCallback mJavaScriptAlertCallback; + Dali::WebEnginePlugin::JavaScriptConfirmCallback mJavaScriptConfirmCallback; + Dali::WebEnginePlugin::JavaScriptPromptCallback mJavaScriptPromptCallback; + Dali::WebEnginePlugin::ScreenshotCapturedCallback mScreenshotCapturedCallback; + Dali::WebEnginePlugin::VideoPlayingCallback mVideoPlayingCallback; + Dali::WebEnginePlugin::GeolocationPermissionCallback mGeolocationPermissionCallback; + Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback mHitTestCreatedCallback; + Dali::WebEnginePlugin::PlainTextReceivedCallback mPlainTextReceivedCallback; }; @@ -1137,30 +1663,72 @@ bool OnLoadUrl() } gInstance->mHistory.push_back( gInstance->mUrl ); gInstance->mCurrentPlusOnePos++; - gInstance->mPageLoadStartedSignal.Emit( gInstance->mUrl ); - gInstance->mPageLoadInProgressSignal.Emit( gInstance->mUrl ); - gInstance->mPageLoadFinishedSignal.Emit( gInstance->mUrl ); - gInstance->mUrlChangedSignal.Emit( "http://new-test" ); - - std::shared_ptr repostDecision(new MockWebEngineFormRepostDecision()); - gInstance->mFormRepostDecisionSignal.Emit(std::move(repostDecision)); + if (gInstance->mPageLoadStartedCallback) + { + gInstance->mPageLoadStartedCallback( gInstance->mUrl ); + } + if (gInstance->mPageLoadInProgressCallback) + { + gInstance->mPageLoadInProgressCallback( gInstance->mUrl ); + } + if (gInstance->mPageLoadFinishedCallback) + { + gInstance->mPageLoadFinishedCallback( gInstance->mUrl ); + } + if (gInstance->mPageLoadErrorCallback) + { + std::unique_ptr error(new MockWebEngineLoadError(gInstance->mUrl)); + gInstance->mPageLoadErrorCallback(std::move(error)); + } + if (gInstance->mUrlChangedCallback) + { + gInstance->mUrlChangedCallback( "http://new-test" ); + } + if (gInstance->mFormRepostDecidedCallback) + { + std::unique_ptr repostDecision(new MockWebEngineFormRepostDecision()); + gInstance->mFormRepostDecidedCallback(std::move(repostDecision)); + } gInstance->mFrameRenderedSignal.Emit(); - std::shared_ptr interceptor(new MockWebEngineRequestInterceptor()); - gInstance->mRequestInterceptorSignal.Emit(std::move(interceptor)); - - std::shared_ptr error(new MockWebEngineLoadError(gInstance->mUrl)); - gInstance->mPageLoadErrorSignal.Emit(std::move(error)); - std::shared_ptr message(new MockWebEngineConsoleMessage()); - gInstance->mConsoleMessageSignal.Emit(std::move(message)); - std::shared_ptr policyDecision(new MockWebEnginePolicyDecision()); - gInstance->mPolicyDecisionSignal.Emit(std::move(policyDecision)); - - std::shared_ptr certificate(new MockWebEngineCertificate()); - gInstance->mCertificateConfirmSignal.Emit(std::move(certificate)); - std::shared_ptr sslCertificate(new MockWebEngineCertificate()); - gInstance->mSslCertificateChangedSignal.Emit(std::move(sslCertificate)); - std::shared_ptr handler(new MockWebEngineHttpAuthHandler()); - gInstance->mHttpAuthHandlerSignal.Emit(std::move(handler)); + if (gInstance->mFrameRenderedCallback) + { + gInstance->mFrameRenderedCallback(); + } + if (gInstance->mConsoleMessageCallback) + { + std::unique_ptr message(new MockWebEngineConsoleMessage()); + gInstance->mConsoleMessageCallback(std::move(message)); + } + if (gInstance->mResponsePolicyDecisionCallback) + { + std::unique_ptr policyDecision(new MockWebEnginePolicyDecision()); + gInstance->mResponsePolicyDecisionCallback(std::move(policyDecision)); + } + if (gInstance->mCertificateConfirmCallback) + { + std::unique_ptr certificate(new MockWebEngineCertificate()); + gInstance->mCertificateConfirmCallback(std::move(certificate)); + } + if (gInstance->mSslCertificateChangedCallback) + { + std::unique_ptr sslCertificate(new MockWebEngineCertificate()); + gInstance->mSslCertificateChangedCallback(std::move(sslCertificate)); + } + if (gInstance->mHttpAuthHandlerCallback) + { + std::unique_ptr handler(new MockWebEngineHttpAuthHandler()); + gInstance->mHttpAuthHandlerCallback(std::move(handler)); + } + if (gInstance->mContextMenuShownCallback) + { + std::unique_ptr menu(new MockWebEngineContextMenu()); + gInstance->mContextMenuShownCallback(std::move(menu)); + } + if (gInstance->mContextMenuHiddenCallback) + { + std::unique_ptr hiddenMenu(new MockWebEngineContextMenu()); + gInstance->mContextMenuHiddenCallback(std::move(hiddenMenu)); + } } return false; } @@ -1169,9 +1737,9 @@ bool OnScrollEdge() { DisconnectFromGlobalSignal( &OnScrollEdge ); - if( gInstance ) + if( gInstance && gInstance->mScrollEdgeReachedCallback ) { - gInstance->mScrollEdgeReachedSignal.Emit( Dali::WebEnginePlugin::ScrollEdge::BOTTOM ); + gInstance->mScrollEdgeReachedCallback( Dali::WebEnginePlugin::ScrollEdge::BOTTOM ); } return false; @@ -1257,6 +1825,17 @@ bool OnGeolocationPermission() return false; } +bool OnHitTestCreated() +{ + DisconnectFromGlobalSignal(&OnHitTestCreated); + if (gInstance) + { + std::unique_ptr test(new MockWebEngineHitTest()); + gInstance->mHitTestCreatedCallback(std::move(test)); + } + return false; +} + bool OnClearHistory() { DisconnectFromGlobalSignal( &OnClearHistory ); @@ -1271,6 +1850,103 @@ bool OnClearHistory() return false; } +bool OnSecurityOriginAcquired() +{ + DisconnectFromGlobalSignal(&OnSecurityOriginAcquired); + if (gWebEngineContextInstance) + { + std::vector> securityOriginList; + std::unique_ptr origin(new MockWebEngineSecurityOrigin()); + securityOriginList.push_back(std::move(origin)); + gWebEngineContextInstance->mSecurityOriginAcquiredCallback(securityOriginList); + } + return false; +} + +bool OnStorageUsageAcquired() +{ + DisconnectFromGlobalSignal(&OnStorageUsageAcquired); + if (gWebEngineContextInstance) + { + gWebEngineContextInstance->mStorageUsageAcquiredCallback(0); + } + return false; +} + +bool OnFormPasswordAcquired() +{ + DisconnectFromGlobalSignal(&OnFormPasswordAcquired); + if (gWebEngineContextInstance) + { + std::vector> formPasswordList; + std::unique_ptr data(new Dali::WebEngineContext::PasswordData()); + data->url = "http://test.html"; + data->useFingerprint = false; + formPasswordList.push_back(std::move(data)); + gWebEngineContextInstance->mFormPasswordAcquiredCallback(formPasswordList); + } + return false; +} + +bool OnDownloadStarted() +{ + DisconnectFromGlobalSignal(&OnDownloadStarted); + if (gWebEngineContextInstance) + { + gWebEngineContextInstance->mDownloadStartedCallback("http://test.html"); + } + return false; +} + +bool OnMimeOverridden() +{ + DisconnectFromGlobalSignal(&OnMimeOverridden); + if (gWebEngineContextInstance) + { + std::string newMime; + gWebEngineContextInstance->mMimeOverriddenCallback("http://test.html", "txt/xml", newMime); + } + return false; +} + +bool OnRequestIntercepted() +{ + DisconnectFromGlobalSignal(&OnRequestIntercepted); + if (gWebEngineContextInstance) + { + Dali::WebEngineRequestInterceptorPtr interceptor = new MockWebEngineRequestInterceptor(); + gWebEngineContextInstance->mRequestInterceptedCallback(interceptor); + } + return false; +} + +bool OnChangesWatch() +{ + DisconnectFromGlobalSignal( &OnChangesWatch ); + + if ( gInstance ) + { + MockWebEngineCookieManager* temp = (MockWebEngineCookieManager *)(&(gInstance->GetCookieManager())); + if ( temp ) + { + temp->mChangesWatchCallback(); + } + } + + return false; +} + +bool OnPlainTextReceived() +{ + DisconnectFromGlobalSignal(&OnPlainTextReceived); + if (gInstance) + { + std::string dummyResultText; + gInstance->mPlainTextReceivedCallback(dummyResultText); + } + return false; +} + } // namespace inline WebEngine& GetImplementation( Dali::WebEngine& webEngine ) @@ -1328,11 +2004,11 @@ WebEngine WebEngine::DownCast( BaseHandle handle ) return WebEngine( dynamic_cast< Internal::Adaptor::WebEngine* >( handle.GetObjectPtr() ) ); } -void WebEngine::Create( int width, int height, const std::string& locale, const std::string& timezoneId ) +void WebEngine::Create( uint32_t width, uint32_t height, const std::string& locale, const std::string& timezoneId ) { } -void WebEngine::Create( int width, int height, int argc, char** argv ) +void WebEngine::Create( uint32_t width, uint32_t height, uint32_t argc, char** argv ) { } @@ -1375,7 +2051,7 @@ Dali::PixelData WebEngine::GetFavicon() const return Internal::Adaptor::GetImplementation( *this ).GetFavicon(); } -const std::string& WebEngine::GetUrl() +std::string WebEngine::GetUrl() const { return Internal::Adaptor::GetImplementation( *this ).GetUrl(); } @@ -1506,6 +2182,16 @@ void WebEngine::JavaScriptPromptReply( const std::string& result ) { } +std::unique_ptr WebEngine::CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode) +{ + return Internal::Adaptor::GetImplementation(*this).CreateHitTest(x, y, mode); +} + +bool WebEngine::CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback) +{ + return Internal::Adaptor::GetImplementation(*this).CreateHitTestAsynchronously(x, y, mode, callback); +} + void WebEngine::ClearAllTilesResources() { } @@ -1538,12 +2224,12 @@ void WebEngine::AddDynamicCertificatePath(const std::string& host, const std::st { } -Dali::PixelData WebEngine::GetScreenshot(Dali::Rect viewArea, float scaleFactor) +Dali::PixelData WebEngine::GetScreenshot(Dali::Rect viewArea, float scaleFactor) { return Internal::Adaptor::GetImplementation( *this ).GetScreenshot(viewArea, scaleFactor); } -bool WebEngine::GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) +bool WebEngine::GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) { return Internal::Adaptor::GetImplementation( *this ).GetScreenshotAsynchronously(viewArea, scaleFactor, callback); } @@ -1558,7 +2244,7 @@ void WebEngine::RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::Geo Internal::Adaptor::GetImplementation( *this ).RegisterGeolocationPermissionCallback(callback); } -const std::string& WebEngine::GetUserAgent() const +std::string WebEngine::GetUserAgent() const { return Internal::Adaptor::GetImplementation( *this ).GetUserAgent(); } @@ -1568,17 +2254,17 @@ void WebEngine::SetUserAgent( const std::string& userAgent ) Internal::Adaptor::GetImplementation( *this ).SetUserAgent( userAgent ); } -void WebEngine::ScrollBy( int dx, int dy ) +void WebEngine::ScrollBy( int32_t dx, int32_t dy ) { Internal::Adaptor::GetImplementation( *this ).ScrollBy( dx, dy ); } -bool WebEngine::ScrollEdgeBy( int dx, int dy ) +bool WebEngine::ScrollEdgeBy( int32_t dx, int32_t dy ) { return Internal::Adaptor::GetImplementation( *this ).ScrollEdgeBy( dx, dy ); } -void WebEngine::SetScrollPosition( int x, int y ) +void WebEngine::SetScrollPosition( int32_t x, int32_t y ) { Internal::Adaptor::GetImplementation( *this ).SetScrollPosition( x, y ); } @@ -1598,7 +2284,7 @@ Dali::Vector2 WebEngine::GetContentSize() const return Internal::Adaptor::GetImplementation( *this ).GetContentSize(); } -void WebEngine::SetSize( int width, int height ) +void WebEngine::SetSize( uint32_t width, uint32_t height ) { } @@ -1672,7 +2358,7 @@ float WebEngine::GetLoadProgressPercentage() const return Internal::Adaptor::GetImplementation( *this ).GetLoadProgressPercentage(); } -void WebEngine::UpdateDisplayArea( Dali::Rect< int > displayArea ) +void WebEngine::UpdateDisplayArea( Dali::Rect< int32_t > displayArea ) { } @@ -1688,74 +2374,84 @@ void WebEngine::EnableKeyEvents( bool enabled ) { } -Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal() +Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& WebEngine::FrameRenderedSignal() { - return Internal::Adaptor::GetImplementation( *this ).PageLoadStartedSignal(); + return Internal::Adaptor::GetImplementation(*this).FrameRenderedSignal(); } -Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadInProgressSignal() +void WebEngine::RegisterPageLoadStartedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback) { - return Internal::Adaptor::GetImplementation( *this ).PageLoadInProgressSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterPageLoadStartedCallback(callback); } -Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadFinishedSignal() +void WebEngine::RegisterPageLoadInProgressCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback) { - return Internal::Adaptor::GetImplementation( *this ).PageLoadFinishedSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterPageLoadInProgressCallback(callback); } -Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& WebEngine::PageLoadErrorSignal() +void WebEngine::RegisterPageLoadFinishedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback) { - return Internal::Adaptor::GetImplementation( *this ).PageLoadErrorSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterPageLoadFinishedCallback(callback); } -Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& WebEngine::ScrollEdgeReachedSignal() +void WebEngine::RegisterPageLoadErrorCallback(Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback callback) { - return Internal::Adaptor::GetImplementation( *this ).ScrollEdgeReachedSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterPageLoadErrorCallback(callback); } -Dali::WebEnginePlugin::WebEngineUrlChangedSignalType& WebEngine::UrlChangedSignal() +void WebEngine::RegisterScrollEdgeReachedCallback(Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback callback) { - return Internal::Adaptor::GetImplementation( *this ).UrlChangedSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterScrollEdgeReachedCallback(callback); } -Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& WebEngine::FormRepostDecisionSignal() +void WebEngine::RegisterUrlChangedCallback(Dali::WebEnginePlugin::WebEngineUrlChangedCallback callback) { - return Internal::Adaptor::GetImplementation(*this).FormRepostDecisionSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterUrlChangedCallback(callback); } -Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& WebEngine::FrameRenderedSignal() +void WebEngine::RegisterFormRepostDecidedCallback(Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback callback) { - return Internal::Adaptor::GetImplementation(*this).FrameRenderedSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterFormRepostDecidedCallback(callback); +} + +void WebEngine::RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback) +{ + Internal::Adaptor::GetImplementation( *this ).RegisterConsoleMessageReceivedCallback(callback); +} + +void WebEngine::RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback callback) +{ + Internal::Adaptor::GetImplementation( *this ).RegisterResponsePolicyDecidedCallback(callback); } -Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType& WebEngine::RequestInterceptorSignal() +void WebEngine::RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback) { - return Internal::Adaptor::GetImplementation(*this).RequestInterceptorSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterCertificateConfirmedCallback(callback); } -Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& WebEngine::ConsoleMessageSignal() +void WebEngine::RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback) { - return Internal::Adaptor::GetImplementation(*this).ConsoleMessageSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterSslCertificateChangedCallback(callback); } -Dali::WebEnginePlugin::WebEnginePolicyDecisionSignalType& WebEngine::PolicyDecisionSignal() +void WebEngine::RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback callback) { - return Internal::Adaptor::GetImplementation(*this).PolicyDecisionSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterHttpAuthHandlerCallback(callback); } -Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::CertificateConfirmSignal() +void WebEngine::RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineContextMenuShownCallback callback) { - return Internal::Adaptor::GetImplementation(*this).CertificateConfirmSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterContextMenuShownCallback(callback); } -Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::SslCertificateChangedSignal() +void WebEngine::RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback callback) { - return Internal::Adaptor::GetImplementation(*this).SslCertificateChangedSignal(); + Internal::Adaptor::GetImplementation( *this ).RegisterContextMenuHiddenCallback(callback); } -Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& WebEngine::HttpAuthHandlerSignal() +void WebEngine::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback) { - return Internal::Adaptor::GetImplementation(*this).HttpAuthHandlerSignal(); + Internal::Adaptor::GetImplementation(*this).GetPlainTextAsynchronously(callback); } } // namespace Dali;