1 // Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CEF_LIBCEF_COMMON_MAIN_RUNNER_DELEGATE_H_ 6 #define CEF_LIBCEF_COMMON_MAIN_RUNNER_DELEGATE_H_ 7 #pragma once 8 9 #include "include/cef_app.h" 10 11 namespace base { 12 class RunLoop; 13 } 14 15 namespace content { 16 class ContentMainDelegate; 17 } 18 19 class CefMainRunnerDelegate { 20 public: 21 virtual content::ContentMainDelegate* GetContentMainDelegate() = 0; 22 BeforeMainThreadInitialize(const CefMainArgs & args)23 virtual void BeforeMainThreadInitialize(const CefMainArgs& args) {} BeforeMainThreadRun()24 virtual void BeforeMainThreadRun() {} BeforeMainMessageLoopRun(base::RunLoop * run_loop)25 virtual void BeforeMainMessageLoopRun(base::RunLoop* run_loop) {} HandleMainMessageLoopQuit()26 virtual bool HandleMainMessageLoopQuit() { return false; } AfterUIThreadInitialize()27 virtual void AfterUIThreadInitialize() {} AfterUIThreadShutdown()28 virtual void AfterUIThreadShutdown() {} BeforeMainThreadShutdown()29 virtual void BeforeMainThreadShutdown() {} AfterMainThreadShutdown()30 virtual void AfterMainThreadShutdown() {} BeforeExecuteProcess(const CefMainArgs & args)31 virtual void BeforeExecuteProcess(const CefMainArgs& args) {} AfterExecuteProcess()32 virtual void AfterExecuteProcess() {} 33 ~CefMainRunnerDelegate()34 virtual ~CefMainRunnerDelegate() {} 35 }; 36 37 #endif // CEF_LIBCEF_COMMON_MAIN_RUNNER_DELEGATE_H_ 38