Skip to content
Snippets Groups Projects
fchost_app.h 1.14 KiB
Newer Older
  • Learn to ignore specific revisions
  • svornost's avatar
    svornost committed
    // Copyright (c) 2013 The Chromium Embedded Framework Authors. 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 "include/cef_app.h"
    
    
    #include <filesystem>
    
    class CefMainArgs;
    class CefCommandLine;
    
    
    svornost's avatar
    svornost committed
    // Implement application-level callbacks for the browser process.
    
    class FCHostApp : public CefApp, public CefBrowserProcessHandler, public CefRenderProcessHandler {
    
    svornost's avatar
    svornost committed
     public:
    
    svornost's avatar
    svornost committed
      // CefApp methods:
      virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler()
    
          override {
    
    svornost's avatar
    svornost committed
        return this;
      }
    
      virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler()
    
    	  override {
    
    svornost's avatar
    svornost committed
    
      // CefBrowserProcessHandler methods:
    
      virtual void OnContextInitialized() override;
      virtual void OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) override;
    
      std::filesystem::path GetLocalStorePath();
    
    
      int main(const CefMainArgs& args, CefCommandLine* commandLine);
    
    svornost's avatar
    svornost committed
    
     private:
      // Include the default reference counting implementation.
      IMPLEMENT_REFCOUNTING(FCHostApp);
    };