Files
UnrealEngineUWP/Engine/Source/Runtime/WebBrowser/Public/IWebBrowserSchemeHandler.h

103 lines
3.8 KiB
C
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
Copying //UE4/Portal-Staging to //UE4/Dev-Main (Source: //UE4/Portal-Staging @ 3592606) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 3520569 by Leigh.Swift Adding chunkdb support to BPS installer as a chunk source for installations. Chunk db filenames are provided on the installer configuration struct, and will be used to load chunks needed for the installation. Chunk db source shares a chunk store with the cloud source. Adding message pump implementation for installer which can be used to surface events or messages to handlers added to the installer. Currently just takes chunk source events for losing access to the chunkdb files. Adding concept of new runtime requirements and callback for unavailable chunks to chunk source base API. Chained chunk source cascades broadcasted unavailable chunks down to other sources as new requirements. #jira OPP-7191: Add chunkdb source support to BPS Adding support for passing chunkdb files to created installers. Storing chunkdb filenames used for installation in pending manifest so they can be re-used when resuming. Exposing chunkdb source events to UI as warning triangle. #jira OPP-7191: Add chunkdb source support to BPS Change 3508964 by Wes.Fudala CL# 3431076 - Upgrade Win32, Win64, and Mac to latest CEF branch 3071. Adds browser support for foreign language character input via IME. #jira OPP-4400 Non-Roman characters from an IME cannot be typed into CEF based views Change 3506884 by Leigh.Swift #jira OPP-6981: Make sign-in screen a web page WebBrowser: Adding support to WebBrowser module for implementing custom protocol/scheme handlers. Currently works for CEF integration only. WebBrowser: Adding support to override the user-agent version string when initialising the web browser module. PortalBuild: Additionally shipping the contents of /Portal/Content/Web with full launchers. Portal: Adding web content for sign in, background, and web test pages. Portal: Added a high version number setup for WebBrowser when running debug so that latest code always gets latest websites. Portal: Removing old slate sign in screens, and associated code. Portal: Adding bIsThirdParty bool to some AccountService functions to allow to handle not yet having information about account types returned from the backend to deside if an account can be used with a password sign in. Portal: Removing unnecessary use of email in the AccountService::AutoSignIn API. Portal: Replacing old logging in overlay with a 'ShowLongProcessOverlay' API for systems that still use that (e.g. vault cach location select, waiting room). Portal: UI: Adding a null state to sign in router so resources can be cleaned up. Portal: UI: Adding web states for all screens on sign in router. Portal: DebugTools: Adding a web developer section, with a refresh all browsers button to help with web iteration. Portal: DebugTools: Fixing all test JS to use lowercased api calls. Portal: Implementing new client:// scheme handler for WebBrowser which local pages will use. Portal: RememberMe: Exposing additional user info, LastName and whether the account can auth with a password. Portal: Temporary dynamic background image implementation and javascript bridge. Portal: Sign in screen is now driven by a web page, and javascript API. Portal: UIRouter: Improved handling of redirects and tracking of state changes via redirects. Change 3471216 by Leigh.Swift Extending BPT VerifyChunks mode to check manifests are loadable and do not reference broken data, and also to output bad files to a text file passed in on commandline. Change 3469441 by Richard.Fawcett Add support for disc icon to packaging game ISO #jira OPP-7311: Implement icon file for disc Change 3468243 by Wes.Fudala Adds support for branding windows installers. #jira OPP-7190: Create game bootstrap msi (Windows) Change 3456485 by Richard.Fawcett Create new C# wrapper around BuildPatchTool to call the (as yet unimplemented) PackageChunks mode. Implement new tool mode in PortalPublishingTool which takes game name and build version, finds manifest files, and executes BuildPatchTool for each platform, with the option to restrict to a single platform via the commandline. Build script changes to allow the Package Chunks job to be called from Electric Commander. This includes refactoring the setup of PortalPublishingTool to a new node which the package chunks job, and the existing build diff job depend on. #jira OPP-7193: Create 'package chunks' job Change 3446665 by Jacob.Hedges CL# 3430618 - Added App Installation, Engine Installation, and Plugin Installation test suites. Create Social gadget for interacting with the social panel. Added Portal Automation Helper that exposes the UIRouter, and changed existing tests and Screens to utilize URI navigation. Added various metadata tags. #jira OPP-7155 #jira QAENG-1075 #jira QAENG-1076 #jira QAENG-1079 #jira QAENG-1080 Change 3420598 by Richard.Fawcett Use Prerequisite Ids to track which prerequisistes have been installed on a user's system. #jira OPP-6007: Upgrade prereq installer so that it checks versions instead of file hashes - Part 1 Change 3410773 by Richard.Fawcett Implement project-specific retention periods for automated cleanup routines. Additional changes: * Remove VerifyManifestFilenames as it makes no sense for manifest filenames to have to conform to a specific pattern now that we have randomized manifest filenames. * Add support for detecting build versions from Win32 manifest files by tweaking regex. * DeleteUnreferencedManifestsFromCDN: Avoid parsing version strings when we're not in SimulateCDN mode as we're only interested in the result if we're filtering "old" manifests by CL (i.e. simulating) rather than having the date of real files from the folder. * Add -SkipProd flag to periodic rocket cleanup to enable us to run operations that only touch gamedev. This aids debugging as prod environment is firewalled from developer workstations. Change 3377027 by Leigh.Swift #jira OPP-6911: Launcher.Install.Stats Changes Adding specific process timers for each stage that we want to time, replacing any individual logic. Verifier no longer needs to provide the TimeSpentPaused output, since it is now given knowledge of pause state via external dependancy, it doesn't need to be responsible for providing the pause timer. Rearranging Launcher.Build.Stats analytics events according to new spec and desires. Also cleaning up some GLog->UE_LOG. Change 3374573 by Jacob.Hedges Copying //Tasks/Portal/Dev-UIAutomation to Dev-Main (//Portal/Dev-Main) Added new functional testsuite for the launcher, including metadata tags for relevant elements Added new functionality to ID and Path searches for the automation driver to start the search from a specified element Changed selective download components to utilize SCheckBox instead of SButton #jira OPP-6973 [CL 3592632 by Antony Carter in Main branch]
2017-08-17 06:28:58 -04:00
#pragma once
#include "CoreMinimal.h"
/**
* This is the interface that needs to be implemented to handle a request made via a custom scheme.
* It will be created by implementing an IWebBrowserSchemeHandlerFactory, given to the web browser singleton.
*/
class WEBBROWSER_API IWebBrowserSchemeHandler
{
public:
/**
* An interface for setting response headers emulating a http implementation.
*/
class IHeaders
{
public:
/**
* Sets the mime type for the response.
* @param MimeType The Mime Type.
*/
virtual void SetMimeType(const TCHAR* MimeType) = 0;
/**
* Sets the status code for the response.
* @param StatusCode The status code.
*/
virtual void SetStatusCode(int32 StatusCode) = 0;
/**
* Sets the content length for the response.
* @param ContentLength The size of the response content in bytes.
*/
virtual void SetContentLength(int32 ContentLength) = 0;
/**
* Sets a redirect url for the response. Other calls will be ignored if this is used.
* @param Url The url to redirect to.
*/
virtual void SetRedirect(const TCHAR* Url) = 0;
/**
* Sets a header for the response.
* @param Key The header key.
* @param Value The header value.
*/
virtual void SetHeader(const TCHAR* Key, const TCHAR* Value) = 0;
};
public:
virtual ~IWebBrowserSchemeHandler() {}
/**
* Process an incoming request.
* @param Verb This is the verb used for the request (GET, PUT, POST, etc).
* @param Url This is the full url for the request being made.
* @param OnHeadersReady You must execute this delegate once the response headers are ready to be retrieved with GetResponseHeaders.
* You may execute it during this call to state headers are available now.
* @return You should return true if the request has been accepted and will be processed, otherwise false to cancel this request.
*/
virtual bool ProcessRequest(const FString& Verb, const FString& Url, const FSimpleDelegate& OnHeadersReady) = 0;
/**
* Retrieves the headers for this request.
* @param OutHeaders The interface to use to set headers.
*/
virtual void GetResponseHeaders(IHeaders& OutHeaders) = 0;
/**
* Retrieves the headers for this request.
* @param OutBytes You should copy up to BytesToRead of data to this ptr.
* @param BytesToRead The maximum number of bytes that can be copied to OutBytes.
* @param BytesRead You should set this to the number of bytes that were copied.
* This can be set to zero, to indicate more data is not ready yet, and OnMoreDataReady must then be
* executed when there is.
* @param OnMoreDataReady You should execute this delegate when more data is available to read.
* @return You should return true if more data needs to be read, otherwise false if this is the end of the response data.
*/
virtual bool ReadResponse(uint8* OutBytes, int32 BytesToRead, int32& BytesRead, const FSimpleDelegate& OnMoreDataReady) = 0;
/**
* Called if the request should be canceled.
*/
virtual void Cancel() = 0;
};
/**
* This is the interface that needs to be implemented to instantiate a scheme request handler.
*/
class WEBBROWSER_API IWebBrowserSchemeHandlerFactory
{
public:
virtual ~IWebBrowserSchemeHandlerFactory() {}
/**
* Instantiates an appropriate handler for the given request details.
* @param Verb This is the verb used for the request (GET, PUT, POST, etc).
* @param Url This is the full url for the request being made.
*/
virtual TUniquePtr<IWebBrowserSchemeHandler> Create(FString Verb, FString Url) = 0;
};