Logo ROOT  
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.
32class MyRendererProcessApp : public CefApp /*, public CefRenderProcessHandler */ {
33
34public:
35 MyRendererProcessApp() : CefApp() /*, CefRenderProcessHandler() */ {}
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
46private:
47 // Include the default reference counting implementation.
50};
51
52// Entry point function for all processes.
53int main(int argc, char *argv[])
54{
55
56#if defined(OS_WIN)
58#else
59 // Provide CEF with command-line arguments.
61#endif
62
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.
69 if (exit_code >= 0) {
70 // The sub-process has completed so return here.
71 return exit_code;
72 }
73
74 return 0;
75}
int main()
Definition Prototype.cxx:12
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
~MyRendererProcessApp() override
Definition cef_main.cxx:36
IMPLEMENT_REFCOUNTING(MyRendererProcessApp)
DISALLOW_COPY_AND_ASSIGN(MyRendererProcessApp)