// Copyright © 2013 The CefSharp Project. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #pragma once #include "Common.h" #include "include/cef_app.h" private class SubprocessCefApp : public CefApp, public CefRenderProcessHandler { static SubprocessCefApp* _instance; static CefRefPtr _browser; public: static SubprocessCefApp* GetInstance(); static CefRefPtr GetCefBrowser(); virtual DECL CefRefPtr GetRenderProcessHandler() OVERRIDE { return this; } virtual DECL void OnBrowserCreated(CefRefPtr browser) OVERRIDE; virtual DECL void OnBrowserDestroyed(CefRefPtr browser) OVERRIDE { // FIXME: Why do we never get called? OutputDebugString(L"OnBrowserDestroyed called"); } IMPLEMENT_REFCOUNTING(SubprocessCefApp); };