2017-01-11 00:00:30 +01:00
|
|
|
// Copyright (c) 2017 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() {
|
|
|
|
}
|
|
|
|
|
2017-02-09 23:07:43 +01:00
|
|
|
template<> cef_task_runner_t* CefCToCppRefCounted<CefTaskRunnerCToCpp,
|
|
|
|
CefTaskRunner, cef_task_runner_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefTaskRunner* c) {
|
2015-04-26 20:40:01 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2017-02-09 23:07:43 +01:00
|
|
|
template<> base::AtomicRefCount CefCToCppRefCounted<CefTaskRunnerCToCpp,
|
|
|
|
CefTaskRunner, cef_task_runner_t>::DebugObjCt = 0;
|
2013-01-03 18:24:24 +01:00
|
|
|
#endif
|
|
|
|
|
2017-02-09 23:07:43 +01:00
|
|
|
template<> CefWrapperType CefCToCppRefCounted<CefTaskRunnerCToCpp,
|
|
|
|
CefTaskRunner, cef_task_runner_t>::kWrapperType = WT_TASK_RUNNER;
|