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/focus_handler_cpptoc.h"
|
|
|
|
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
2011-10-14 14:40:40 +02:00
|
|
|
#include "libcef_dll/ctocpp/domnode_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
2011-05-20 16:42:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
void CEF_CALLBACK focus_handler_on_take_focus(struct _cef_focus_handler_t* self,
|
|
|
|
cef_browser_t* browser, int next)
|
|
|
|
{
|
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
|
|
|
CefFocusHandlerCppToC::Get(self)->OnTakeFocus(
|
2011-12-08 02:38:30 +01:00
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
next?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
|
|
|
int CEF_CALLBACK focus_handler_on_set_focus(struct _cef_focus_handler_t* self,
|
2011-10-07 12:30:10 +02:00
|
|
|
cef_browser_t* browser, enum cef_handler_focus_source_t source)
|
2011-05-20 16:42:25 +02:00
|
|
|
{
|
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
|
|
|
// Execute
|
|
|
|
bool _retval = CefFocusHandlerCppToC::Get(self)->OnSetFocus(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
source);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
2011-05-20 16:42:25 +02:00
|
|
|
}
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
|
2011-10-14 14:40:40 +02:00
|
|
|
void CEF_CALLBACK focus_handler_on_focused_node_changed(
|
|
|
|
struct _cef_focus_handler_t* self, cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame, struct _cef_domnode_t* node)
|
|
|
|
{
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-10-14 14:40:40 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
2011-10-14 14:40:40 +02:00
|
|
|
DCHECK(browser);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!browser)
|
2011-10-14 14:40:40 +02:00
|
|
|
return;
|
2011-12-08 02:38:30 +01:00
|
|
|
// Unverified params: frame, node
|
2011-10-14 14:40:40 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefFocusHandlerCppToC::Get(self)->OnFocusedNodeChanged(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefFrameCToCpp::Wrap(frame),
|
2011-10-14 14:40:40 +02:00
|
|
|
CefDOMNodeCToCpp::Wrap(node));
|
|
|
|
}
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
CefFocusHandlerCppToC::CefFocusHandlerCppToC(CefFocusHandler* cls)
|
|
|
|
: CefCppToC<CefFocusHandlerCppToC, CefFocusHandler, cef_focus_handler_t>(
|
|
|
|
cls)
|
|
|
|
{
|
|
|
|
struct_.struct_.on_take_focus = focus_handler_on_take_focus;
|
|
|
|
struct_.struct_.on_set_focus = focus_handler_on_set_focus;
|
2011-10-14 14:40:40 +02:00
|
|
|
struct_.struct_.on_focused_node_changed =
|
|
|
|
focus_handler_on_focused_node_changed;
|
2011-05-20 16:42:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
template<> long CefCppToC<CefFocusHandlerCppToC, CefFocusHandler,
|
|
|
|
cef_focus_handler_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|