mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add DLL build support and wrapper that allows clients to transparently switch between static and dynamic CEF builds.
- The libcef project now builds libcef_static.lib instead of libcef.lib. - The libcef_dll project builds libcef.lib and libcef.dll. This DLL exports the new CEF C API defined in cef_capi.h, cef_nplugin_capi.h, cef_string.h and cef_string_map.h. - The libcef_dll_wrapper project builds libcef_dll_wrapper.lib. This static library wraps the new C API calls with an implementation of the CEF C++ interface as defined in cef.h and cef_nplugin.h. - The cefclient project now uses the DLL instead of the static library. - Type definitions have been moved from cef.h to cef_types.h so that they can be shared by both cef.h and cef_capi.h. This change required some enumeration member name modifications throughout the code base. - Fixed variable naming inconsistencies. - Added CefVariant::GetArraySize() method and _NPN_ArrayObjectGetVectorSize() function. - Remove the ProjectSection(WebsiteProperties) sections from cef.sln to improve VS2005 performance. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@16 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
54
libcef_dll/ctocpp/stream_ctocpp.h
Normal file
54
libcef_dll/ctocpp/stream_ctocpp.h
Normal file
@@ -0,0 +1,54 @@
|
||||
// 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.
|
||||
|
||||
#ifndef _STREAM_CTOCPP_H
|
||||
#define _STREAM_CTOCPP_H
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "cef.h"
|
||||
#include "cef_capi.h"
|
||||
#include "ctocpp.h"
|
||||
|
||||
|
||||
// Wrap a C stream reader structure with a C++ stream reader class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefStreamReaderCToCpp :
|
||||
public CefCToCpp<CefStreamReader, cef_stream_reader_t>
|
||||
{
|
||||
public:
|
||||
CefStreamReaderCToCpp(cef_stream_reader_t* str)
|
||||
: CefCToCpp<CefStreamReader, cef_stream_reader_t>(str) {}
|
||||
virtual ~CefStreamReaderCToCpp() {}
|
||||
|
||||
// CefStreamReader methods
|
||||
virtual size_t Read(void *ptr, size_t size, size_t n);
|
||||
virtual int Seek(long offset, int whence);
|
||||
virtual long Tell();
|
||||
virtual int Eof();
|
||||
};
|
||||
|
||||
|
||||
// Wrap a C stream writer structure with a C++ stream writer class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefStreamWriterCToCpp :
|
||||
public CefCToCpp<CefStreamWriter, cef_stream_writer_t>
|
||||
{
|
||||
public:
|
||||
CefStreamWriterCToCpp(cef_stream_writer_t* str)
|
||||
: CefCToCpp<CefStreamWriter, cef_stream_writer_t>(str) {}
|
||||
virtual ~CefStreamWriterCToCpp() {}
|
||||
|
||||
// CefStreamWriter methods
|
||||
virtual size_t Write(const void *ptr, size_t size, size_t n);
|
||||
virtual int Seek(long offset, int whence);
|
||||
virtual long Tell();
|
||||
virtual int Flush();
|
||||
};
|
||||
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // _STREAM_CTOCPP_H
|
Reference in New Issue
Block a user