Ejemplo n.º 1
0
        internal WebView( IntPtr webview )
        {
            findRequestRandomizer = new Random();

            this.Instance = webview;

            beginNavigationCallback = internalBeginNavigationCallback;
            awe_webview_set_callback_begin_navigation( webview, beginNavigationCallback );

            beginLoadingCallback = internalBeginLoadingCallback;
            awe_webview_set_callback_begin_loading( webview, beginLoadingCallback );

            finishLoadingCallback = internalFinishLoadingCallback;
            awe_webview_set_callback_finish_loading( webview, finishLoadingCallback );

            jsCallback = internalJsCallback;
            awe_webview_set_callback_js_callback( webview, jsCallback );

            receiveTitleCallback = internalReceiveTitleCallback;
            awe_webview_set_callback_receive_title( webview, receiveTitleCallback );

            changeTooltipCallback = internalChangeTooltipCallback;
            awe_webview_set_callback_change_tooltip( webview, changeTooltipCallback );

            changeCursorCallback = internalChangeCursorCallback;
            awe_webview_set_callback_change_cursor( webview, changeCursorCallback );

            changeKeyboardFocusCallback = internalChangeKeyboardFocusCallback;
            awe_webview_set_callback_change_keyboard_focus( webview, changeKeyboardFocusCallback );

            changeTargetURLCallback = internalChangeTargetURLCallback;
            awe_webview_set_callback_change_target_url( webview, changeTargetURLCallback );

            openExternalLinkCallback = internalOpenExternalLinkCallback;
            awe_webview_set_callback_open_external_link( webview, openExternalLinkCallback );

            requestDownloadCallback = internalRequestDownloadCallback;
            awe_webview_set_callback_request_download( webview, requestDownloadCallback );

            webviewCrashedCallback = internalWebviewCrashedCallback;
            awe_webview_set_callback_web_view_crashed( webview, webviewCrashedCallback );

            pluginCrashedCallback = internalPluginCrashedCallback;
            awe_webview_set_callback_plugin_crashed( webview, pluginCrashedCallback );

            requestMoveCallback = internalRequestMoveCallback;
            awe_webview_set_callback_request_move( webview, requestMoveCallback );

            getPageContentsCallback = internalGetPageContentsCallback;
            awe_webview_set_callback_get_page_contents( webview, getPageContentsCallback );

            domReadyCallback = internalDomReadyCallback;
            awe_webview_set_callback_dom_ready( webview, domReadyCallback );

            requestFileChooserCallback = internalRequestFileChooser;
            awe_webview_set_callback_request_file_chooser( webview, requestFileChooserCallback );

            getScrollDataCallback = internalGetScrollData;
            awe_webview_set_callback_get_scroll_data( webview, getScrollDataCallback );

            jsConsoleMessageCallback = internalJSConsoleMessage;
            awe_webview_set_callback_js_console_message( webview, jsConsoleMessageCallback );

            getFindResultsCallback = internalGetFindResults;
            awe_webview_set_callback_get_find_results( webview, getFindResultsCallback );

            updateIMECallback = internalUpdateIME;
            awe_webview_set_callback_update_ime( webview, updateIMECallback );

            resourceRequestCallback = internalResourceRequestCallback;
            awe_webview_set_callback_resource_request( webview, resourceRequestCallback );

            resourceResponseCallback = internalResourceResponseCallback;
            awe_webview_set_callback_resource_response( webview, resourceResponseCallback );

            jsObjectCallbackMap = new Dictionary<string, JSCallback>();
            this.JSCallbackCalled += handleJSCallback;

            selectionHelper = new SelectionHelper( this, OnWebSelectionChanged );
            selectionHelper.RegisterSelectionHelper();

            RaisePropertyChanged( "IsEnabled" );
        }