mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Move to a unified thread model for CEF based on the CEF2 implementation.
- Add the ability to post user-defined tasks for execution on CEF threads (issue #25). - Update the CEF swap image. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@90 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
30
libcef_dll/ctocpp/task_ctocpp.cc
Normal file
30
libcef_dll/ctocpp/task_ctocpp.cc
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright (c) 2009 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.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// A portion of this file was generated by the CEF translator tool. When
|
||||
// making changes by hand only do so within the body of existing static and
|
||||
// virtual method implementations. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/task_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefTaskCToCpp::Execute(CefThreadId threadId)
|
||||
{
|
||||
if(CEF_MEMBER_MISSING(struct_, execute))
|
||||
return;
|
||||
|
||||
struct_->execute(struct_, threadId);
|
||||
}
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
long CefCToCpp<CefTaskCToCpp, CefTask, cef_task_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
39
libcef_dll/ctocpp/task_ctocpp.h
Normal file
39
libcef_dll/ctocpp/task_ctocpp.h
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2009 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 and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef _TASK_CTOCPP_H
|
||||
#define _TASK_CTOCPP_H
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef.h"
|
||||
#include "include/cef_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefTaskCToCpp
|
||||
: public CefCToCpp<CefTaskCToCpp, CefTask, cef_task_t>
|
||||
{
|
||||
public:
|
||||
CefTaskCToCpp(cef_task_t* str)
|
||||
: CefCToCpp<CefTaskCToCpp, CefTask, cef_task_t>(str) {}
|
||||
virtual ~CefTaskCToCpp() {}
|
||||
|
||||
// CefTask methods
|
||||
virtual void Execute(CefThreadId threadId);
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // _TASK_CTOCPP_H
|
||||
|
Reference in New Issue
Block a user