[AT-SPI] Introduce WebView::WebViewAccessible
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / web-view / web-view-impl.h
1 #ifndef DALI_TOOLKIT_INTERNAL_WEB_VIEW_H
2 #define DALI_TOOLKIT_INTERNAL_WEB_VIEW_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/devel-api/actors/actor-devel.h>
23 #include <dali/devel-api/adaptor-framework/proxy-accessible.h>
24 #include <dali/devel-api/adaptor-framework/web-engine.h>
25 #include <dali/public-api/images/image-operations.h>
26 #include <dali/public-api/object/property-notification.h>
27 #include <memory>
28
29 // INTERNAL INCLUDES
30 #include <dali-toolkit/devel-api/controls/control-accessible.h>
31 #include <dali-toolkit/devel-api/controls/web-view/web-view.h>
32 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
33 #include <dali-toolkit/public-api/controls/control-impl.h>
34 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
35
36 namespace Dali
37 {
38 namespace Toolkit
39 {
40 class KeyEvent;
41 class TouchEvent;
42 class WebBackForwardList;
43 class WebContext;
44 class WebCookieManager;
45 class WebSettings;
46 class WebView;
47
48 namespace Internal
49 {
50 class WebView : public Control
51 {
52 protected:
53   WebView();
54
55   WebView(const std::string& locale, const std::string& timezoneId);
56
57   WebView(uint32_t argc, char** argv);
58
59   virtual ~WebView();
60
61 public:
62   /**
63    * @copydoc Dali::Toolkit::WebView::New()
64    */
65   static Toolkit::WebView New();
66
67   /**
68    * @copydoc Dali::Toolkit::WebView::New( const std::string&, const std::string& )
69    */
70   static Toolkit::WebView New(const std::string& locale, const std::string& timezoneId);
71
72   /**
73    * @copydoc Dali::Toolkit::WebView::New( uint32_t, char** )
74    */
75   static Toolkit::WebView New(uint32_t argc, char** argv);
76
77   /**
78    * @copydoc Dali::Toolkit::WebView::GetSettings()
79    */
80   Dali::Toolkit::WebSettings* GetSettings() const;
81
82   /**
83    * @copydoc Dali::Toolkit::WebView::GetContext()
84    */
85   Dali::Toolkit::WebContext* GetContext() const;
86
87   /**
88    * @copydoc Dali::Toolkit::WebView::GetCookieManager()
89    */
90   Dali::Toolkit::WebCookieManager* GetCookieManager() const;
91
92   /**
93    * @copydoc Dali::Toolkit::WebView::GetBackForwardList()
94    */
95   Dali::Toolkit::WebBackForwardList* GetBackForwardList() const;
96
97   /**
98    * @copydoc Dali::Toolkit::WebView::GetFavicon()
99    */
100   Dali::Toolkit::ImageView GetFavicon() const;
101
102   /**
103    * @copydoc Dali::Toolkit::WebView::LoadUrl()
104    */
105   void LoadUrl(const std::string& url);
106
107   /**
108    * @copydoc Dali::WebEngine::LoadHTMLString()
109    */
110   void LoadHtmlString(const std::string& htmlString);
111
112   /**
113    * @copydoc Dali::WebEngine::LoadHtmlStringOverrideCurrentEntry()
114    */
115   bool LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri, const std::string& unreachableUrl);
116
117   /**
118    * @copydoc Dali::WebEngine::LoadContents()
119    */
120   bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
121
122   /**
123    * @copydoc Dali::Toolkit::WebView::Reload()
124    */
125   void Reload();
126
127   /**
128    * @copydoc Dali::WebEngine::ReloadWithoutCache()
129    */
130   bool ReloadWithoutCache();
131
132   /**
133    * @copydoc Dali::Toolkit::WebView::StopLoading()
134    */
135   void StopLoading();
136
137   /**
138    * @copydoc Dali::Toolkit::WebView::StopLoading()
139    */
140   void Suspend();
141
142   /**
143    * @copydoc Dali::Toolkit::WebView::Resume()
144    */
145   void Resume();
146
147   /**
148    * @copydoc Dali::WebEngine::SuspendNetworkLoading()
149    */
150   void SuspendNetworkLoading();
151
152   /**
153    * @copydoc Dali::WebEngine::ResumeNetworkLoading()
154    */
155   void ResumeNetworkLoading();
156
157   /**
158    * @copydoc Dali::WebEngine::AddCustomHeader()
159    */
160   bool AddCustomHeader(const std::string& name, const std::string& value);
161
162   /**
163    * @copydoc Dali::WebEngine::RemoveCustomHeader()
164    */
165   bool RemoveCustomHeader(const std::string& name);
166
167   /**
168    * @copydoc Dali::WebEngine::StartInspectorServer()
169    */
170   uint32_t StartInspectorServer(uint32_t port);
171
172   /**
173    * @copydoc Dali::WebEngine::StopInspectorServer()
174    */
175   bool StopInspectorServer();
176
177   /**
178    * @copydoc Dali::Toolkit::WebView::ScrollBy()
179    */
180   void ScrollBy(int32_t deltaX, int32_t deltaY);
181
182   /**
183    * @copydoc Dali::WebEngine::ScrollEdgeBy()
184    */
185   bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY);
186
187   /**
188    * @copydoc Dali::Toolkit::WebView::CanGoForward()
189    */
190   bool CanGoForward();
191
192   /**
193    * @copydoc Dali::Toolkit::WebView::GoForward()
194    */
195   void GoForward();
196
197   /**
198    * @copydoc Dali::Toolkit::WebView::CanGoBack()
199    */
200   bool CanGoBack();
201
202   /**
203    * @copydoc Dali::Toolkit::WebView::GoBack()
204    */
205   void GoBack();
206
207   /**
208    * @copydoc Dali::Toolkit::WebView::EvaluateJavaScript()
209    */
210   void EvaluateJavaScript(const std::string& script, Dali::WebEnginePlugin::JavaScriptMessageHandlerCallback resultHandler);
211
212   /**
213    * @copydoc Dali::Toolkit::WebView::AddJavaScriptMessageHandler()
214    */
215   void AddJavaScriptMessageHandler(const std::string& exposedObjectName, Dali::WebEnginePlugin::JavaScriptMessageHandlerCallback handler);
216
217   /**
218    * @copydoc Dali::Toolkit::WebView::RegisterJavaScriptAlertCallback()
219    */
220   void RegisterJavaScriptAlertCallback(Dali::WebEnginePlugin::JavaScriptAlertCallback callback);
221
222   /**
223    * @copydoc Dali::Toolkit::WebView::JavaScriptAlertReply()
224    */
225   void JavaScriptAlertReply();
226
227   /**
228    * @copydoc Dali::Toolkit::WebView::RegisterJavaScriptConfirmCallback()
229    */
230   void RegisterJavaScriptConfirmCallback(Dali::WebEnginePlugin::JavaScriptConfirmCallback callback);
231
232   /**
233    * @copydoc Dali::Toolkit::WebView::JavaScriptConfirmReply()
234    */
235   void JavaScriptConfirmReply(bool confirmed);
236
237   /**
238    * @copydoc Dali::Toolkit::WebView::RegisterJavaScriptPromptCallback()
239    */
240   void RegisterJavaScriptPromptCallback(Dali::WebEnginePlugin::JavaScriptPromptCallback callback);
241
242   /**
243    * @copydoc Dali::Toolkit::WebView::JavaScriptPromptReply()
244    */
245   void JavaScriptPromptReply(const std::string& result);
246
247   /**
248    * @copydoc Dali::Toolkit::WebView::CreateHitTest()
249    */
250   std::unique_ptr<Dali::WebEngineHitTest> CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode);
251
252   /**
253    * @copydoc Dali::Toolkit::WebView::CreateHitTestAsynchronously()
254    */
255   bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback);
256
257   /**
258    * @copydoc Dali::Toolkit::WebView::ClearHistory()
259    */
260   void ClearHistory();
261
262   /**
263    * @copydoc Dali::Toolkit::WebView::ClearAllTilesResources()
264    */
265   void ClearAllTilesResources();
266
267   /**
268    * @copydoc Dali::Toolkit::WebView::SetScaleFactor()
269    */
270   void SetScaleFactor(float scaleFactor, Dali::Vector2 point);
271
272   /**
273    * @copydoc Dali::Toolkit::WebView::GetScaleFactor()
274    */
275   float GetScaleFactor() const;
276
277   /**
278    * @copydoc Dali::Toolkit::WebView::ActivateAccessibility()
279    */
280   void ActivateAccessibility(bool activated);
281
282   /**
283    * @copydoc Dali::Toolkit::WebView::HighlightText()
284    */
285   bool HighlightText(const std::string& text, Dali::WebEnginePlugin::FindOption options, uint32_t maxMatchCount);
286
287   /**
288    * @copydoc Dali::Toolkit::WebView::AddDynamicCertificatePath()
289    */
290   void AddDynamicCertificatePath(const std::string& host, const std::string& certPath);
291
292   /**
293    * @copydoc Dali::Toolkit::WebView::GetScreenshot()
294    */
295   Dali::Toolkit::ImageView GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor);
296
297   /**
298    * @copydoc Dali::Toolkit::WebView::GetScreenshotAsynchronously()
299    */
300   bool GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback);
301
302   /**
303    * @copydoc Dali::Toolkit::WebView::CheckVideoPlayingAsynchronously()
304    */
305   bool CheckVideoPlayingAsynchronously(Dali::WebEnginePlugin::VideoPlayingCallback callback);
306
307   /**
308    * @copydoc Dali::Toolkit::WebView::RegisterGeolocationPermissionCallback()
309    */
310   void RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::GeolocationPermissionCallback callback);
311
312   /**
313    * @copydoc Dali::Toolkit::WebView::SetTtsFocus()
314    */
315   void SetTtsFocus(bool focused);
316
317   /**
318    * @copydoc Dali::Toolkit::WebView::RegisterPageLoadStartedCallback()
319    */
320   void RegisterPageLoadStartedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
321
322   /**
323    * @copydoc Dali::Toolkit::WebView::RegisterPageLoadInProgressCallback()
324    */
325   void RegisterPageLoadInProgressCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
326
327   /**
328    * @copydoc Dali::Toolkit::WebView::RegisterPageLoadFinishedCallback()
329    */
330   void RegisterPageLoadFinishedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
331
332   /**
333    * @copydoc Dali::Toolkit::WebView::RegisterPageLoadErrorCallback()
334    */
335   void RegisterPageLoadErrorCallback(Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback callback);
336
337   /**
338    * @copydoc Dali::Toolkit::WebView::RegisterScrollEdgeReachedCallback()
339    */
340   void RegisterScrollEdgeReachedCallback(Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback callback);
341
342   /**
343    * @copydoc Dali::Toolkit::WebView::RegisterUrlChangedCallback()
344    */
345   void RegisterUrlChangedCallback(Dali::WebEnginePlugin::WebEngineUrlChangedCallback callback);
346
347   /**
348    * @copydoc Dali::Toolkit::WebView::RegisterFormRepostDecidedCallback()
349    */
350   void RegisterFormRepostDecidedCallback(Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback callback);
351
352   /**
353    * @copydoc Dali::Toolkit::WebView::RegisterFrameRenderedCallback()
354    */
355   void RegisterFrameRenderedCallback(Dali::WebEnginePlugin::WebEngineFrameRenderedCallback callback);
356
357   /**
358    * @copydoc Dali::Toolkit::WebView::RegisterConsoleMessageReceivedCallback()
359    */
360   void RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback);
361
362   /**
363    * @copydoc Dali::Toolkit::WebView::RegisterResponsePolicyDecidedCallback()
364    */
365   void RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback callback);
366
367   /**
368    * @copydoc Dali::Toolkit::WebView::RegisterNavigationPolicyDecidedCallback()
369    */
370   void RegisterNavigationPolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineNavigationPolicyDecidedCallback callback);
371
372   /**
373    * @copydoc Dali::Toolkit::WebView::RegisterCertificateConfirmedCallback()
374    */
375   void RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback);
376
377   /**
378    * @copydoc Dali::Toolkit::WebView::RegisterSslCertificateChangedCallback()
379    */
380   void RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback);
381
382   /**
383    * @copydoc Dali::Toolkit::WebView::RegisterHttpAuthHandlerCallback()
384    */
385   void RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback callback);
386
387   /**
388    * @copydoc Dali::Toolkit::WebView::RegisterContextMenuShownCallback()
389    */
390   void RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineContextMenuShownCallback callback);
391
392   /**
393    * @copydoc Dali::Toolkit::WebView::RegisterContextMenuHiddenCallback()
394    */
395   void RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback callback);
396
397   /**
398    * @copydoc Dali::Toolkit::WebView::GetPlainTextAsynchronously()
399    */
400   void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
401
402 public: // Properties
403   /**
404    * @brief Called when a property of an object of this type is set.
405    *
406    * @param[in] object The object whose property is set.
407    * @param[in] index The property index.
408    * @param[in] value The new property value.
409    */
410   static void SetProperty(Dali::BaseObject* object, Dali::Property::Index index, const Dali::Property::Value& value);
411
412   /**
413    * @brief Called to retrieve a property of an object of this type.
414    *
415    * @param[in] object The object whose property is to be retrieved.
416    * @param[in] index The property index.
417    * @return The current value of the property.
418    */
419   static Dali::Property::Value GetProperty(Dali::BaseObject* object, Dali::Property::Index propertyIndex);
420
421 private: // From Control
422   /**
423    * @copydoc Toolkit::Control::OnInitialize()
424    */
425   void OnInitialize() override;
426
427   /**
428    * @copydoc Toolkit::Internal::Control::CreateAccessibleObject()
429    */
430   DevelControl::ControlAccessible* CreateAccessibleObject() override;
431
432   /**
433    * @copydoc Toolkit::Control::GetNaturalSize
434    */
435   Vector3 GetNaturalSize() override;
436
437   /**
438    * @copydoc Toolkit::Control::OnKeyEvent()
439    */
440   bool OnKeyEvent(const Dali::KeyEvent& event) override;
441
442   /**
443    * @copydoc Toolkit::Control::OnKeyInputFocusGained()
444    */
445   void OnKeyInputFocusGained() override;
446
447   /**
448    * @copydoc Toolkit::Control::OnKeyInputFocusLost()
449    */
450   void OnKeyInputFocusLost() override;
451
452   /**
453    * @copydoc Toolkit::Control::OnSceneConnection()
454    */
455   void OnSceneConnection(int depth) override;
456
457 private:
458   // Undefined
459   WebView(const WebView& webView);
460
461   WebView& operator=(const WebView& webView);
462
463   /**
464    * @brief Set an absolute scroll of the given view.
465    * @param[in] x The coordinate x of scroll
466    * @param[in] y The coordinate y of scroll
467    */
468   void SetScrollPosition(int32_t x, int32_t y);
469
470   /**
471    * @brief Get the current scroll position of the given view.
472    * @param[out] x The coordinate x of scroll
473    * @param[out] y The coordinate y of scroll
474    */
475   Dali::Vector2 GetScrollPosition() const;
476
477   /**
478    * @brief Get the possible scroll size of the given view.
479    * @param[out] width The width of scroll size
480    * @param[out] height The height of scroll size
481    */
482   Dali::Vector2 GetScrollSize() const;
483
484   /**
485    * @brief Get the last known content's size.
486    * @param[out] width The width of content's size
487    * @param[out] height The height of content's size
488    */
489   Dali::Vector2 GetContentSize() const;
490
491   /**
492    * @brief Return the title of the Web.
493    *
494    * @return The title of web page
495    */
496   std::string GetTitle() const;
497
498   /**
499    * @brief Set the background color of web page.
500    * @param[in] color The value of background color.
501    */
502   void SetDocumentBackgroundColor(Dali::Vector4 color);
503
504   /**
505    * @brief Clear tiles when hidden.
506    *
507    * @param[in] cleared Whether tiles are cleared or not
508    */
509   void ClearTilesWhenHidden(bool cleared);
510
511   /**
512    * @brief Set multiplier of cover area of tile.
513    *
514    * @param[in] multiplier The multiplier of cover area
515    */
516   void SetTileCoverAreaMultiplier(float multiplier);
517
518   /**
519    * @brief Enable cursor by client.
520    * @param[in] enabled Whether cursor is enabled or not.
521    */
522   void EnableCursorByClient(bool enabled);
523
524   /**
525    * @brief Get the selected text.
526    * @return The selected text
527    */
528   std::string GetSelectedText() const;
529
530   /**
531    * @brief Get url of web page.
532    * @return The string of url
533    */
534   std::string GetUrl() const;
535
536   /**
537    * @brief Get user agent string.
538    * @return The string value of user agent
539    */
540   std::string GetUserAgent() const;
541
542   /**
543    * @brief Set user agent string.
544    * @param[in] userAgent The string value of user agent
545    */
546   void SetUserAgent(const std::string& userAgent);
547
548   /**
549    * @brief Set zoom factor of the current page.
550    * @param[in] zoomFactor a new factor to be set.
551    */
552   void SetPageZoomFactor(float zoomFactor);
553
554   /**
555    * @brief Query the current zoom factor of the page。
556    * @return The current page zoom factor.
557    */
558   float GetPageZoomFactor() const;
559
560   /**
561    * @brief Set the current text zoom level。.
562    * @param[in] zoomFactor a new factor to be set.
563    */
564   void SetTextZoomFactor(float zoomFactor);
565
566   /**
567    * @brief Get the current text zoom level.
568    * @return The current text zoom factor.
569    */
570   float GetTextZoomFactor() const;
571
572   /**
573    * @brief Get the current load progress of the page.
574    * @return The load progress of the page.
575    */
576   float GetLoadProgressPercentage() const;
577
578   /**
579    * @brief Request to set the current page's visibility.
580    * @param[in] visible Visible or not.
581    *
582    * @return true if succeeded, false otherwise
583    */
584   bool SetVisibility(bool visible);
585
586   /**
587    * @brief Update display area of web view.
588    * @param[in] source The soource triggers Notification.
589    */
590   void UpdateDisplayArea(Dali::PropertyNotification& source);
591
592   /**
593    * @brief Enable/Disable video hole for video playing.
594    * @param[in] enabled True if video hole is enabled, false otherwise.
595    */
596   void EnableVideoHole(bool enabled);
597
598   /**
599    * @brief Enable blend mode.
600    * @param[in] blendEnabled True if turn on blend mode, false otherwise.
601    */
602   void EnableBlendMode(bool blendEnabled);
603
604   /**
605    * @brief Enable/disable mouse events. The default is enabled.
606    *
607    * @param[in] enabled True if mouse events are enabled, false otherwise
608    */
609   void EnableMouseEvents(bool enabled);
610
611   /**
612    * @brief Enable/disable key events. The default is enabled.
613    *
614    * @param[in] enabled True if key events enabled, false otherwise
615    */
616   void EnableKeyEvents(bool enabled);
617
618   /**
619    * @brief Create image view by pixel data.
620    * @param[in] pixel Pixel data
621    * @return The new image view
622    */
623   Dali::Toolkit::ImageView CreateImageView(Dali::PixelData pixel) const;
624
625   /**
626    * @brief Signal occurs when the Web View has been touched.
627    * @param[in] actor The Actor Touched
628    * @param[in] touch The Touch Data.
629    * @return Whether to consume event or not.
630    */
631   bool OnTouchEvent(Actor actor, const Dali::TouchEvent& touch);
632
633   /**
634    * @brief Signal occurs when the Web View has been hovered.
635    * @param[in] actor The Actor Hovered
636    * @param[in] hover The Hover Data.
637    * @return Whether to consume event or not.
638    */
639   bool OnHoverEvent(Actor actor, const Dali::HoverEvent& hover);
640
641   /**
642    * @brief Signal occurs when the Web View receives wheel event.
643    * @param[in] actor The Actor that receives Wheel event.
644    * @param[in] wheel The Wheel Data.
645    * @return Whether to consume event or not.
646    */
647   bool OnWheelEvent(Actor actor, const Dali::WheelEvent& wheel);
648
649   /**
650    * @brief Callback function to be called when frame is rendered.
651    */
652   void OnFrameRendered();
653
654   /**
655    * @brief Callback function to be called when frame is rendered. This is to check initial buffer is ready.
656    */
657   void OnInitialFrameRendered();
658
659   /**
660    * @brief Callback function to be called when visibility is changed.
661    * @param[in] actor The actor, or child of actor, whose visibility has changed
662    * @param[in] isVisible Whether the actor is now visible or not
663    * @param[in] type, Whether the actor's visible property has changed or a parent's
664    */
665   void OnVisibilityChanged(Actor actor, bool isVisible, Dali::DevelActor::VisibilityChange::Type type);
666
667   /**
668    * @brief callback for screen shot captured.
669    * @param[in] pixel Pixel data of screen shot.
670    */
671   void OnScreenshotCaptured(Dali::PixelData pixel);
672
673 protected:
674   class WebViewAccessible : public DevelControl::ControlAccessible
675   {
676   public:
677     WebViewAccessible() = delete;
678
679     WebViewAccessible(Dali::Actor self, Dali::WebEngine& webEngine);
680
681   protected:
682     /**
683      * @copydoc Dali::Accessibility::ActorAccessible::DoGetChildren()
684      */
685     void DoGetChildren(std::vector<Dali::Accessibility::Accessible*>& children) override;
686
687   private:
688     void OnAccessibilityEnabled();
689     void OnAccessibilityDisabled();
690     void SetRemoteChildAddress(Dali::Accessibility::Address address);
691
692     Dali::Accessibility::ProxyAccessible mRemoteChild;
693     Dali::WebEngine&                     mWebEngine;
694   };
695
696 private:
697   Dali::Toolkit::Visual::Base mVisual;
698   Dali::Size                  mWebViewSize;
699   Dali::WebEngine             mWebEngine;
700
701   std::unique_ptr<Dali::Toolkit::WebContext>         mWebContext;
702   std::unique_ptr<Dali::Toolkit::WebCookieManager>   mWebCookieManager;
703   std::unique_ptr<Dali::Toolkit::WebSettings>        mWebSettings;
704   std::unique_ptr<Dali::Toolkit::WebBackForwardList> mWebBackForwardList;
705
706   Dali::PropertyNotification mPositionUpdateNotification;
707   Dali::PropertyNotification mSizeUpdateNotification;
708   Dali::PropertyNotification mScaleUpdateNotification;
709   Dali::Rect<int32_t>        mWebViewArea;
710   bool                       mVideoHoleEnabled;
711   bool                       mMouseEventsEnabled;
712   bool                       mKeyEventsEnabled;
713
714   Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback mScreenshotCapturedCallback;
715   Dali::WebEnginePlugin::WebEngineFrameRenderedCallback     mFrameRenderedCallback;
716 };
717
718 } // namespace Internal
719
720 inline Toolkit::Internal::WebView& GetImpl(Toolkit::WebView& handle)
721 {
722   DALI_ASSERT_ALWAYS(handle);
723   Dali::RefObject& impl = handle.GetImplementation();
724   return static_cast<Toolkit::Internal::WebView&>(impl);
725 }
726
727 inline const Toolkit::Internal::WebView& GetImpl(const Toolkit::WebView& handle)
728 {
729   DALI_ASSERT_ALWAYS(handle);
730   const Dali::RefObject& impl = handle.GetImplementation();
731   return static_cast<const Toolkit::Internal::WebView&>(impl);
732 }
733
734 } // namespace Toolkit
735
736 } // namespace Dali
737
738 #endif // DALI_TOOLKIT_INTERNAL_WEB_VIEW_H