2016-01-08 20:00:27 +01:00
|
|
|
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
2013-01-03 18:24:24 +01: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. 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/task_cpptoc.h"
|
|
|
|
#include "libcef_dll/ctocpp/task_runner_ctocpp.h"
|
|
|
|
|
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CefRefPtr<CefTaskRunner> CefTaskRunner::GetForCurrentThread() {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_task_runner_t* _retval = cef_task_runner_get_for_current_thread();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefTaskRunnerCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
CefRefPtr<CefTaskRunner> CefTaskRunner::GetForThread(CefThreadId threadId) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_task_runner_t* _retval = cef_task_runner_get_for_thread(
|
|
|
|
threadId);
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefTaskRunnerCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
bool CefTaskRunnerCToCpp::IsSame(CefRefPtr<CefTaskRunner> that) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_task_runner_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_same))
|
2013-01-03 18:24:24 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: that; type: refptr_same
|
|
|
|
DCHECK(that.get());
|
|
|
|
if (!that.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->is_same(_struct,
|
2013-01-03 18:24:24 +01:00
|
|
|
CefTaskRunnerCToCpp::Unwrap(that));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefTaskRunnerCToCpp::BelongsToCurrentThread() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_task_runner_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, belongs_to_current_thread))
|
2013-01-03 18:24:24 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->belongs_to_current_thread(_struct);
|
2013-01-03 18:24:24 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefTaskRunnerCToCpp::BelongsToThread(CefThreadId threadId) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_task_runner_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, belongs_to_thread))
|
2013-01-03 18:24:24 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->belongs_to_thread(_struct,
|
2013-01-03 18:24:24 +01:00
|
|
|
threadId);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefTaskRunnerCToCpp::PostTask(CefRefPtr<CefTask> task) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_task_runner_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, post_task))
|
2013-01-03 18:24:24 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: task; type: refptr_diff
|
|
|
|
DCHECK(task.get());
|
|
|
|
if (!task.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->post_task(_struct,
|
2013-01-03 18:24:24 +01:00
|
|
|
CefTaskCppToC::Wrap(task));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefTaskRunnerCToCpp::PostDelayedTask(CefRefPtr<CefTask> task,
|
|
|
|
int64 delay_ms) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_task_runner_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, post_delayed_task))
|
2013-01-03 18:24:24 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: task; type: refptr_diff
|
|
|
|
DCHECK(task.get());
|
|
|
|
if (!task.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->post_delayed_task(_struct,
|
2013-01-03 18:24:24 +01:00
|
|
|
CefTaskCppToC::Wrap(task),
|
|
|
|
delay_ms);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefTaskRunnerCToCpp::CefTaskRunnerCToCpp() {
|
|
|
|
}
|
|
|
|
|
|
|
|
template<> cef_task_runner_t* CefCToCpp<CefTaskRunnerCToCpp, CefTaskRunner,
|
|
|
|
cef_task_runner_t>::UnwrapDerived(CefWrapperType type, CefTaskRunner* c) {
|
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2013-01-03 18:24:24 +01:00
|
|
|
#ifndef NDEBUG
|
2014-07-15 00:18:51 +02:00
|
|
|
template<> base::AtomicRefCount CefCToCpp<CefTaskRunnerCToCpp, CefTaskRunner,
|
2013-01-03 18:24:24 +01:00
|
|
|
cef_task_runner_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
template<> CefWrapperType CefCToCpp<CefTaskRunnerCToCpp, CefTaskRunner,
|
|
|
|
cef_task_runner_t>::kWrapperType = WT_TASK_RUNNER;
|