ROOT
master
Reference Guide
Loading...
Searching...
No Matches
cef_main.cxx
Go to the documentation of this file.
1
// Author: Sergey Linev <S.Linev@gsi.de>
2
// Date: 2017-06-29
3
4
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
5
// reserved. Use of this source code is governed by a BSD-style license that
6
// can be found in the LICENSE file.
7
8
/*************************************************************************
9
* Copyright (C) 1995-2023, Rene Brun and Fons Rademakers. *
10
* All rights reserved. *
11
* *
12
* For the licensing terms see $ROOTSYS/LICENSE. *
13
* For the list of contributors see $ROOTSYS/README/CREDITS. *
14
*************************************************************************/
15
16
#if !defined(_MSC_VER)
17
#pragma GCC diagnostic ignored "-Wunused-parameter"
18
#pragma GCC diagnostic ignored "-Wshadow"
19
#endif
20
21
#include "include/base/cef_build.h"
22
#include "include/cef_app.h"
23
24
#if !defined(OS_WIN)
25
#include <unistd.h>
26
#endif
27
28
// #include "include/cef_render_process_handler.h"
29
#include "include/base/cef_logging.h"
30
31
// Implement application-level callbacks for the browser process.
32
class
MyRendererProcessApp
:
public
CefApp
/*, public CefRenderProcessHandler */
{
33
34
public
:
35
MyRendererProcessApp
() :
CefApp
()
/*, CefRenderProcessHandler() */
{}
36
~MyRendererProcessApp
()
override
{}
37
38
// CefRefPtr< CefRenderProcessHandler > GetRenderProcessHandler() override { return this; }
39
40
// void OnRegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar) override
41
// {
42
// // registrar->AddCustomScheme("rootscheme", true, true, true, true, true, true);
43
// }
44
45
46
private
:
47
// Include the default reference counting implementation.
48
IMPLEMENT_REFCOUNTING
(
MyRendererProcessApp
);
49
DISALLOW_COPY_AND_ASSIGN
(
MyRendererProcessApp
);
50
};
51
52
// Entry point function for all processes.
53
int
main
(
int
argc
,
char
*
argv
[])
54
{
55
56
#if defined(OS_WIN)
57
CefMainArgs
main_args
(
::GetModuleHandle
(
NULL
));
58
#else
59
// Provide CEF with command-line arguments.
60
CefMainArgs
main_args
(
argc
,
argv
);
61
#endif
62
63
CefRefPtr<CefApp>
app
=
new
MyRendererProcessApp
();
64
65
// CEF applications have multiple sub-processes (render, plugin, GPU, etc)
66
// that share the same executable. This function checks the command-line and,
67
// if this is a sub-process, executes the appropriate logic.
68
int
exit_code
=
CefExecuteProcess
(
main_args
,
app
,
NULL
);
69
if
(
exit_code
>= 0) {
70
// The sub-process has completed so return here.
71
return
exit_code
;
72
}
73
74
return
0;
75
}
main
int main()
Definition
Prototype.cxx:12
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:359
CefApp
MyRendererProcessApp
Definition
cef_main.cxx:32
MyRendererProcessApp::~MyRendererProcessApp
~MyRendererProcessApp() override
Definition
cef_main.cxx:36
MyRendererProcessApp::IMPLEMENT_REFCOUNTING
IMPLEMENT_REFCOUNTING(MyRendererProcessApp)
MyRendererProcessApp::MyRendererProcessApp
MyRendererProcessApp()
Definition
cef_main.cxx:35
MyRendererProcessApp::DISALLOW_COPY_AND_ASSIGN
DISALLOW_COPY_AND_ASSIGN(MyRendererProcessApp)
ROOT::Detail::TRangeCast
Definition
TCollection.h:312
gui
cefdisplay
src
cef_main.cxx
ROOTmaster - Reference Guide Generated on Mon Jul 6 2026 16:05:09 (GVA Time) using Doxygen 1.10.0