mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-28 02:20:04 +01:00
c295931b1e
- Add CefBrowser::Get*Frame() methods for retrieving the appropriate CefFrame instance. - Add a CefFrame attribute to CefHandler callback methods where appropriate. - Add support for V8 JavaScript extensions and values via CefV8Value and CefV8Handler. Native C++ and user-defined JavaScript object hierarchies may now be created and accessed using the CEF API. - Remove the CefHandler and CefVariant classes and related CefBrowser methods that have been obsoleted by the addition of CEF V8 support. - Add the CefRegisterExtension() function for registering system-wide V8 extensions. - Add the CefHandler::HandleJSBinding() callback method for attaching V8 values to the global frame JavaScript object. This method replaces the previous technique of calling CefBrowser::AddJSHandler(). - Add new wrapper template methods for simplifying DLL wrapper implementations. - Move cef_string* files from libcef_dll to libcef so that projects can link libcef statically without errors. - Fix crashes when CEF exits due to object constructors being executed on non-UI threads if the application is closed while a page is still loading. - Update the cefclient project to reflect changes and demonstrate the new APIs. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@26 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
// 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 _V8HANDLER_CTOCPP_H
|
|
#define _V8HANDLER_CTOCPP_H
|
|
|
|
#ifndef BUILDING_CEF_SHARED
|
|
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
|
#else // BUILDING_CEF_SHARED
|
|
|
|
#include "cef.h"
|
|
#include "cef_capi.h"
|
|
#include "ctocpp.h"
|
|
|
|
|
|
// Wrap a C v8handler structure with a C++ v8handler class.
|
|
// This class may be instantiated and accessed DLL-side only.
|
|
class CefV8HandlerCToCpp
|
|
: public CefCToCpp<CefV8HandlerCToCpp, CefV8Handler, cef_v8handler_t>
|
|
{
|
|
public:
|
|
CefV8HandlerCToCpp(cef_v8handler_t* str)
|
|
: CefCToCpp<CefV8HandlerCToCpp, CefV8Handler, cef_v8handler_t>(str) {}
|
|
virtual ~CefV8HandlerCToCpp() {}
|
|
|
|
// CefV8Handler methods
|
|
virtual bool Execute(const std::wstring& name,
|
|
CefRefPtr<CefV8Value> object,
|
|
CefV8ValueList& arguments,
|
|
CefRefPtr<CefV8Value>& retval,
|
|
std::wstring& exception);
|
|
};
|
|
|
|
|
|
#endif // BUILDING_CEF_SHARED
|
|
#endif // _V8HANDLER_CTOCPP_H
|