Files
UnrealEngineUWP/Engine/Source/Programs/EpicWebHelper/Private/EpicWebHelperApp.h
josh adams 325c2bc02f - Updating CEF to v90 (in prep for getting M1 version checked in)
#rb alfred.reynolds
#preflight skip (too big for horde)

[CL 20435886 by josh adams in ue5-main branch]
2022-05-31 08:44:08 -04:00

56 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#if WITH_CEF3
#include "EpicWebHelperLibCEFIncludes.h"
#include "EpicWebHelperRemoteScripting.h"
/**
* Implements CEF App and other Process level interfaces
*/
class FEpicWebHelperApp
: public CefApp
, public CefRenderProcessHandler
{
public:
/**
* Default Constructor
*/
FEpicWebHelperApp();
private:
// CefApp methods:
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() override { return this; }
// CefRenderProcessHandler methods:
virtual void OnContextCreated( CefRefPtr<CefBrowser> Browser, CefRefPtr<CefFrame> Frame, CefRefPtr<CefV8Context> Context ) override;
virtual void OnContextReleased( CefRefPtr<CefBrowser> Browser, CefRefPtr<CefFrame> Frame, CefRefPtr<CefV8Context> Context ) override;
virtual bool OnProcessMessageReceived( CefRefPtr<CefBrowser> Browser, CefRefPtr<CefFrame> Frame, CefProcessId SourceProcess, CefRefPtr<CefProcessMessage> Message ) override;
virtual void OnBrowserCreated(CefRefPtr<CefBrowser> Browser, CefRefPtr<CefDictionaryValue> ExtraInfo) override;
#if !PLATFORM_LINUX
virtual void OnFocusedNodeChanged(CefRefPtr<CefBrowser> Browser, CefRefPtr<CefFrame> Frame, CefRefPtr<CefDOMNode> Node) override;
#endif
// Handles remote scripting messages from the frontend process
FEpicWebHelperRemoteScripting RemoteScripting;
// Stores the browser ID and flag for any browser so we can track if we have told the main process about it
TMap<int32, bool> PendingBrowserCreated;
// Include the default reference counting implementation.
IMPLEMENT_REFCOUNTING(FEpicWebHelperApp);
};
#endif // WITH_CEF3