You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
UE-59488 FWebBrowserWindow::UnbindUObject of IOSPlatformWebBrowser.cpp is not implemented yet #jira UEMOB-185 #jira UE-59488 #4.21 #iOS #rb Jack.Porter New methods (using WebKit, matching the Android implementation): - Go back/forward - HandlePageLoading (loading/didCommitNavigation, loaded/didFinishNavigation) - HandleReceivedError (didFailNavigation) - execute JS code - controlling the client using JS commands (WKWebViewConfiguration & WKUserContentController): - in Android we using shouldInterceptRequest to intercept a custom resource URL (JS: XMLHttpRequest.send, document.location) - iOS will register handlers (JS: window.webkit.messageHandlers.<FMobileJSScripting::JSMessageHandler>.postMessage) [CL 4343824 by Sorin Gradinaru in Dev-Mobile branch]
67 lines
1.5 KiB
C++
67 lines
1.5 KiB
C++
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#if USE_ANDROID_JNI
|
|
|
|
#include "IWebBrowserDialog.h"
|
|
|
|
#include <jni.h>
|
|
|
|
class SAndroidWebBrowserWidget;
|
|
|
|
class FAndroidWebBrowserDialog
|
|
: public IWebBrowserDialog
|
|
{
|
|
public:
|
|
virtual ~FAndroidWebBrowserDialog()
|
|
{}
|
|
|
|
// IWebBrowserDialog interface:
|
|
|
|
virtual EWebBrowserDialogType GetType() override
|
|
{
|
|
return Type;
|
|
}
|
|
|
|
virtual const FText& GetMessageText() override
|
|
{
|
|
return MessageText;
|
|
}
|
|
|
|
virtual const FText& GetDefaultPrompt() override
|
|
{
|
|
return DefaultPrompt;
|
|
}
|
|
|
|
virtual bool IsReload() override
|
|
{
|
|
check(Type == EWebBrowserDialogType::Unload);
|
|
return false; // The android webkit browser does not provide this infomation
|
|
}
|
|
|
|
virtual void Continue(bool Success = true, const FText& UserResponse = FText::GetEmpty()) override;
|
|
|
|
private:
|
|
|
|
EWebBrowserDialogType Type;
|
|
FText MessageText;
|
|
FText DefaultPrompt;
|
|
|
|
jobject Callback; // Either a reference to a JsResult or a JsPromptResult object depending on Type
|
|
|
|
// Create a dialog from OnJSPrompt arguments
|
|
FAndroidWebBrowserDialog(jstring InMessageText, jstring InDefaultPrompt, jobject InCallback);
|
|
|
|
// Create a dialog from OnJSAlert|Confirm|BeforeUnload arguments
|
|
FAndroidWebBrowserDialog(EWebBrowserDialogType InDialogType, jstring InMessageText, jobject InCallback);
|
|
|
|
friend class FAndroidWebBrowserWindow;
|
|
friend class SAndroidWebBrowserWidget;
|
|
};
|
|
|
|
typedef FAndroidWebBrowserDialog FWebBrowserDialog;
|
|
|
|
#endif // USE_ANDROID_JNI
|