cef/cef1/libcef_dll/cpptoc/zoom_handler_cpptoc.cc

98 lines
2.7 KiB
C++

// Copyright (c) 2012 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.
//
// ---------------------------------------------------------------------------
//
// 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
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/zoom_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK zoom_handler_on_get_zoom_level(
struct _cef_zoom_handler_t* self, cef_browser_t* browser,
const cef_string_t* url, double* zoomLevel) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return 0;
// Verify param: zoomLevel; type: simple_byref
DCHECK(zoomLevel);
if (!zoomLevel)
return 0;
// Translate param: zoomLevel; type: simple_byref
double zoomLevelVal = zoomLevel?*zoomLevel:0;
// Execute
bool _retval = CefZoomHandlerCppToC::Get(self)->OnGetZoomLevel(
CefBrowserCToCpp::Wrap(browser),
CefString(url),
zoomLevelVal);
// Restore param: zoomLevel; type: simple_byref
if (zoomLevel)
*zoomLevel = zoomLevelVal;
// Return type: bool
return _retval;
}
int CEF_CALLBACK zoom_handler_on_set_zoom_level(
struct _cef_zoom_handler_t* self, cef_browser_t* browser,
const cef_string_t* url, double zoomLevel) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return 0;
// Execute
bool _retval = CefZoomHandlerCppToC::Get(self)->OnSetZoomLevel(
CefBrowserCToCpp::Wrap(browser),
CefString(url),
zoomLevel);
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefZoomHandlerCppToC::CefZoomHandlerCppToC(CefZoomHandler* cls)
: CefCppToC<CefZoomHandlerCppToC, CefZoomHandler, cef_zoom_handler_t>(cls) {
struct_.struct_.on_get_zoom_level = zoom_handler_on_get_zoom_level;
struct_.struct_.on_set_zoom_level = zoom_handler_on_set_zoom_level;
}
#ifndef NDEBUG
template<> long CefCppToC<CefZoomHandlerCppToC, CefZoomHandler,
cef_zoom_handler_t>::DebugObjCt = 0;
#endif