Beispiel #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);
        }
    }
Beispiel #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);
        }
    }
Beispiel #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);
        }
    }
Beispiel #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);
        }
    }
Beispiel #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);
        }
    }
Beispiel #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);
    }
Beispiel #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!");
        }
    }