2012-01-10 00:46:23 +01:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
2011-02-21 23:44:06 +01:00
|
|
|
// 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-02-21 23:44:06 +01:00
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
|
|
|
|
|
|
|
|
|
|
|
|
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
CEF_EXPORT cef_v8context_t* cef_v8context_get_current_context() {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefV8Context> _retval = CefV8Context::GetCurrentContext();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefV8ContextCppToC::Wrap(_retval);
|
2011-02-21 23:44:06 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
CEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context() {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefV8Context> _retval = CefV8Context::GetEnteredContext();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefV8ContextCppToC::Wrap(_retval);
|
2011-02-21 23:44:06 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
CEF_EXPORT int cef_v8context_in_context() {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefV8Context::InContext();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
2011-11-21 20:01:22 +01:00
|
|
|
}
|
|
|
|
|
2011-02-21 23:44:06 +01:00
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
cef_browser_t* CEF_CALLBACK v8context_get_browser(
|
|
|
|
struct _cef_v8context_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-21 23:44:06 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-02-21 23:44:06 +01:00
|
|
|
return NULL;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefBrowser> _retval = CefV8ContextCppToC::Get(self)->GetBrowser();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefBrowserCppToC::Wrap(_retval);
|
2011-02-21 23:44:06 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
cef_frame_t* CEF_CALLBACK v8context_get_frame(struct _cef_v8context_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-21 23:44:06 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-02-21 23:44:06 +01:00
|
|
|
return NULL;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefFrame> _retval = CefV8ContextCppToC::Get(self)->GetFrame();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefFrameCppToC::Wrap(_retval);
|
2011-02-21 23:44:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
struct _cef_v8value_t* CEF_CALLBACK v8context_get_global(
|
2012-01-10 00:46:23 +01:00
|
|
|
struct _cef_v8context_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-21 23:44:06 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-02-21 23:44:06 +01:00
|
|
|
return NULL;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefV8Value> _retval = CefV8ContextCppToC::Get(self)->GetGlobal();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefV8ValueCppToC::Wrap(_retval);
|
2011-02-21 23:44:06 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
int CEF_CALLBACK v8context_enter(struct _cef_v8context_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-04-07 03:58:49 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefV8ContextCppToC::Get(self)->Enter();
|
2011-04-07 03:58:49 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
2011-04-07 03:58:49 +02:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
int CEF_CALLBACK v8context_exit(struct _cef_v8context_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-04-07 03:58:49 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefV8ContextCppToC::Get(self)->Exit();
|
2011-04-07 03:58:49 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
2011-04-07 03:58:49 +02:00
|
|
|
}
|
|
|
|
|
2011-11-21 22:21:55 +01:00
|
|
|
int CEF_CALLBACK v8context_is_same(struct _cef_v8context_t* self,
|
2012-01-10 00:46:23 +01:00
|
|
|
struct _cef_v8context_t* that) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-11-21 22:21:55 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: that; type: refptr_same
|
2011-11-21 22:21:55 +01:00
|
|
|
DCHECK(that);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!that)
|
|
|
|
return 0;
|
2011-11-21 22:21:55 +01:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
bool _retval = CefV8ContextCppToC::Get(self)->IsSame(
|
2011-11-21 22:21:55 +01:00
|
|
|
CefV8ContextCppToC::Unwrap(that));
|
2011-12-08 02:38:30 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
2011-11-21 22:21:55 +01:00
|
|
|
}
|
|
|
|
|
2011-02-21 23:44:06 +01:00
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefV8ContextCppToC::CefV8ContextCppToC(CefV8Context* cls)
|
2012-01-10 00:46:23 +01:00
|
|
|
: CefCppToC<CefV8ContextCppToC, CefV8Context, cef_v8context_t>(cls) {
|
2011-02-21 23:44:06 +01:00
|
|
|
struct_.struct_.get_browser = v8context_get_browser;
|
|
|
|
struct_.struct_.get_frame = v8context_get_frame;
|
|
|
|
struct_.struct_.get_global = v8context_get_global;
|
2011-04-07 03:58:49 +02:00
|
|
|
struct_.struct_.enter = v8context_enter;
|
|
|
|
struct_.struct_.exit = v8context_exit;
|
2011-11-21 22:21:55 +01:00
|
|
|
struct_.struct_.is_same = v8context_is_same;
|
2011-02-21 23:44:06 +01:00
|
|
|
}
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
#ifndef NDEBUG
|
2011-02-21 23:44:06 +01:00
|
|
|
template<> long CefCppToC<CefV8ContextCppToC, CefV8Context,
|
|
|
|
cef_v8context_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|