#ifndef _BROWSER_CLIENT_APP_BROWSER_H_ #define _BROWSER_CLIENT_APP_BROWSER_H_ #include #include "Cef3ClientApp.h" namespace browser { // Client app implementation for the browser process. class CCef3ClientAppBrowser : public CCef3ClientApp, public CefBrowserProcessHandler,CefRenderProcessHandler { public: // Interface for browser delegates. All Delegates must be returned via // CreateDelegates. Do not perform work in the Delegate // constructor. See CefBrowserProcessHandler for documentation. class Delegate : public virtual CefBaseRefCounted { public: virtual void OnBeforeCommandLineProcessing( CefRefPtr app, CefRefPtr command_line) {} virtual void OnContextInitialized(CefRefPtr app) {} virtual void OnBeforeChildProcessLaunch( CefRefPtr app, CefRefPtr command_line) {} virtual void OnRenderProcessThreadCreated( CefRefPtr app, CefRefPtr extra_info) {} }; typedef std::set > DelegateSet; CCef3ClientAppBrowser(); private: // Creates all of the Delegate objects. Implemented by cefclient in // client_app_delegates_browser.cc static void CreateDelegates(DelegateSet& delegates); // Create the Linux print handler. Implemented by cefclient in // client_app_delegates_browser.cc static CefRefPtr CreatePrintHandler(); // CefApp methods. void OnBeforeCommandLineProcessing( const CefString& process_type, CefRefPtr command_line) OVERRIDE; CefRefPtr GetBrowserProcessHandler() OVERRIDE { return this; } // CefBrowserProcessHandler methods. void OnContextInitialized() OVERRIDE; void OnBeforeChildProcessLaunch( CefRefPtr command_line) OVERRIDE; void OnRenderProcessThreadCreated( CefRefPtr extra_info) OVERRIDE; CefRefPtr GetPrintHandler() OVERRIDE { return print_handler_; } // Set of supported Delegates. DelegateSet delegates_; CefRefPtr print_handler_; IMPLEMENT_REFCOUNTING(CCef3ClientAppBrowser); DISALLOW_COPY_AND_ASSIGN(CCef3ClientAppBrowser); }; } // namespace browser #endif // _BROWSER_CLIENT_APP_BROWSER_H_