400ee0193a0ee4b08adabbef5a0a6bc53dcabb3c
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / WebView / WebView.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System;
19 using System.ComponentModel;
20 using System.Collections.Generic;
21 using System.Runtime.InteropServices;
22 using Tizen.NUI.BaseComponents;
23 using Tizen.NUI.Binding;
24
25 namespace Tizen.NUI
26 {
27     /// <summary>
28     /// WebView
29     /// </summary>
30     [EditorBrowsable(EditorBrowsableState.Never)]
31     public class WebView : View
32     {
33         private Vector4 contentBackgroundColor;
34         private bool tilesClearedWhenHidden;
35         private float tileCoverAreaMultiplier;
36         private bool cursorEnabledByClient;
37
38         private readonly WebViewPageLoadSignal pageLoadStartedSignal;
39         private EventHandler<WebViewPageLoadEventArgs> pageLoadStartedEventHandler;
40         private WebViewPageLoadCallbackDelegate pageLoadStartedCallback;
41
42         private readonly WebViewPageLoadSignal pageLoadingSignal;
43         private EventHandler<WebViewPageLoadEventArgs> pageLoadingEventHandler;
44         private WebViewPageLoadCallbackDelegate pageLoadingCallback;
45
46         private readonly WebViewPageLoadSignal pageLoadFinishedSignal;
47         private EventHandler<WebViewPageLoadEventArgs> pageLoadFinishedEventHandler;
48         private WebViewPageLoadCallbackDelegate pageLoadFinishedCallback;
49
50         private readonly WebViewPageLoadErrorSignal pageLoadErrorSignal;
51         private EventHandler<WebViewPageLoadErrorEventArgs> pageLoadErrorEventHandler;
52         private WebViewPageLoadErrorCallbackDelegate pageLoadErrorCallback;
53
54         private readonly WebViewScrollEdgeReachedSignal scrollEdgeReachedSignal;
55         private EventHandler<WebViewScrollEdgeReachedEventArgs> scrollEdgeReachedEventHandler;
56         private WebViewScrollEdgeReachedCallbackDelegate scrollEdgeReachedCallback;
57
58         private readonly WebViewUrlChangedSignal urlChangedSignal;
59         private EventHandler<WebViewUrlChangedEventArgs> urlChangedEventHandler;
60         private WebViewUrlChangedCallbackDelegate urlChangedCallback;
61
62         private readonly WebViewFormRepostPolicyDecidedSignal formRepostPolicyDecidedSignal;
63         private EventHandler<WebViewFormRepostPolicyDecidedEventArgs> formRepostPolicyDecidedEventHandler;
64         private WebViewFormRepostPolicyDecidedCallbackDelegate formRepostPolicyDecidedCallback;
65
66         private readonly WebViewFrameRenderedSignal frameRenderedSignal;
67         private EventHandler<EventArgs> frameRenderedEventHandler;
68         private WebViewFrameRenderedCallbackDelegate frameRenderedCallback;
69
70         private ScreenshotAcquiredCallback screenshotAcquiredCallback;
71         private readonly WebViewScreenshotAcquiredProxyCallback screenshotAcquiredProxyCallback;
72
73         private readonly WebViewNewWindowPolicyDecidedSignal newWindowPolicyDecidedSignal;
74         private EventHandler<WebViewNewWindowPolicyDecidedEventArgs> newWindowPolicyDecidedEventHandler;
75         private WebViewNewWindowPolicyDecidedCallbackDelegate newWindowPolicyDecidedCallback;
76
77         /// <summary>
78         /// Creates a WebView.
79         /// </summary>
80         [EditorBrowsable(EditorBrowsableState.Never)]
81         public WebView() : this(Interop.WebView.New(), true)
82         {
83             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84         }
85
86         /// <summary>
87         /// Creates a WebView with local language and time zone.
88         /// <param name="locale">The locale language of Web</param>
89         /// <param name="timezoneId">The time zone Id of Web</param>
90         /// </summary>
91         [EditorBrowsable(EditorBrowsableState.Never)]
92         public WebView(string locale, string timezoneId) : this(Interop.WebView.New2(locale, timezoneId), true)
93         {
94             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95         }
96
97         /// <summary>
98         /// Creates a WebView with an args list.
99         /// <param name="args">args array. The first value of array must be program's name.</param>
100         /// </summary>
101         [EditorBrowsable(EditorBrowsableState.Never)]
102         public WebView(string[] args) : this(Interop.WebView.New3(args?.Length ?? 0, args), true)
103         {
104             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105         }
106
107         /// <summary>
108         /// Copy constructor.
109         /// <param name="webView">WebView to copy. The copied WebView will point at the same implementation</param>
110         /// </summary>
111         [EditorBrowsable(EditorBrowsableState.Never)]
112         public WebView(WebView webView) : this(Interop.WebView.NewWebView(WebView.getCPtr(webView)), true)
113         {
114             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115         }
116
117         internal WebView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.WebView.Upcast(cPtr), cMemoryOwn)
118         {
119             pageLoadStartedSignal = new WebViewPageLoadSignal(Interop.WebView.NewWebViewPageLoadSignalPageLoadStarted(SwigCPtr));
120             pageLoadingSignal = new WebViewPageLoadSignal(Interop.WebView.NewWebViewPageLoadSignalPageLoadInProgress(SwigCPtr));
121             pageLoadFinishedSignal = new WebViewPageLoadSignal(Interop.WebView.NewWebViewPageLoadSignalPageLoadFinished(SwigCPtr));
122             pageLoadErrorSignal = new WebViewPageLoadErrorSignal(Interop.WebView.NewWebViewPageLoadErrorSignalPageLoadError(SwigCPtr));
123             scrollEdgeReachedSignal = new WebViewScrollEdgeReachedSignal(Interop.WebView.NewWebViewScrollEdgeReachedSignalScrollEdgeReached(SwigCPtr));
124             urlChangedSignal = new WebViewUrlChangedSignal(Interop.WebView.NewWebViewUrlChangedSignalUrlChanged(SwigCPtr));
125             formRepostPolicyDecidedSignal = new WebViewFormRepostPolicyDecidedSignal(Interop.WebView.NewWebViewFormRepostDecisionSignalFormRepostDecision(SwigCPtr));
126             frameRenderedSignal = new WebViewFrameRenderedSignal(Interop.WebView.WebViewFrameRenderedSignalFrameRenderedGet(SwigCPtr));
127             newWindowPolicyDecidedSignal = new WebViewNewWindowPolicyDecidedSignal(Interop.WebView.NewWebViewPolicyDecisionSignalPolicyDecision(SwigCPtr));
128
129             screenshotAcquiredProxyCallback = OnScreenshotAcquired;
130
131             BackForwardList = new WebBackForwardList(Interop.WebView.GetWebBackForwardList(SwigCPtr), false);
132             Context = new WebContext(Interop.WebView.GetWebContext(SwigCPtr), false);
133             CookieManager = new WebCookieManager(Interop.WebView.GetWebCookieManager(SwigCPtr), false);
134             Settings = new WebSettings(Interop.WebView.GetWebSettings(SwigCPtr), false);
135         }
136
137         /// <summary>
138         /// Dispose for IDisposable pattern
139         /// </summary>
140         [EditorBrowsable(EditorBrowsableState.Never)]
141         protected override void Dispose(DisposeTypes type)
142         {
143             if (disposed)
144             {
145                 return;
146             }
147
148             if (type == DisposeTypes.Explicit)
149             {
150                 //Called by User
151                 //Release your own managed resources here.
152                 //You should release all of your own disposable objects here.
153                 pageLoadStartedSignal.Dispose();
154                 pageLoadingSignal.Dispose();
155                 pageLoadFinishedSignal.Dispose();
156                 pageLoadErrorSignal.Dispose();
157                 scrollEdgeReachedSignal.Dispose();
158                 urlChangedSignal.Dispose();
159                 formRepostPolicyDecidedSignal.Dispose();
160                 frameRenderedSignal.Dispose();
161                 newWindowPolicyDecidedSignal.Dispose();
162
163                 BackForwardList.Dispose();
164                 Context.Dispose();
165                 CookieManager.Dispose();
166                 Settings.Dispose();
167             }
168
169             base.Dispose(type);
170         }
171
172         /// <summary>
173         /// The callback function that is invoked when the message is received from the script.
174         /// </summary>
175         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
176         [EditorBrowsable(EditorBrowsableState.Never)]
177         public delegate void JavaScriptMessageHandler(string message);
178
179         /// <summary>
180         /// The callback function that is invoked when the message is received from the script.
181         /// </summary>
182         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
183         [EditorBrowsable(EditorBrowsableState.Never)]
184         public delegate void JavaScriptAlertCallback(string message);
185
186         /// <summary>
187         /// The callback function that is invoked when the message is received from the script.
188         /// </summary>
189         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
190         [EditorBrowsable(EditorBrowsableState.Never)]
191         public delegate void JavaScriptConfirmCallback(string message);
192
193         /// <summary>
194         /// The callback function that is invoked when the message is received from the script.
195         /// </summary>
196         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
197         [EditorBrowsable(EditorBrowsableState.Never)]
198         public delegate void JavaScriptPromptCallback(string message1, string message2);
199
200         /// <summary>
201         /// The callback function that is invoked when screen shot is acquired asynchronously.
202         /// </summary>
203         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
204         [EditorBrowsable(EditorBrowsableState.Never)]
205         public delegate void ScreenshotAcquiredCallback(ImageView image);
206
207         /// <summary>
208         /// The callback function that is invoked when video playing is checked asynchronously.
209         /// </summary>
210         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
211         [EditorBrowsable(EditorBrowsableState.Never)]
212         public delegate void VideoPlayingCallback(bool isPlaying);
213
214         /// <summary>
215         /// The callback function that is invoked when geolocation permission is requested.
216         /// </summary>
217         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
218         [EditorBrowsable(EditorBrowsableState.Never)]
219         public delegate void GeolocationPermissionCallback(string host, string protocol);
220
221         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
222         private delegate void WebViewPageLoadCallbackDelegate(IntPtr data, string pageUrl);
223
224         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
225         private delegate void WebViewPageLoadErrorCallbackDelegate(IntPtr data, string pageUrl, int errorCode);
226
227         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
228         private delegate void WebViewScrollEdgeReachedCallbackDelegate(IntPtr data, int edge);
229
230         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
231         private delegate void WebViewUrlChangedCallbackDelegate(IntPtr data, string pageUrl);
232
233         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
234         private delegate void WebViewFormRepostPolicyDecidedCallbackDelegate(IntPtr data, IntPtr maker);
235
236         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
237         private delegate void WebViewFrameRenderedCallbackDelegate(IntPtr data);
238
239         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
240         private delegate void WebViewScreenshotAcquiredProxyCallback(IntPtr data);
241
242         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
243         private delegate void WebViewNewWindowPolicyDecidedCallbackDelegate(IntPtr data, IntPtr maker);
244
245         /// <summary>
246         /// Event for the PageLoadStarted signal which can be used to subscribe or unsubscribe the event handler.<br />
247         /// This signal is emitted when page loading has started.<br />
248         /// </summary>
249         [EditorBrowsable(EditorBrowsableState.Never)]
250         public event EventHandler<WebViewPageLoadEventArgs> PageLoadStarted
251         {
252             add
253             {
254                 if (pageLoadStartedEventHandler == null)
255                 {
256                     pageLoadStartedCallback = (OnPageLoadStarted);
257                     pageLoadStartedSignal.Connect(pageLoadStartedCallback);
258                 }
259                 pageLoadStartedEventHandler += value;
260             }
261             remove
262             {
263                 pageLoadStartedEventHandler -= value;
264                 if (pageLoadStartedEventHandler == null && pageLoadStartedCallback != null)
265                 {
266                     pageLoadStartedSignal.Disconnect(pageLoadStartedCallback);
267                 }
268             }
269         }
270
271         /// <summary>
272         /// Event for the PageLoading signal which can be used to subscribe or unsubscribe the event handler.<br />
273         /// This signal is emitted when page loading is in progress.<br />
274         /// </summary>
275         [EditorBrowsable(EditorBrowsableState.Never)]
276         public event EventHandler<WebViewPageLoadEventArgs> PageLoading
277         {
278             add
279             {
280                 if (pageLoadingEventHandler == null)
281                 {
282                     pageLoadingCallback = OnPageLoading;
283                     pageLoadingSignal.Connect(pageLoadingCallback);
284                 }
285                 pageLoadingEventHandler += value;
286             }
287             remove
288             {
289                 pageLoadingEventHandler -= value;
290                 if (pageLoadingEventHandler == null && pageLoadingCallback != null)
291                 {
292                     pageLoadingSignal.Disconnect(pageLoadingCallback);
293                 }
294             }
295         }
296
297         /// <summary>
298         /// Event for the PageLoadFinished signal which can be used to subscribe or unsubscribe the event handler.<br />
299         /// This signal is emitted when page loading has finished.<br />
300         /// </summary>
301         [EditorBrowsable(EditorBrowsableState.Never)]
302         public event EventHandler<WebViewPageLoadEventArgs> PageLoadFinished
303         {
304             add
305             {
306                 if (pageLoadFinishedEventHandler == null)
307                 {
308                     pageLoadFinishedCallback = (OnPageLoadFinished);
309                     pageLoadFinishedSignal.Connect(pageLoadFinishedCallback);
310                 }
311                 pageLoadFinishedEventHandler += value;
312             }
313             remove
314             {
315                 pageLoadFinishedEventHandler -= value;
316                 if (pageLoadFinishedEventHandler == null && pageLoadFinishedCallback != null)
317                 {
318                     pageLoadFinishedSignal.Disconnect(pageLoadFinishedCallback);
319                 }
320             }
321         }
322
323         /// <summary>
324         /// Event for the PageLoadError signal which can be used to subscribe or unsubscribe the event handler.<br />
325         /// This signal is emitted when there's an error in page loading.<br />
326         /// </summary>
327         [EditorBrowsable(EditorBrowsableState.Never)]
328         public event EventHandler<WebViewPageLoadErrorEventArgs> PageLoadError
329         {
330             add
331             {
332                 if (pageLoadErrorEventHandler == null)
333                 {
334                     pageLoadErrorCallback = (OnPageLoadError);
335                     pageLoadErrorSignal.Connect(pageLoadErrorCallback);
336                 }
337                 pageLoadErrorEventHandler += value;
338             }
339             remove
340             {
341                 pageLoadErrorEventHandler -= value;
342                 if (pageLoadErrorEventHandler == null && pageLoadErrorCallback != null)
343                 {
344                     pageLoadErrorSignal.Disconnect(pageLoadErrorCallback);
345                 }
346             }
347         }
348
349         /// <summary>
350         /// Event for the ScrollEdgeReached signal which can be used to subscribe or unsubscribe the event handler.<br />
351         /// This signal is emitted when web view is scrolled to edge.<br />
352         /// </summary>
353         [EditorBrowsable(EditorBrowsableState.Never)]
354         public event EventHandler<WebViewScrollEdgeReachedEventArgs> ScrollEdgeReached
355         {
356             add
357             {
358                 if (scrollEdgeReachedEventHandler == null)
359                 {
360                     scrollEdgeReachedCallback = OnScrollEdgeReached;
361                     scrollEdgeReachedSignal.Connect(scrollEdgeReachedCallback);
362                 }
363                 scrollEdgeReachedEventHandler += value;
364             }
365             remove
366             {
367                 scrollEdgeReachedEventHandler -= value;
368                 if (scrollEdgeReachedEventHandler == null && scrollEdgeReachedCallback != null)
369                 {
370                     scrollEdgeReachedSignal.Disconnect(scrollEdgeReachedCallback);
371                 }
372             }
373         }
374
375         /// <summary>
376         /// Event for the UrlChanged signal which can be used to subscribe or unsubscribe the event handler.<br />
377         /// This signal is emitted when url is changed.<br />
378         /// </summary>
379         [EditorBrowsable(EditorBrowsableState.Never)]
380         public event EventHandler<WebViewUrlChangedEventArgs> UrlChanged
381         {
382             add
383             {
384                 if (urlChangedEventHandler == null)
385                 {
386                     urlChangedCallback = OnUrlChanged;
387                     urlChangedSignal.Connect(urlChangedCallback);
388                 }
389                 urlChangedEventHandler += value;
390             }
391             remove
392             {
393                 urlChangedEventHandler -= value;
394                 if (urlChangedEventHandler == null && urlChangedCallback != null)
395                 {
396                     urlChangedSignal.Disconnect(urlChangedCallback);
397                 }
398             }
399         }
400
401         /// <summary>
402         /// Event for the FormRepostDecided signal which can be used to subscribe or unsubscribe the event handler.<br />
403         /// This signal is emitted when form repost policy would be decided.<br />
404         /// </summary>
405         [EditorBrowsable(EditorBrowsableState.Never)]
406         public event EventHandler<WebViewFormRepostPolicyDecidedEventArgs> FormRepostPolicyDecided
407         {
408             add
409             {
410                 if (formRepostPolicyDecidedEventHandler == null)
411                 {
412                     formRepostPolicyDecidedCallback = OnFormRepostPolicyDecided;
413                     formRepostPolicyDecidedSignal.Connect(formRepostPolicyDecidedCallback);
414                 }
415                 formRepostPolicyDecidedEventHandler += value;
416             }
417             remove
418             {
419                 formRepostPolicyDecidedEventHandler -= value;
420                 if (formRepostPolicyDecidedEventHandler == null && formRepostPolicyDecidedCallback != null)
421                 {
422                     formRepostPolicyDecidedSignal.Disconnect(formRepostPolicyDecidedCallback);
423                 }
424             }
425         }
426
427         /// <summary>
428         /// Event for the FrameRendered signal which can be used to subscribe or unsubscribe the event handler.<br />
429         /// This signal is emitted when frame is rendered off-screen.<br />
430         /// </summary>
431         [EditorBrowsable(EditorBrowsableState.Never)]
432         public event EventHandler<EventArgs> FrameRendered
433         {
434             add
435             {
436                 if (frameRenderedEventHandler == null)
437                 {
438                     frameRenderedCallback = OnFrameRendered;
439                     frameRenderedSignal.Connect(frameRenderedCallback);
440                 }
441                 frameRenderedEventHandler += value;
442             }
443             remove
444             {
445                 frameRenderedEventHandler -= value;
446                 if (frameRenderedEventHandler == null && frameRenderedCallback != null)
447                 {
448                     frameRenderedSignal.Disconnect(frameRenderedCallback);
449                 }
450             }
451         }
452
453         /// <summary>
454         /// Event for the NewWindowPolicyDecided signal which can be used to subscribe or unsubscribe the event handler.<br />
455         /// This signal is emitted when new window policy would be decided.<br />
456         /// </summary>
457         [EditorBrowsable(EditorBrowsableState.Never)]
458         public event EventHandler<WebViewNewWindowPolicyDecidedEventArgs> NewWindowPolicyDecided
459         {
460             add
461             {
462                 if (newWindowPolicyDecidedEventHandler == null)
463                 {
464                     newWindowPolicyDecidedCallback = OnNewWindowPolicyDecided;
465                     newWindowPolicyDecidedSignal.Connect(newWindowPolicyDecidedCallback);
466                 }
467                 newWindowPolicyDecidedEventHandler += value;
468             }
469             remove
470             {
471                 newWindowPolicyDecidedEventHandler -= value;
472                 if (newWindowPolicyDecidedEventHandler == null && newWindowPolicyDecidedCallback != null)
473                 {
474                     newWindowPolicyDecidedSignal.Disconnect(newWindowPolicyDecidedCallback);
475                 }
476             }
477         }
478
479         /// <summary>
480         /// Options for searching texts.
481         /// </summary>
482         [EditorBrowsable(EditorBrowsableState.Never)]
483         public enum FindOption
484         {
485             /// <summary>
486             /// No search flags
487             /// </summary>
488             [EditorBrowsable(EditorBrowsableState.Never)]
489             None = 0,
490
491             /// <summary>
492             /// Case insensitive search
493             /// </summary>
494             [EditorBrowsable(EditorBrowsableState.Never)]
495             CaseInsensitive = 1 << 0,
496
497             /// <summary>
498             /// Search text only at the beginning of the words
499             /// </summary>
500             [EditorBrowsable(EditorBrowsableState.Never)]
501             AtWordStart = 1 << 1,
502
503             /// <summary>
504             /// Treat capital letters in the middle of words as word start
505             /// </summary>
506             [EditorBrowsable(EditorBrowsableState.Never)]
507             TreatMediaCapitalAsWordStart = 1 << 2,
508
509             /// <summary>
510             /// Search backwards
511             /// </summary>
512             [EditorBrowsable(EditorBrowsableState.Never)]
513             Backwards = 1 << 3,
514
515             /// <summary>
516             /// If not present the search stops at the end of the document
517             /// </summary>
518             [EditorBrowsable(EditorBrowsableState.Never)]
519             WrapAround = 1 << 4,
520
521             /// <summary>
522             /// Show overlay
523             /// </summary>
524             [EditorBrowsable(EditorBrowsableState.Never)]
525             ShowOverlay = 1 << 5,
526
527             /// <summary>
528             /// Show indicator
529             /// </summary>
530             [EditorBrowsable(EditorBrowsableState.Never)]
531             ShowFindIndiator = 1 << 6,
532
533             /// <summary>
534             /// Show highlight
535             /// </summary>
536             [EditorBrowsable(EditorBrowsableState.Never)]
537             ShowHighlight = 1 << 7,
538         }
539
540         /// <summary>
541         /// BackForwardList.
542         /// </summary>
543         [EditorBrowsable(EditorBrowsableState.Never)]
544         public WebBackForwardList BackForwardList { get; }
545
546         /// <summary>
547         /// Context.
548         /// </summary>
549         [EditorBrowsable(EditorBrowsableState.Never)]
550         public WebContext Context { get; }
551
552         /// <summary>
553         /// CookieManager.
554         /// </summary>
555         [EditorBrowsable(EditorBrowsableState.Never)]
556         public WebCookieManager CookieManager { get; }
557
558         /// <summary>
559         /// BackForwardList.
560         /// </summary>
561         [EditorBrowsable(EditorBrowsableState.Never)]
562         public WebSettings Settings { get; }
563
564         /// <summary>
565         /// The url to load.
566         /// </summary>
567         [EditorBrowsable(EditorBrowsableState.Never)]
568         public string Url
569         {
570             get
571             {
572                 return (string)GetValue(UrlProperty);
573             }
574             set
575             {
576                 SetValue(UrlProperty, value);
577                 NotifyPropertyChanged();
578             }
579         }
580
581         /// <summary>
582         /// Deprecated. The cache model of the current WebView.
583         /// </summary>
584         [EditorBrowsable(EditorBrowsableState.Never)]
585         public CacheModel CacheModel
586         {
587             get
588             {
589                 return (CacheModel)Context.CacheModel;
590             }
591             set
592             {
593                 Context.CacheModel = (WebContext.CacheModelType)value;
594             }
595         }
596
597         /// <summary>
598         /// Deprecated. The cookie acceptance policy.
599         /// </summary>
600         [EditorBrowsable(EditorBrowsableState.Never)]
601         public CookieAcceptPolicy CookieAcceptPolicy
602         {
603             get
604             {
605                 return (CookieAcceptPolicy)CookieManager.CookieAcceptPolicy;
606             }
607             set
608             {
609                 CookieManager.CookieAcceptPolicy = (WebCookieManager.CookieAcceptPolicyType)value;
610             }
611         }
612
613         /// <summary>
614         /// The user agent string.
615         /// </summary>
616         [EditorBrowsable(EditorBrowsableState.Never)]
617         public string UserAgent
618         {
619             get
620             {
621                 return (string)GetValue(UserAgentProperty);
622             }
623             set
624             {
625                 SetValue(UserAgentProperty, value);
626                 NotifyPropertyChanged();
627             }
628         }
629
630         /// <summary>
631         /// Deprecated. Whether JavaScript is enabled.
632         /// </summary>
633         [EditorBrowsable(EditorBrowsableState.Never)]
634         public bool EnableJavaScript
635         {
636             get
637             {
638                 return Settings.EnableJavaScript;
639             }
640             set
641             {
642                 Settings.EnableJavaScript = value;
643             }
644         }
645
646         /// <summary>
647         /// Deprecated. Whether images can be loaded automatically.
648         /// </summary>
649         [EditorBrowsable(EditorBrowsableState.Never)]
650         public bool LoadImagesAutomatically
651         {
652             get
653             {
654                 return Settings.AllowImagesLoadAutomatically;
655             }
656             set
657             {
658                 Settings.AllowImagesLoadAutomatically = value;
659             }
660         }
661
662         /// <summary>
663         /// The default text encoding name.<br />
664         /// e.g. "UTF-8"<br />
665         /// </summary>
666         [EditorBrowsable(EditorBrowsableState.Never)]
667         public string DefaultTextEncodingName
668         {
669             get
670             {
671                 return Settings.DefaultTextEncodingName;
672             }
673             set
674             {
675                 Settings.DefaultTextEncodingName = value;
676             }
677         }
678
679         /// <summary>
680         /// The default font size in pixel.
681         /// </summary>
682         [EditorBrowsable(EditorBrowsableState.Never)]
683         public int DefaultFontSize
684         {
685             get
686             {
687                 return Settings.DefaultFontSize;
688             }
689             set
690             {
691                 Settings.DefaultFontSize = value;
692             }
693         }
694
695         /// <summary>
696         /// The position of scroll.
697         /// </summary>
698         [EditorBrowsable(EditorBrowsableState.Never)]
699         public Position ScrollPosition
700         {
701             get
702             {
703                 Vector2 pv = (Vector2)GetValue(ScrollPositionProperty);
704                 return new Position(pv.X, pv.Y);
705             }
706             set
707             {
708                 if (value != null)
709                 {
710                     Position pv = value;
711                     Vector2 vpv = new Vector2(pv.X, pv.Y);
712                     SetValue(ScrollPositionProperty, vpv);
713                     NotifyPropertyChanged();
714                 }
715             }
716         }
717
718         /// <summary>
719         /// The size of scroll, read-only.
720         /// </summary>
721         [EditorBrowsable(EditorBrowsableState.Never)]
722         public Size ScrollSize
723         {
724             get
725             {
726                 Vector2 sv = (Vector2)GetValue(ScrollSizeProperty);
727                 return new Size(sv.Width, sv.Height);
728             }
729         }
730
731         /// <summary>
732         /// The size of content, read-only.
733         /// </summary>
734         [EditorBrowsable(EditorBrowsableState.Never)]
735         public Size ContentSize
736         {
737             get
738             {
739                 Vector2 sv = (Vector2)GetValue(ContentSizeProperty);
740                 return new Size(sv.Width, sv.Height);
741             }
742         }
743
744         /// <summary>
745         /// Whether video hole is enabled or not.
746         /// </summary>
747         [EditorBrowsable(EditorBrowsableState.Never)]
748         public bool VideoHoleEnabled
749         {
750             get
751             {
752                 return (bool)GetValue(VideoHoleEnabledProperty);
753             }
754             set
755             {
756                 SetValue(VideoHoleEnabledProperty, value);
757                 NotifyPropertyChanged();
758             }
759         }
760
761         /// <summary>
762         /// Whether mouse events are enabled or not.
763         /// </summary>
764         [EditorBrowsable(EditorBrowsableState.Never)]
765         public bool MouseEventsEnabled
766         {
767             get
768             {
769                 return (bool)GetValue(MouseEventsEnabledProperty);
770             }
771             set
772             {
773                 SetValue(MouseEventsEnabledProperty, value);
774                 NotifyPropertyChanged();
775             }
776         }
777
778         /// <summary>
779         /// Whether key events are enabled or not.
780         /// </summary>
781         [EditorBrowsable(EditorBrowsableState.Never)]
782         public bool KeyEventsEnabled
783         {
784             get
785             {
786                 return (bool)GetValue(KeyEventsEnabledProperty);
787             }
788             set
789             {
790                 SetValue(KeyEventsEnabledProperty, value);
791                 NotifyPropertyChanged();
792             }
793         }
794
795         /// <summary>
796         /// Background color of web page.
797         /// </summary>
798         [EditorBrowsable(EditorBrowsableState.Never)]
799         public Color ContentBackgroundColor
800         {
801             get
802             {
803                 return (Color)GetValue(ContentBackgroundColorProperty);
804             }
805             set
806             {
807                 SetValue(ContentBackgroundColorProperty, value);
808                 NotifyPropertyChanged();
809             }
810         }
811
812         /// <summary>
813         /// Whether tiles are cleared or not when hidden.
814         /// </summary>
815         [EditorBrowsable(EditorBrowsableState.Never)]
816         public bool TilesClearedWhenHidden
817         {
818             get
819             {
820                 return (bool)GetValue(TilesClearedWhenHiddenProperty);
821             }
822             set
823             {
824                 SetValue(TilesClearedWhenHiddenProperty, value);
825                 NotifyPropertyChanged();
826             }
827         }
828
829         /// <summary>
830         /// Multiplier of cover area of tile when web page is rendered.
831         /// </summary>
832         [EditorBrowsable(EditorBrowsableState.Never)]
833         public float TileCoverAreaMultiplier
834         {
835             get
836             {
837                 return (float)GetValue(TileCoverAreaMultiplierProperty);
838             }
839             set
840             {
841                 SetValue(TileCoverAreaMultiplierProperty, value);
842                 NotifyPropertyChanged();
843             }
844         }
845
846         /// <summary>
847         /// Whether cursor is enabled or not by client.
848         /// </summary>
849         [EditorBrowsable(EditorBrowsableState.Never)]
850         public bool CursorEnabledByClient
851         {
852             get
853             {
854                 return (bool)GetValue(CursorEnabledByClientProperty);
855             }
856             set
857             {
858                 SetValue(CursorEnabledByClientProperty, value);
859                 NotifyPropertyChanged();
860             }
861         }
862
863         /// <summary>
864         /// Gets selected text in web page.
865         /// </summary>
866         [EditorBrowsable(EditorBrowsableState.Never)]
867         public string SelectedText
868         {
869             get
870             {
871                 return (string)GetValue(SelectedTextProperty);
872             }
873         }
874
875         /// <summary>
876         /// Gets title of web page.
877         /// </summary>
878         [EditorBrowsable(EditorBrowsableState.Never)]
879         public string Title
880         {
881             get
882             {
883                 return (string)GetValue(TitleProperty);
884             }
885         }
886
887         /// <summary>
888         /// Gets favicon of web page.
889         /// </summary>
890         [EditorBrowsable(EditorBrowsableState.Never)]
891         public ImageView Favicon
892         {
893             get
894             {
895                 global::System.IntPtr imageView = Interop.WebView.GetFavicon(SwigCPtr);
896                 if (NDalicPINVOKE.SWIGPendingException.Pending)
897                     return null;
898                 return new ImageView(imageView, false);
899             }
900         }
901
902         /// <summary>
903         /// Zoom factor of web page.
904         /// </summary>
905         [EditorBrowsable(EditorBrowsableState.Never)]
906         public float PageZoomFactor
907         {
908             get
909             {
910                 return (float)GetValue(PageZoomFactorProperty);
911             }
912             set
913             {
914                 SetValue(PageZoomFactorProperty, value);
915                 NotifyPropertyChanged();
916             }
917         }
918
919         /// <summary>
920         /// Zoom factor of text in web page.
921         /// </summary>
922         [EditorBrowsable(EditorBrowsableState.Never)]
923         public float TextZoomFactor
924         {
925             get
926             {
927                 return (float)GetValue(TextZoomFactorProperty);
928             }
929             set
930             {
931                 SetValue(TextZoomFactorProperty, value);
932                 NotifyPropertyChanged();
933             }
934         }
935
936         /// <summary>
937         /// Gets percentage of loading progress.
938         /// </summary>
939         [EditorBrowsable(EditorBrowsableState.Never)]
940         public float LoadProgressPercentage
941         {
942             get
943             {
944                 return (float)GetValue(LoadProgressPercentageProperty);
945             }
946         }
947
948         internal static new class Property
949         {
950             internal static readonly int Url = Interop.WebView.UrlGet();
951             internal static readonly int UserAgent = Interop.WebView.UserAgentGet();
952             internal static readonly int ScrollPosition = Interop.WebView.ScrollPositionGet();
953             internal static readonly int ScrollSize = Interop.WebView.ScrollSizeGet();
954             internal static readonly int ContentSize = Interop.WebView.ContentSizeGet();
955             internal static readonly int Title = Interop.WebView.TitleGet();
956             internal static readonly int VideoHoleEnabled = Interop.WebView.VideoHoleEnabledGet();
957             internal static readonly int MouseEventsEnabled = Interop.WebView.MouseEventsEnabledGet();
958             internal static readonly int KeyEventsEnabled = Interop.WebView.KeyEventsEnabledGet();
959             internal static readonly int DocumentBackgroundColor = Interop.WebView.DocumentBackgroundColorGet();
960             internal static readonly int TilesClearedWhenHidden = Interop.WebView.TilesClearedWhenHiddenGet();
961             internal static readonly int TileCoverAreaMultiplier = Interop.WebView.TileCoverAreaMultiplierGet();
962             internal static readonly int CursorEnabledByClient = Interop.WebView.CursorEnabledByClientGet();
963             internal static readonly int SelectedText = Interop.WebView.SelectedTextGet();
964             internal static readonly int PageZoomFactor = Interop.WebView.PageZoomFactorGet();
965             internal static readonly int TextZoomFactor = Interop.WebView.TextZoomFactorGet();
966             internal static readonly int LoadProgressPercentage = Interop.WebView.LoadProgressPercentageGet();
967         }
968
969         private static readonly BindableProperty UrlProperty = BindableProperty.Create(nameof(Url), typeof(string), typeof(WebView), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
970         {
971             var webview = (WebView)bindable;
972             if (newValue != null)
973             {
974                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.Url, new Tizen.NUI.PropertyValue((string)newValue));
975             }
976         }),
977         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
978         {
979             var webview = (WebView)bindable;
980             string temp;
981             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.Url).Get(out temp);
982             return temp;
983         }));
984
985         private static readonly BindableProperty UserAgentProperty = BindableProperty.Create(nameof(UserAgent), typeof(string), typeof(WebView), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
986         {
987             var webview = (WebView)bindable;
988             if (newValue != null)
989             {
990                 Tizen.NUI.Object.SetProperty((HandleRef)webview.SwigCPtr, WebView.Property.UserAgent, new Tizen.NUI.PropertyValue((string)newValue));
991             }
992         }),
993         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
994         {
995             var webview = (WebView)bindable;
996             string temp;
997             Tizen.NUI.Object.GetProperty((HandleRef)webview.SwigCPtr, WebView.Property.UserAgent).Get(out temp);
998             return temp;
999         }));
1000
1001         private static readonly BindableProperty ScrollPositionProperty = BindableProperty.Create(nameof(ScrollPosition), typeof(Vector2), typeof(WebView), null, propertyChanged: (bindable, oldValue, newValue) =>
1002         {
1003             var webview = (WebView)bindable;
1004             if (newValue != null)
1005             {
1006                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.ScrollPosition, new Tizen.NUI.PropertyValue((Vector2)newValue));
1007             }
1008         },
1009         defaultValueCreator: (bindable) =>
1010         {
1011             var webview = (WebView)bindable;
1012             Vector2 temp = new Vector2(0.0f, 0.0f);
1013             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.ScrollPosition).Get(temp);
1014             return temp;
1015         });
1016
1017         private static readonly BindableProperty ScrollSizeProperty = BindableProperty.Create(nameof(ScrollSize), typeof(Vector2), typeof(WebView), null, defaultValueCreator: (bindable) =>
1018         {
1019             var webview = (WebView)bindable;
1020             Vector2 temp = new Vector2(0.0f, 0.0f);
1021             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.ScrollSize).Get(temp);
1022             return temp;
1023         });
1024
1025         private static readonly BindableProperty ContentSizeProperty = BindableProperty.Create(nameof(ContentSize), typeof(Vector2), typeof(WebView), null, defaultValueCreator: (bindable) =>
1026         {
1027             var webview = (WebView)bindable;
1028             Vector2 temp = new Vector2(0.0f, 0.0f);
1029             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.ContentSize).Get(temp);
1030             return temp;
1031         });
1032
1033         private static readonly BindableProperty TitleProperty = BindableProperty.Create(nameof(Title), typeof(string), typeof(WebView), null, defaultValueCreator: (bindable) =>
1034         {
1035             var webview = (WebView)bindable;
1036             string title;
1037             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.Title).Get(out title);
1038             return title;
1039         });
1040
1041         private static readonly BindableProperty VideoHoleEnabledProperty = BindableProperty.Create(nameof(VideoHoleEnabled), typeof(bool), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1042         {
1043             var webview = (WebView)bindable;
1044             if (newValue != null)
1045             {
1046                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.VideoHoleEnabled, new Tizen.NUI.PropertyValue((bool)newValue));
1047             }
1048         },
1049         defaultValueCreator: (bindable) =>
1050         {
1051             var webview = (WebView)bindable;
1052             bool temp;
1053             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.VideoHoleEnabled).Get(out temp);
1054             return temp;
1055         });
1056
1057         private static readonly BindableProperty MouseEventsEnabledProperty = BindableProperty.Create(nameof(MouseEventsEnabled), typeof(bool), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1058         {
1059             var webview = (WebView)bindable;
1060             if (newValue != null)
1061             {
1062                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.MouseEventsEnabled, new Tizen.NUI.PropertyValue((bool)newValue));
1063             }
1064         },
1065         defaultValueCreator: (bindable) =>
1066         {
1067             var webview = (WebView)bindable;
1068             bool temp;
1069             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.MouseEventsEnabled).Get(out temp);
1070             return temp;
1071         });
1072
1073         private static readonly BindableProperty KeyEventsEnabledProperty = BindableProperty.Create(nameof(KeyEventsEnabled), typeof(bool), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1074         {
1075             var webview = (WebView)bindable;
1076             if (newValue != null)
1077             {
1078                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.KeyEventsEnabled, new Tizen.NUI.PropertyValue((bool)newValue));
1079             }
1080         },
1081         defaultValueCreator: (bindable) =>
1082         {
1083             var webview = (WebView)bindable;
1084             bool temp;
1085             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.KeyEventsEnabled).Get(out temp);
1086             return temp;
1087         });
1088
1089         private static readonly BindableProperty ContentBackgroundColorProperty = BindableProperty.Create(nameof(ContentBackgroundColor), typeof(Vector4), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1090         {
1091             var webview = (WebView)bindable;
1092             if (newValue != null)
1093             {
1094                 webview.contentBackgroundColor = (Vector4)newValue;
1095                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.DocumentBackgroundColor, new Tizen.NUI.PropertyValue((Vector4)newValue));
1096             }
1097         },
1098         defaultValueCreator: (bindable) =>
1099         {
1100             var webview = (WebView)bindable;
1101             return webview.contentBackgroundColor;
1102         });
1103
1104         private static readonly BindableProperty TilesClearedWhenHiddenProperty = BindableProperty.Create(nameof(TilesClearedWhenHidden), typeof(bool), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1105         {
1106             var webview = (WebView)bindable;
1107             if (newValue != null)
1108             {
1109                 webview.tilesClearedWhenHidden = (bool)newValue;
1110                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.TilesClearedWhenHidden, new Tizen.NUI.PropertyValue((bool)newValue));
1111             }
1112         },
1113         defaultValueCreator: (bindable) =>
1114         {
1115             var webview = (WebView)bindable;
1116             return webview.tilesClearedWhenHidden;
1117         });
1118
1119         private static readonly BindableProperty TileCoverAreaMultiplierProperty = BindableProperty.Create(nameof(TileCoverAreaMultiplier), typeof(float), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1120         {
1121             var webview = (WebView)bindable;
1122             if (newValue != null)
1123             {
1124                 webview.tileCoverAreaMultiplier = (float)newValue;
1125                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.TileCoverAreaMultiplier, new Tizen.NUI.PropertyValue((float)newValue));
1126             }
1127         },
1128         defaultValueCreator: (bindable) =>
1129         {
1130             var webview = (WebView)bindable;
1131             return webview.tileCoverAreaMultiplier;
1132         });
1133
1134         private static readonly BindableProperty CursorEnabledByClientProperty = BindableProperty.Create(nameof(CursorEnabledByClient), typeof(bool), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1135         {
1136             var webview = (WebView)bindable;
1137             if (newValue != null)
1138             {
1139                 webview.cursorEnabledByClient = (bool)newValue;
1140                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.CursorEnabledByClient, new Tizen.NUI.PropertyValue((bool)newValue));
1141             }
1142         },
1143         defaultValueCreator: (bindable) =>
1144         {
1145             var webview = (WebView)bindable;
1146             return webview.cursorEnabledByClient;
1147         });
1148
1149         private static readonly BindableProperty SelectedTextProperty = BindableProperty.Create(nameof(SelectedText), typeof(string), typeof(WebView), null, defaultValueCreator: (bindable) =>
1150         {
1151             var webview = (WebView)bindable;
1152             string text;
1153             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.SelectedText).Get(out text);
1154             return text;
1155         });
1156
1157         private static readonly BindableProperty PageZoomFactorProperty = BindableProperty.Create(nameof(PageZoomFactor), typeof(float), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1158         {
1159             var webview = (WebView)bindable;
1160             if (newValue != null)
1161             {
1162                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.PageZoomFactor, new Tizen.NUI.PropertyValue((float)newValue));
1163             }
1164         },
1165         defaultValueCreator: (bindable) =>
1166         {
1167             var webview = (WebView)bindable;
1168             float temp;
1169             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.PageZoomFactor).Get(out temp);
1170             return temp;
1171         });
1172
1173         private static readonly BindableProperty TextZoomFactorProperty = BindableProperty.Create(nameof(TextZoomFactor), typeof(float), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
1174         {
1175             var webview = (WebView)bindable;
1176             if (newValue != null)
1177             {
1178                 Tizen.NUI.Object.SetProperty(webview.SwigCPtr, WebView.Property.TextZoomFactor, new Tizen.NUI.PropertyValue((float)newValue));
1179             }
1180         },
1181         defaultValueCreator: (bindable) =>
1182         {
1183             var webview = (WebView)bindable;
1184             float temp;
1185             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.TextZoomFactor).Get(out temp);
1186             return temp;
1187         });
1188
1189         private static readonly BindableProperty LoadProgressPercentageProperty = BindableProperty.Create(nameof(LoadProgressPercentage), typeof(float), typeof(WebView), null, defaultValueCreator: (bindable) =>
1190         {
1191             var webview = (WebView)bindable;
1192             float percentage;
1193             Tizen.NUI.Object.GetProperty(webview.SwigCPtr, WebView.Property.LoadProgressPercentage).Get(out percentage);
1194             return percentage;
1195         });
1196
1197         // For rooting handlers
1198         internal Dictionary<string, JavaScriptMessageHandler> handlerRootMap = new Dictionary<string, JavaScriptMessageHandler>();
1199
1200         /// <summary>
1201         /// Loads a html.
1202         /// <param name="url">The path of Web</param>
1203         /// </summary>
1204         [EditorBrowsable(EditorBrowsableState.Never)]
1205         public void LoadUrl(string url)
1206         {
1207             Interop.WebView.LoadUrl(SwigCPtr, url);
1208             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1209         }
1210
1211         /// <summary>
1212         /// Deprecated. Loads a html by string.
1213         /// <param name="data">The data of Web</param>
1214         /// </summary>
1215         [EditorBrowsable(EditorBrowsableState.Never)]
1216         public void LoadHTMLString(string data)
1217         {
1218             Interop.WebView.LoadHtmlString(SwigCPtr, data);
1219             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1220         }
1221
1222         /// <summary>
1223         /// Loads a html by string.
1224         /// <param name="data">The data of Web</param>
1225         /// </summary>
1226         [EditorBrowsable(EditorBrowsableState.Never)]
1227         public void LoadHtmlString(string data)
1228         {
1229             Interop.WebView.LoadHtmlString(SwigCPtr, data);
1230             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1231         }
1232
1233         /// <summary>
1234         /// Loads the specified html as the content of the view to override current history entry.
1235         /// <param name="html">The html to be loaded</param>
1236         /// <param name="baseUri">Base URL used for relative paths to external objects</param>
1237         /// <param name="unreachableUri">URL that could not be reached</param>
1238         /// </summary>
1239         [EditorBrowsable(EditorBrowsableState.Never)]
1240         public bool LoadHtmlStringOverrideCurrentEntry(string html, string baseUri, string unreachableUri)
1241         {
1242             bool result = Interop.WebView.LoadHtmlStringOverrideCurrentEntry(SwigCPtr, html, baseUri, unreachableUri);
1243             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1244             return result;
1245         }
1246
1247         /// <summary>
1248         /// Requests to load the given contents by MIME type.
1249         /// <param name="contents">The contents to be loaded</param>
1250         /// <param name="contentSize">The size of contents (in bytes)</param>
1251         /// <param name="mimeType">The type of contents, "text/html" is assumed if null</param>
1252         /// <param name="encoding">The encoding for contents, "UTF-8" is assumed if null</param>
1253         /// <param name="baseUri">The base URI to use for relative resources</param>
1254         /// </summary>
1255         [EditorBrowsable(EditorBrowsableState.Never)]
1256         public bool LoadContents(string contents, uint contentSize, string mimeType, string encoding, string baseUri)
1257         {
1258             bool result = Interop.WebView.LoadContents(SwigCPtr, contents, contentSize, mimeType, encoding, baseUri);
1259             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1260             return result;
1261         }
1262
1263         /// <summary>
1264         /// Reloads the Web
1265         /// </summary>
1266         [EditorBrowsable(EditorBrowsableState.Never)]
1267         public void Reload()
1268         {
1269             Interop.WebView.Reload(SwigCPtr);
1270             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1271         }
1272
1273         /// <summary>
1274         /// Reloads the current page's document without cache
1275         /// </summary>
1276         [EditorBrowsable(EditorBrowsableState.Never)]
1277         public bool ReloadWithoutCache()
1278         {
1279             bool result = Interop.WebView.ReloadWithoutCache(SwigCPtr);
1280             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1281             return result;
1282         }
1283
1284         /// <summary>
1285         /// Stops loading the Web
1286         /// </summary>
1287         [EditorBrowsable(EditorBrowsableState.Never)]
1288         public void StopLoading()
1289         {
1290             Interop.WebView.StopLoading(SwigCPtr);
1291             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1292         }
1293
1294         /// <summary>
1295         /// Suspends the operation.
1296         /// </summary>
1297         [EditorBrowsable(EditorBrowsableState.Never)]
1298         public void Suspend()
1299         {
1300             Interop.WebView.Suspend(SwigCPtr);
1301             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1302         }
1303
1304         /// <summary>
1305         /// Resumes the operation after calling Suspend()
1306         /// </summary>
1307         [EditorBrowsable(EditorBrowsableState.Never)]
1308         public void Resume()
1309         {
1310             Interop.WebView.Resume(SwigCPtr);
1311             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1312         }
1313
1314         /// <summary>
1315         /// Suspends all network loading.
1316         /// </summary>
1317         [EditorBrowsable(EditorBrowsableState.Never)]
1318         public void SuspendNetworkLoading()
1319         {
1320             Interop.WebView.SuspendNetworkLoading(SwigCPtr);
1321             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1322         }
1323
1324         /// <summary>
1325         /// Resumes all network loading.
1326         /// </summary>
1327         [EditorBrowsable(EditorBrowsableState.Never)]
1328         public void ResumeNetworkLoading()
1329         {
1330             Interop.WebView.ResumeNetworkLoading(SwigCPtr);
1331             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1332         }
1333
1334         /// <summary>
1335         /// Adds custom header.
1336         /// <param name="name">The name of custom header</param>
1337         /// <param name="value">The value of custom header</param>
1338         /// </summary>
1339         [EditorBrowsable(EditorBrowsableState.Never)]
1340         public bool AddCustomHeader(string name, string value)
1341         {
1342             bool result = Interop.WebView.AddCustomHeader(SwigCPtr, name, value);
1343             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1344             return result;
1345         }
1346
1347         /// <summary>
1348         /// Removes custom header.
1349         /// <param name="name">The name of custom header</param>
1350         /// </summary>
1351         [EditorBrowsable(EditorBrowsableState.Never)]
1352         public bool RemoveCustomHeader(string name)
1353         {
1354             bool result = Interop.WebView.RemoveCustomHeader(SwigCPtr, name);
1355             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1356             return result;
1357         }
1358
1359         /// <summary>
1360         /// Starts the inspector server.
1361         /// <param name="port">The port number</param>
1362         /// </summary>
1363         [EditorBrowsable(EditorBrowsableState.Never)]
1364         public uint StartInspectorServer(uint port)
1365         {
1366             uint result = Interop.WebView.StartInspectorServer(SwigCPtr, port);
1367             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1368             return result;
1369         }
1370
1371         /// <summary>
1372         /// Stops the inspector server.
1373         /// </summary>
1374         [EditorBrowsable(EditorBrowsableState.Never)]
1375         public bool StopInspectorServer()
1376         {
1377             bool result = Interop.WebView.StopInspectorServer(SwigCPtr);
1378             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1379             return result;
1380         }
1381
1382         /// <summary>
1383         /// Scrolls page of web view by deltaX and detlaY.
1384         /// <param name="deltaX">The deltaX of scroll</param>
1385         /// <param name="deltaY">The deltaY of scroll</param>
1386         /// </summary>
1387         [EditorBrowsable(EditorBrowsableState.Never)]
1388         public void ScrollBy(int deltaX, int deltaY)
1389         {
1390             Interop.WebView.ScrollBy(SwigCPtr, deltaX, deltaY);
1391             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1392         }
1393
1394         /// <summary>
1395         /// Scrolls edge of web view by deltaX and deltaY.
1396         /// <param name="deltaX">The deltaX of scroll</param>
1397         /// <param name="deltaY">The deltaY of scroll</param>
1398         /// </summary>
1399         [EditorBrowsable(EditorBrowsableState.Never)]
1400         public bool ScrollEdgeBy(int deltaX, int deltaY)
1401         {
1402             bool result = Interop.WebView.ScrollEdgeBy(SwigCPtr, deltaX, deltaY);
1403             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1404             return result;
1405         }
1406
1407         /// <summary>
1408         /// Goes to the back
1409         /// </summary>
1410         [EditorBrowsable(EditorBrowsableState.Never)]
1411         public void GoBack()
1412         {
1413             Interop.WebView.GoBack(SwigCPtr);
1414             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1415         }
1416
1417         /// <summary>
1418         /// Goes to the forward
1419         /// </summary>
1420         [EditorBrowsable(EditorBrowsableState.Never)]
1421         public void GoForward()
1422         {
1423             Interop.WebView.GoForward(SwigCPtr);
1424             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1425         }
1426
1427         /// <summary>
1428         /// Returns whether backward is possible.
1429         /// <returns>True if backward is possible, false otherwise</returns>
1430         /// </summary>
1431         [EditorBrowsable(EditorBrowsableState.Never)]
1432         public bool CanGoBack()
1433         {
1434             bool ret = Interop.WebView.CanGoBack(SwigCPtr);
1435             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1436             return ret;
1437         }
1438
1439         /// <summary>
1440         /// Returns whether forward is possible.
1441         /// <returns>True if forward is possible, false otherwise</returns>
1442         /// </summary>
1443         [EditorBrowsable(EditorBrowsableState.Never)]
1444         public bool CanGoForward()
1445         {
1446             bool ret = Interop.WebView.CanGoForward(SwigCPtr);
1447             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1448             return ret;
1449         }
1450
1451         /// <summary>
1452         /// Evaluates JavaScript code represented as a string.
1453         /// <param name="script">The JavaScript code</param>
1454         /// </summary>
1455         [EditorBrowsable(EditorBrowsableState.Never)]
1456         public void EvaluateJavaScript(string script)
1457         {
1458             Interop.WebView.EvaluateJavaScript(SwigCPtr, script, new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero));
1459             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1460         }
1461
1462         /// <summary>
1463         /// Add a message handler into the WebView.
1464         /// <param name="objectName">The name of exposed object</param>
1465         /// <param name="handler">The callback function</param>
1466         /// </summary>
1467         [EditorBrowsable(EditorBrowsableState.Never)]
1468         public void AddJavaScriptMessageHandler(string objectName, JavaScriptMessageHandler handler)
1469         {
1470             if (handlerRootMap.ContainsKey(objectName))
1471             {
1472                 return;
1473             }
1474
1475             handlerRootMap.Add(objectName, handler);
1476
1477             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(handler);
1478             Interop.WebView.AddJavaScriptMessageHandler(SwigCPtr, objectName, new System.Runtime.InteropServices.HandleRef(this, ip));
1479
1480             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1481         }
1482
1483         /// <summary>
1484         /// Add a message handler into the WebView.
1485         /// <param name="callback">The callback function</param>
1486         /// </summary>
1487         [EditorBrowsable(EditorBrowsableState.Never)]
1488         public void RegisterJavaScriptAlertCallback(JavaScriptAlertCallback callback)
1489         {
1490             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(callback);
1491             Interop.WebView.RegisterJavaScriptAlertCallback(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1492
1493             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1494         }
1495
1496         /// <summary>
1497         /// Reply for alert popup.
1498         /// </summary>
1499         [EditorBrowsable(EditorBrowsableState.Never)]
1500         public void JavaScriptAlertReply()
1501         {
1502             Interop.WebView.JavaScriptAlertReply(SwigCPtr);
1503             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1504         }
1505
1506         /// <summary>
1507         /// Add a message handler into the WebView.
1508         /// <param name="callback">The callback function</param>
1509         /// </summary>
1510         [EditorBrowsable(EditorBrowsableState.Never)]
1511         public void RegisterJavaScriptConfirmCallback(JavaScriptConfirmCallback callback)
1512         {
1513             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(callback);
1514             Interop.WebView.RegisterJavaScriptConfirmCallback(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1515
1516             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1517         }
1518
1519         /// <summary>
1520         /// Reply for confirm popup.
1521         /// <param name="confirmed">confirmed or not</param>
1522         /// </summary>
1523         [EditorBrowsable(EditorBrowsableState.Never)]
1524         public void JavaScriptConfirmReply(bool confirmed)
1525         {
1526             Interop.WebView.JavaScriptConfirmReply(SwigCPtr, confirmed);
1527             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1528         }
1529
1530         /// <summary>
1531         /// Add a message handler into the WebView.
1532         /// <param name="callback">The callback function</param>
1533         /// </summary>
1534         [EditorBrowsable(EditorBrowsableState.Never)]
1535         public void RegisterJavaScriptPromptCallback(JavaScriptPromptCallback callback)
1536         {
1537             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(callback);
1538             Interop.WebView.RegisterJavaScriptPromptCallback(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
1539
1540             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1541         }
1542
1543         /// <summary>
1544         /// Reply for prompt popup.
1545         /// <param name="result">text in prompt input field.</param>
1546         /// </summary>
1547         [EditorBrowsable(EditorBrowsableState.Never)]
1548         public void JavaScriptPromptReply(string result)
1549         {
1550             Interop.WebView.JavaScriptPromptReply(SwigCPtr, result);
1551             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1552         }
1553
1554         /// <summary>
1555         /// Clears title resources of current WebView.
1556         /// </summary>
1557         [EditorBrowsable(EditorBrowsableState.Never)]
1558         public void ClearAllTilesResources()
1559         {
1560             Interop.WebView.ClearAllTilesResources(SwigCPtr);
1561             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1562         }
1563
1564         /// <summary>
1565         /// Clears the history of current WebView.
1566         /// </summary>
1567         [EditorBrowsable(EditorBrowsableState.Never)]
1568         public void ClearHistory()
1569         {
1570             Interop.WebView.ClearHistory(SwigCPtr);
1571             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1572         }
1573
1574         /// <summary>
1575         /// Scales the current page, centered at the given point.
1576         /// <param name="scaleFactor">The new factor to be scaled</param>
1577         /// <param name="point">The center coordinate</param>
1578         /// </summary>
1579         [EditorBrowsable(EditorBrowsableState.Never)]
1580         public void SetScaleFactor(float scaleFactor, Vector2 point)
1581         {
1582             Interop.WebView.SetScaleFactor(SwigCPtr, scaleFactor, Vector2.getCPtr(point));
1583             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1584         }
1585
1586         /// <summary>
1587         /// Gets the current scale factor of the page.
1588         /// </summary>
1589         [EditorBrowsable(EditorBrowsableState.Never)]
1590         public float GetScaleFactor()
1591         {
1592             float result = Interop.WebView.GetScaleFactor(SwigCPtr);
1593             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1594             return result;
1595         }
1596
1597         /// <summary>
1598         /// Requests to activate/deactivate the accessibility usage set by web app.
1599         /// <param name="activated">The new factor to be scaled</param>
1600         /// </summary>
1601         [EditorBrowsable(EditorBrowsableState.Never)]
1602         public void ActivateAccessibility(bool activated)
1603         {
1604             Interop.WebView.ActivateAccessibility(SwigCPtr, activated);
1605             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1606         }
1607
1608         /// <summary>
1609         /// Searches and highlights the given string in the document.
1610         /// <param name="text">The text to be searched</param>
1611         /// <param name="options">The options to search</param>
1612         /// <param name="maxMatchCount">The maximum match count to search</param>
1613         /// </summary>
1614         [EditorBrowsable(EditorBrowsableState.Never)]
1615         public bool HighlightText(string text, FindOption options, uint maxMatchCount)
1616         {
1617             bool result = Interop.WebView.HighlightText(SwigCPtr, text, (int)options, maxMatchCount);
1618             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1619             return result;
1620         }
1621
1622         /// <summary>
1623         /// Adds dynamic certificate path.
1624         /// <param name="host">Host that required client authentication</param>
1625         /// <param name="certPath">The file path stored certificate</param>
1626         /// </summary>
1627         [EditorBrowsable(EditorBrowsableState.Never)]
1628         public void AddDynamicCertificatePath(string host, string certPath)
1629         {
1630             Interop.WebView.AddDynamicCertificatePath(SwigCPtr, host, certPath);
1631             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1632         }
1633
1634         /// <summary>
1635         /// Get snapshot of the specified viewArea of page.
1636         /// <param name="viewArea">Host that required client authentication</param>
1637         /// <param name="scaleFactor">The file path stored certificate</param>
1638         /// </summary>
1639         [EditorBrowsable(EditorBrowsableState.Never)]
1640         public ImageView GetScreenshot(Rectangle viewArea, float scaleFactor)
1641         {
1642             IntPtr image = Interop.WebView.GetScreenshot(SwigCPtr, Rectangle.getCPtr(viewArea), scaleFactor);
1643             ImageView imageView = new ImageView(image, true);
1644             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1645             return imageView;
1646         }
1647
1648         /// <summary>
1649         /// Get snapshot of the specified viewArea of page.
1650         /// <param name="viewArea">Host that required client authentication</param>
1651         /// <param name="scaleFactor">The file path stored certificate</param>
1652         /// <param name="callback">The callback for getting screen shot</param>
1653         /// </summary>
1654         [EditorBrowsable(EditorBrowsableState.Never)]
1655         public bool GetScreenshotAsynchronously(Rectangle viewArea, float scaleFactor, ScreenshotAcquiredCallback callback)
1656         {
1657             screenshotAcquiredCallback = callback;
1658             System.IntPtr ip = Marshal.GetFunctionPointerForDelegate(screenshotAcquiredProxyCallback);
1659             bool result = Interop.WebView.GetScreenshotAsynchronously(SwigCPtr, Rectangle.getCPtr(viewArea), scaleFactor, new HandleRef(this, ip));
1660             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1661             return result;
1662         }
1663
1664         /// <summary>
1665         /// Asynchronous requests to check if there is a video playing in the given view.
1666         /// <param name="callback">The callback called after checking if video is playing or not</param>
1667         /// </summary>
1668         [EditorBrowsable(EditorBrowsableState.Never)]
1669         public bool CheckVideoPlayingAsynchronously(VideoPlayingCallback callback)
1670         {
1671             System.IntPtr ip = Marshal.GetFunctionPointerForDelegate(callback);
1672             bool result = Interop.WebView.CheckVideoPlayingAsynchronously(SwigCPtr, new HandleRef(this, ip));
1673             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1674             return result;
1675         }
1676
1677         /// <summary>
1678         /// Registers callback which will be called upon geolocation permission request.
1679         /// <param name="callback">The callback for requesting geolocation permission</param>
1680         /// </summary>
1681         [EditorBrowsable(EditorBrowsableState.Never)]
1682         public void RegisterGeolocationPermissionCallback(GeolocationPermissionCallback callback)
1683         {
1684             System.IntPtr ip = Marshal.GetFunctionPointerForDelegate(callback);
1685             Interop.WebView.RegisterGeolocationPermissionCallback(SwigCPtr, new HandleRef(this, ip));
1686             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1687         }
1688
1689         /// <summary>
1690         /// Deprecated. Clears the cache of current WebView.
1691         /// </summary>
1692         [EditorBrowsable(EditorBrowsableState.Never)]
1693         public void ClearCache()
1694         {
1695             Context.ClearCache();
1696         }
1697
1698         /// <summary>
1699         /// Deprecated. Clears all the cookies of current WebView.
1700         /// </summary>
1701         [EditorBrowsable(EditorBrowsableState.Never)]
1702         public void ClearCookies()
1703         {
1704             CookieManager.ClearCookies();
1705         }
1706
1707         internal static WebView DownCast(BaseHandle handle)
1708         {
1709             WebView ret = new WebView(Interop.WebView.DownCast(BaseHandle.getCPtr(handle)), true);
1710             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1711             return ret;
1712         }
1713
1714         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebView obj)
1715         {
1716             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
1717         }
1718
1719         internal WebView Assign(WebView webView)
1720         {
1721             WebView ret = new WebView(Interop.WebView.Assign(SwigCPtr, WebView.getCPtr(webView)), false);
1722             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1723             return ret;
1724         }
1725
1726         /// This will not be public opened.
1727         /// <param name="swigCPtr"></param>
1728         [EditorBrowsable(EditorBrowsableState.Never)]
1729         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1730         {
1731             Interop.WebView.DeleteWebView(swigCPtr);
1732         }
1733
1734         private void OnPageLoadStarted(IntPtr data, string pageUrl)
1735         {
1736             WebViewPageLoadEventArgs e = new WebViewPageLoadEventArgs();
1737
1738             e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
1739             e.PageUrl = pageUrl;
1740
1741             pageLoadStartedEventHandler?.Invoke(this, e);
1742         }
1743
1744         private void OnPageLoading(IntPtr data, string pageUrl)
1745         {
1746             pageLoadingEventHandler?.Invoke(this, new WebViewPageLoadEventArgs());
1747         }
1748
1749         private void OnPageLoadFinished(IntPtr data, string pageUrl)
1750         {
1751             WebViewPageLoadEventArgs e = new WebViewPageLoadEventArgs();
1752
1753             e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
1754             e.PageUrl = pageUrl;
1755
1756             pageLoadFinishedEventHandler?.Invoke(this, e);
1757         }
1758
1759         private void OnPageLoadError(IntPtr data, string pageUrl, int errorCode)
1760         {
1761             WebViewPageLoadErrorEventArgs e = new WebViewPageLoadErrorEventArgs();
1762
1763             e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
1764             e.PageUrl = pageUrl;
1765             e.ErrorCode = (WebViewPageLoadErrorEventArgs.LoadErrorCode)errorCode;
1766
1767             pageLoadErrorEventHandler?.Invoke(this, e);
1768         }
1769
1770         private void OnScrollEdgeReached(IntPtr data, int edge)
1771         {
1772             WebViewScrollEdgeReachedEventArgs arg = new WebViewScrollEdgeReachedEventArgs((WebViewScrollEdgeReachedEventArgs.Edge)edge);
1773             scrollEdgeReachedEventHandler?.Invoke(this, arg);
1774         }
1775
1776         private void OnUrlChanged(IntPtr data, string pageUrl)
1777         {
1778             urlChangedEventHandler?.Invoke(this, new WebViewUrlChangedEventArgs(pageUrl));
1779         }
1780
1781         private void OnFormRepostPolicyDecided(IntPtr data, IntPtr decision)
1782         {
1783             WebFormRepostPolicyDecisionMaker repostDecision = new WebFormRepostPolicyDecisionMaker(decision, false);
1784             formRepostPolicyDecidedEventHandler?.Invoke(this, new WebViewFormRepostPolicyDecidedEventArgs(repostDecision));
1785             repostDecision.Dispose();
1786         }
1787
1788         private void OnFrameRendered(IntPtr data)
1789         {
1790             frameRenderedEventHandler?.Invoke(this, new EventArgs());
1791         }
1792
1793         private void OnScreenshotAcquired(IntPtr data)
1794         {
1795             ImageView image = new ImageView(data, true);
1796             screenshotAcquiredCallback?.Invoke(image);
1797             image.Dispose();
1798         }
1799
1800         private void OnNewWindowPolicyDecided(IntPtr data, IntPtr maker)
1801         {
1802             newWindowPolicyDecidedEventHandler?.Invoke(this, new WebViewNewWindowPolicyDecidedEventArgs(new WebNewWindowPolicyDecisionMaker(maker, false)));
1803         }
1804     }
1805 }