[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/2php/cefpython/cefpython55/src/client_handler/client_handler.h [Back]  [Original]

// Copyright (c) 2012-2014 The CEF Python authors. All rights reserved.
// License: New BSD License.
// Website: http://code.google.com/p/cefpython/

// ClientHandler code is running only in the Browser process.

#pragma once

#if defined(_WIN32)
#include "../windows/stdint.h"
#endif

#include "common/cefpython_public_api.h"

#include "context_menu_handler.h"
#include "display_handler.h"
#include "download_handler.h"
#include "focus_handler.h"
#include "js_dialog_handler.h"
#include "keyboard_handler.h"
#include "lifespan_handler.h"
#include "load_handler.h"
#include "render_handler.h"
#include "request_handler.h"


class ClientHandler : public CefClient,
                      public ContextMenuHandler,
                      public DisplayHandler,
                      public DownloadHandler,
                      public FocusHandler,
                      public JSDialogHandler,
                      public KeyboardHandler,
                      public LifespanHandler,
                      public LoadHandler,
                      public RenderHandler,
                      public RequestHandler
{
public:
    ClientHandler(){}
    virtual ~ClientHandler(){}

    CefRefPtr GetContextMenuHandler() override {
        return this;
    }

    CefRefPtr GetDisplayHandler() override {
        return this;
    }

    CefRefPtr GetDownloadHandler() override {
        return this;
    }

    CefRefPtr GetFocusHandler() override {
        return this;
    }

    CefRefPtr GetJSDialogHandler() override {
        return this;
    }

    CefRefPtr GetKeyboardHandler() override {
        return this;
    }

    CefRefPtr GetLifeSpanHandler() override {
        return this;
    }

    CefRefPtr GetLoadHandler() override {
        return this;
    }

    CefRefPtr GetRenderHandler() override {
        return this;
    }

    CefRefPtr GetRequestHandler() override {
        return this;
    }

    bool OnProcessMessageReceived(CefRefPtr browser,
                                  CefProcessId source_process,
                                  CefRefPtr message
                                  ) override;

private:
  IMPLEMENT_REFCOUNTING(ClientHandler);
};

Web Proxy Viewer  |  New URL  |  Original Page