UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CEFWebBrowserDialog.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8
9#if WITH_CEF3
10
11#include "HAL/PlatformAtomics.h"
12
13#if PLATFORM_WINDOWS
16#endif
17#pragma push_macro("OVERRIDE")
18# undef OVERRIDE // cef headers provide their own OVERRIDE macro
19#if PLATFORM_APPLE
21#endif
22# include "include/cef_jsdialog_handler.h"
23#if PLATFORM_APPLE
25#endif
26#pragma pop_macro("OVERRIDE")
27#if PLATFORM_WINDOWS
30#endif
31
32#include "IWebBrowserDialog.h"
33
35 : public IWebBrowserDialog
36{
37public:
38 virtual ~FCEFWebBrowserDialog()
39 {}
40
41 // IWebBrowserDialog interface:
42
43 virtual EWebBrowserDialogType GetType() override
44 {
45 return Type;
46 }
47
48 virtual const FText& GetMessageText() override
49 {
50 return MessageText;
51 }
52
53 virtual const FText& GetDefaultPrompt() override
54 {
55 return DefaultPrompt;
56 }
57
58 virtual bool IsReload() override
59 {
61 return bIsReload;
62 }
63
64 virtual void Continue(bool Success = true, const FText& UserResponse = FText::GetEmpty()) override
65 {
67 Callback->Continue(Success, TCHAR_TO_WCHAR(*UserResponse.ToString()));
68 }
69
70private:
71
72
74 FText MessageText;
76 bool bIsReload;
77
79
80 // Create a dialog from OnJSDialog arguments
86 , Callback(InCallback)
87 {}
88
89 // Create a dialog from OnBeforeUnloadDialog arguments
93 , DefaultPrompt(FText::GetEmpty())
95 , Callback(InCallback)
96 {};
97
98 friend class FCEFWebBrowserWindow;
99};
100
102
103#endif
#define check(expr)
Definition AssertionMacros.h:314
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
EWebBrowserDialogType
Definition IWebBrowserDialog.h:12
#define WCHAR_TO_TCHAR(str)
Definition StringConv.h:1093
#define TCHAR_TO_WCHAR(str)
Definition StringConv.h:1092
Definition Text.h:385
static CORE_API const FText & GetEmpty()
Definition Text.cpp:252
Definition IWebBrowserDialog.h:42
virtual EWebBrowserDialogType GetType()=0
virtual bool IsReload()=0
virtual const FText & GetMessageText()=0
virtual const FText & GetDefaultPrompt()=0
EBuildConfiguration FromString(const FString &Configuration)
Definition GenericPlatformMisc.cpp:330
Type
Definition PawnAction_Move.h:11
@ false
Definition radaudio_common.h:23