-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathuCefAppInit_TEMPLATE.pas
71 lines (56 loc) · 2.26 KB
/
uCefAppInit_TEMPLATE.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
unit uCefAppInit;
interface
procedure AppCefInit;
implementation
uses
SysUtils, Classes, Winapi.Windows,
//
uStringUtils, uGlobalFileIoFunc, uGlobalVars,
//
uCEFApplication, uCefTypes, uCEFConstants,
//
uCefRenderProcessMessageReceiver, uCefRenderProcessMessageReceiverCommon,
//
uAppCefRenderMessage;
procedure AppCefInit;
begin
SetErrorMode(1 or 2);
TThread.NameThreadForDebugging('VclMainThread');
GlobalCEFApp := TCefApplication.Create;
//GlobalCEFApp.SingleProcess := True;
GlobalCEFApp.WindowlessRenderingEnabled := True;
GlobalCEFApp.ReRaiseExceptions := True;
GlobalCEFApp.RenderProcessHandler := uAppCefRenderMessage.AppCefRenderMessageInit();
GlobalCEFApp.FlashEnabled := False;
GlobalCEFApp.EnableSpellingService := False;
GlobalCEFApp.EnableMediaStream := False;
GlobalCEFApp.EnableSpeechInput := False;
GlobalCEFApp.SmoothScrolling := False;
GlobalCEFApp.FastUnload := True;
GlobalCEFApp.NoSandbox := True;
GlobalCEFApp.DisableSafeBrowsing := True;
GlobalCEFApp.EnableHighDPISupport := False;
GlobalCEFApp.MuteAudio := False;
GlobalCEFApp.UserAgent := Trim(string(StringLoadFromFile(gDirApp + 'UserAgent.txt', True, False)));
// GlobalCEFApp.SingleProcess := True;
GlobalCEFApp.LogFile := gDirLog + 'cef.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
// GlobalCEFApp.PackLoadingDisabled := False;
GlobalCEFApp.FrameworkDirPath := gDirApp + 'cef\';
GlobalCEFApp.ResourcesDirPath := gDirApp + 'cef\';
GlobalCEFApp.LocalesDirPath := gDirApp + 'cef\locales\';
GlobalCEFApp.Cache := '';
GlobalCEFApp.Cookies := '';
GlobalCEFApp.UserDataPath := '';
GlobalCEFApp.Locale := 'en';
//GlobalCEFApp.AddCustomCommandLine('force-device-scale-factor', '1');
//GlobalCEFApp.AddCustomCommandLine('disable-gpu-compositing');
//GlobalCEFApp.AddCustomCommandLine('disable-accelerated-compositing');
// GlobalCEFApp.AddCustomCommandLine('disable-gpu');
// GlobalCEFApp.AddCustomCommandLine('disable-webgl');
// Forces the use of software GL instead of hardware gpu.
//const char kOverrideUseSoftwareGLForTests[] =
// "override-use-software-gl-for-tests";
InitCefAppRenderProcessMessage();
end;
end.