2011-05-20 16:42:25 +02:00
|
|
|
// Copyright (c) 2011 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.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
2011-12-08 02:38:30 +01:00
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
2011-05-20 16:42:25 +02:00
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
|
|
|
|
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
|
|
|
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
void CEF_CALLBACK display_handler_on_nav_state_change(
|
|
|
|
struct _cef_display_handler_t* self, cef_browser_t* browser, int canGoBack,
|
|
|
|
int canGoForward)
|
|
|
|
{
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(browser);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!browser)
|
2011-05-20 16:42:25 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
2011-05-20 16:42:25 +02:00
|
|
|
CefDisplayHandlerCppToC::Get(self)->OnNavStateChange(
|
2011-12-08 02:38:30 +01:00
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
canGoBack?true:false,
|
|
|
|
canGoForward?true:false);
|
2011-05-20 16:42:25 +02:00
|
|
|
}
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
void CEF_CALLBACK display_handler_on_address_change(
|
|
|
|
struct _cef_display_handler_t* self, cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame, const cef_string_t* url)
|
|
|
|
{
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(browser);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(frame);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!frame)
|
|
|
|
return;
|
|
|
|
// Verify param: url; type: string_byref_const
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(url);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!url)
|
2011-05-20 16:42:25 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
2011-05-20 16:42:25 +02:00
|
|
|
CefDisplayHandlerCppToC::Get(self)->OnAddressChange(
|
2011-12-08 02:38:30 +01:00
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefFrameCToCpp::Wrap(frame),
|
2011-05-20 16:42:25 +02:00
|
|
|
CefString(url));
|
|
|
|
}
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
|
2011-10-21 16:09:04 +02:00
|
|
|
void CEF_CALLBACK display_handler_on_contents_size_change(
|
|
|
|
struct _cef_display_handler_t* self, cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame, int width, int height)
|
|
|
|
{
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-10-21 16:09:04 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
2011-10-21 16:09:04 +02:00
|
|
|
DCHECK(browser);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
2011-10-21 16:09:04 +02:00
|
|
|
DCHECK(frame);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!frame)
|
2011-10-21 16:09:04 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
2011-10-21 16:09:04 +02:00
|
|
|
CefDisplayHandlerCppToC::Get(self)->OnContentsSizeChange(
|
2011-12-08 02:38:30 +01:00
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefFrameCToCpp::Wrap(frame),
|
|
|
|
width,
|
2011-10-21 16:09:04 +02:00
|
|
|
height);
|
|
|
|
}
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
void CEF_CALLBACK display_handler_on_title_change(
|
|
|
|
struct _cef_display_handler_t* self, cef_browser_t* browser,
|
|
|
|
const cef_string_t* title)
|
|
|
|
{
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(browser);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!browser)
|
2011-05-20 16:42:25 +02:00
|
|
|
return;
|
2011-12-08 02:38:30 +01:00
|
|
|
// Unverified params: title
|
2011-05-20 16:42:25 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
2011-05-20 16:42:25 +02:00
|
|
|
CefDisplayHandlerCppToC::Get(self)->OnTitleChange(
|
2011-12-08 02:38:30 +01:00
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefString(title));
|
2011-05-20 16:42:25 +02:00
|
|
|
}
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
int CEF_CALLBACK display_handler_on_tooltip(struct _cef_display_handler_t* self,
|
|
|
|
cef_browser_t* browser, cef_string_t* text)
|
|
|
|
{
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(browser);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!browser)
|
2011-05-20 16:42:25 +02:00
|
|
|
return 0;
|
2011-12-08 02:38:30 +01:00
|
|
|
// Unverified params: text
|
2011-05-20 16:42:25 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Translate param: text; type: string_byref
|
2011-05-20 16:42:25 +02:00
|
|
|
CefString textStr(text);
|
2011-12-08 02:38:30 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefDisplayHandlerCppToC::Get(self)->OnTooltip(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
textStr);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
2011-05-20 16:42:25 +02:00
|
|
|
}
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
void CEF_CALLBACK display_handler_on_status_message(
|
|
|
|
struct _cef_display_handler_t* self, cef_browser_t* browser,
|
|
|
|
const cef_string_t* value, enum cef_handler_statustype_t type)
|
|
|
|
{
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(browser);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!browser)
|
2011-05-20 16:42:25 +02:00
|
|
|
return;
|
2011-12-08 02:38:30 +01:00
|
|
|
// Unverified params: value
|
2011-05-20 16:42:25 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
2011-05-20 16:42:25 +02:00
|
|
|
CefDisplayHandlerCppToC::Get(self)->OnStatusMessage(
|
2011-12-08 02:38:30 +01:00
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefString(value),
|
|
|
|
type);
|
2011-05-20 16:42:25 +02:00
|
|
|
}
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
int CEF_CALLBACK display_handler_on_console_message(
|
|
|
|
struct _cef_display_handler_t* self, cef_browser_t* browser,
|
|
|
|
const cef_string_t* message, const cef_string_t* source, int line)
|
|
|
|
{
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
2011-05-20 16:42:25 +02:00
|
|
|
DCHECK(browser);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!browser)
|
2011-05-20 16:42:25 +02:00
|
|
|
return 0;
|
2011-12-08 02:38:30 +01:00
|
|
|
// Unverified params: message, source
|
2011-05-20 16:42:25 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
bool _retval = CefDisplayHandlerCppToC::Get(self)->OnConsoleMessage(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefString(message),
|
|
|
|
CefString(source),
|
2011-05-20 16:42:25 +02:00
|
|
|
line);
|
2011-12-08 02:38:30 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
2011-05-20 16:42:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefDisplayHandlerCppToC::CefDisplayHandlerCppToC(CefDisplayHandler* cls)
|
|
|
|
: CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
|
|
|
|
cef_display_handler_t>(cls)
|
|
|
|
{
|
|
|
|
struct_.struct_.on_nav_state_change = display_handler_on_nav_state_change;
|
|
|
|
struct_.struct_.on_address_change = display_handler_on_address_change;
|
2011-10-21 16:09:04 +02:00
|
|
|
struct_.struct_.on_contents_size_change =
|
|
|
|
display_handler_on_contents_size_change;
|
2011-05-20 16:42:25 +02:00
|
|
|
struct_.struct_.on_title_change = display_handler_on_title_change;
|
|
|
|
struct_.struct_.on_tooltip = display_handler_on_tooltip;
|
|
|
|
struct_.struct_.on_status_message = display_handler_on_status_message;
|
|
|
|
struct_.struct_.on_console_message = display_handler_on_console_message;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
template<> long CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
|
|
|
|
cef_display_handler_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|