Пример #1
0
    public static void TriggerAddConsoleMessage(System.IntPtr _WebViewInstance, string _Message, int _LineNumber, string _Source)
    {
        AwesomiumUnityWebView view = AwesomiumUnityWebCore.FindWebViewByNativePtr(_WebViewInstance);

        if (view != null && view.AddConsoleMessage != null)
        {
            view.AddConsoleMessage(view, _Message, _LineNumber, _Source);
        }
    }
Пример #2
0
    public static void TriggerChangeAddressBar(System.IntPtr _WebViewInstance, string _URL)
    {
        AwesomiumUnityWebView view = AwesomiumUnityWebCore.FindWebViewByNativePtr(_WebViewInstance);

        if (view != null && view.ChangeAddressBar != null)
        {
            view.ChangeAddressBar(view, _URL);
        }
    }
Пример #3
0
    public static void TriggerDocumentReady(System.IntPtr _WebViewInstance, string _URL)
    {
        AwesomiumUnityWebView view = AwesomiumUnityWebCore.FindWebViewByNativePtr(_WebViewInstance);

        if (view != null && view.DocumentReady != null)
        {
            view.DocumentReady(view, _URL);
        }
    }
Пример #4
0
    public static void TriggerFinishLoadingFrame(System.IntPtr _WebViewInstance, System.Int64 _FrameID, bool _IsMainFrame, string _URL)
    {
        AwesomiumUnityWebView view = AwesomiumUnityWebCore.FindWebViewByNativePtr(_WebViewInstance);

        if (view != null && view.FinishLoadingFrame != null)
        {
            view.FinishLoadingFrame(view, _URL, _FrameID, _IsMainFrame);
        }
    }
Пример #5
0
    public static void TriggerShowCreatedWebView(System.IntPtr _WebViewInstance, System.IntPtr _NewInstance, string _OpenerURL, string _TargetURL, bool _IsPopUp)
    {
        AwesomiumUnityWebView view = AwesomiumUnityWebCore.FindWebViewByNativePtr(_WebViewInstance);

        if (view != null && view.ShowCreatedWebView != null)
        {
            AwesomiumUnityWebView new_view = AwesomiumUnityWebCore.RegisterExistingWebView(_NewInstance);
            view.ShowCreatedWebView(view, new_view, _OpenerURL, _TargetURL, _IsPopUp);
        }
    }
Пример #6
0
    private static JavaScriptExecutionCallbacks FindJavaScriptCallbacksForExecutionID(System.IntPtr _WebViewInstance, int _ExecutionID, out AwesomiumUnityWebView _Caller)
    {
        _Caller = AwesomiumUnityWebCore.FindWebViewByNativePtr(_WebViewInstance);
        JavaScriptExecutionCallbacks callbacks = null;

        if (_Caller != null)
        {
            _Caller.m_JavaScriptCallbacks.TryGetValue(_ExecutionID, out callbacks);
        }

        return(callbacks);
    }
Пример #7
0
    public static void TriggerJavaScriptMethodCall(System.IntPtr _WebViewInstance, string _MethodName)
    {
        AwesomiumUnityWebView view = AwesomiumUnityWebCore.FindWebViewByNativePtr(_WebViewInstance);

        if (view != null)
        {
            view.CallBoundJavaScriptCallback(_MethodName);
        }
        else
        {
            Debug.LogWarning("TriggerJavaScriptMethodCall: Could not find a matching AwesomiumUnityWebView even though there should exist one!");
        }
    }