2010-10-16 21:10:11 +02:00
|
|
|
// Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights
|
2010-10-03 23:04:50 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// -------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool and should not edited
|
|
|
|
// by hand. See the translator.README.txt file in the tools directory for
|
|
|
|
// more information.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _HANDLER_CTOCPP_H
|
|
|
|
#define _HANDLER_CTOCPP_H
|
|
|
|
|
|
|
|
#ifndef BUILDING_CEF_SHARED
|
|
|
|
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
|
|
|
#else // BUILDING_CEF_SHARED
|
|
|
|
|
|
|
|
#include "include/cef.h"
|
|
|
|
#include "include/cef_capi.h"
|
|
|
|
#include "libcef_dll/ctocpp/ctocpp.h"
|
|
|
|
|
|
|
|
// Wrap a C structure with a C++ class.
|
|
|
|
// This class may be instantiated and accessed DLL-side only.
|
|
|
|
class CefHandlerCToCpp
|
|
|
|
: public CefCToCpp<CefHandlerCToCpp, CefHandler, cef_handler_t>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CefHandlerCToCpp(cef_handler_t* str)
|
|
|
|
: CefCToCpp<CefHandlerCToCpp, CefHandler, cef_handler_t>(str) {}
|
|
|
|
virtual ~CefHandlerCToCpp() {}
|
|
|
|
|
|
|
|
// CefHandler methods
|
|
|
|
virtual RetVal HandleBeforeCreated(CefRefPtr<CefBrowser> parentBrowser,
|
2010-11-18 22:05:25 +01:00
|
|
|
CefWindowInfo& windowInfo, bool popup,
|
|
|
|
const CefPopupFeatures& popupFeatures, CefRefPtr<CefHandler>& handler,
|
2010-11-22 18:49:46 +01:00
|
|
|
CefString& url, CefBrowserSettings& settings);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleAfterCreated(CefRefPtr<CefBrowser> browser);
|
|
|
|
virtual RetVal HandleAddressChange(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
CefRefPtr<CefFrame> frame, const CefString& url);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleTitleChange(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& title);
|
2011-03-24 21:36:47 +01:00
|
|
|
virtual RetVal HandleNavStateChange(CefRefPtr<CefBrowser> browser,
|
|
|
|
bool canGoBack, bool canGoForward);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleBeforeBrowse(CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
|
|
|
|
NavType navType, bool isRedirect);
|
|
|
|
virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser,
|
2011-03-08 20:33:18 +01:00
|
|
|
CefRefPtr<CefFrame> frame);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
|
2011-03-08 20:33:18 +01:00
|
|
|
CefRefPtr<CefFrame> frame, int httpStatusCode);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleLoadError(CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame, ErrorCode errorCode,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& failedUrl, CefString& errorText);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
CefRefPtr<CefRequest> request, CefString& redirectUrl,
|
|
|
|
CefRefPtr<CefStreamReader>& resourceStream, CefString& mimeType,
|
2010-10-03 23:04:50 +02:00
|
|
|
int loadFlags);
|
2011-01-12 02:33:03 +01:00
|
|
|
virtual RetVal HandleProtocolExecution(CefRefPtr<CefBrowser> browser,
|
|
|
|
const CefString& url, bool* allow_os_execution);
|
2010-10-16 21:10:11 +02:00
|
|
|
virtual RetVal HandleDownloadResponse(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& mimeType, const CefString& fileName,
|
2010-10-16 21:10:11 +02:00
|
|
|
int64 contentLength, CefRefPtr<CefDownloadHandler>& handler);
|
2011-01-07 02:24:17 +01:00
|
|
|
virtual RetVal HandleAuthenticationRequest(CefRefPtr<CefBrowser> browser,
|
|
|
|
bool isProxy, const CefString& host, const CefString& realm,
|
|
|
|
const CefString& scheme, CefString& username, CefString& password);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleBeforeMenu(CefRefPtr<CefBrowser> browser,
|
|
|
|
const MenuInfo& menuInfo);
|
|
|
|
virtual RetVal HandleGetMenuLabel(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
MenuId menuId, CefString& label);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleMenuAction(CefRefPtr<CefBrowser> browser, MenuId menuId);
|
|
|
|
virtual RetVal HandlePrintOptions(CefRefPtr<CefBrowser> browser,
|
|
|
|
CefPrintOptions& printOptions);
|
|
|
|
virtual RetVal HandlePrintHeaderFooter(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
CefRefPtr<CefFrame> frame, CefPrintInfo& printInfo, const CefString& url,
|
|
|
|
const CefString& title, int currentPage, int maxPages,
|
|
|
|
CefString& topLeft, CefString& topCenter, CefString& topRight,
|
|
|
|
CefString& bottomLeft, CefString& bottomCenter, CefString& bottomRight);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleJSAlert(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
CefRefPtr<CefFrame> frame, const CefString& message);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleJSConfirm(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
CefRefPtr<CefFrame> frame, const CefString& message, bool& retval);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleJSPrompt(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
CefRefPtr<CefFrame> frame, const CefString& message,
|
|
|
|
const CefString& defaultValue, bool& retval, CefString& result);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleJSBinding(CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Value> object);
|
|
|
|
virtual RetVal HandleBeforeWindowClose(CefRefPtr<CefBrowser> browser);
|
|
|
|
virtual RetVal HandleTakeFocus(CefRefPtr<CefBrowser> browser, bool reverse);
|
|
|
|
virtual RetVal HandleSetFocus(CefRefPtr<CefBrowser> browser, bool isWidget);
|
|
|
|
virtual RetVal HandleKeyEvent(CefRefPtr<CefBrowser> browser,
|
|
|
|
KeyEventType type, int code, int modifiers, bool isSystemKey);
|
2010-11-22 18:49:46 +01:00
|
|
|
virtual RetVal HandleTooltip(CefRefPtr<CefBrowser> browser, CefString& text);
|
2011-01-26 16:12:49 +01:00
|
|
|
virtual RetVal HandleStatus(CefRefPtr<CefBrowser> browser,
|
|
|
|
const CefString& value, StatusType type);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleConsoleMessage(CefRefPtr<CefBrowser> browser,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& message, const CefString& source, int line);
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual RetVal HandleFindResult(CefRefPtr<CefBrowser> browser, int identifier,
|
|
|
|
int count, const CefRect& selectionRect, int activeMatchOrdinal,
|
|
|
|
bool finalUpdate);
|
2011-03-24 21:36:47 +01:00
|
|
|
virtual RetVal HandleGetRect(CefRefPtr<CefBrowser> browser, bool screen,
|
|
|
|
CefRect& rect);
|
|
|
|
virtual RetVal HandleGetScreenPoint(CefRefPtr<CefBrowser> browser, int viewX,
|
|
|
|
int viewY, int& screenX, int& screenY);
|
|
|
|
virtual RetVal HandlePopupChange(CefRefPtr<CefBrowser> browser, bool show,
|
|
|
|
const CefRect& rect);
|
|
|
|
virtual RetVal HandlePaint(CefRefPtr<CefBrowser> browser,
|
|
|
|
PaintElementType type, const CefRect& dirtyRect, const void* buffer);
|
|
|
|
virtual RetVal HandleCursorChange(CefRefPtr<CefBrowser> browser,
|
|
|
|
CefCursorHandle cursor);
|
2010-10-03 23:04:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BUILDING_CEF_SHARED
|
|
|
|
#endif // _HANDLER_CTOCPP_H
|
|
|
|
|