cef/libcef/browser_webkit_glue.h
Marshall Greenblatt c295931b1e - Move frame-related methods from CefBrowser into a new CefFrame class.
- 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
2009-05-28 00:31:21 +00:00

40 lines
1.2 KiB
C++

// Copyright (c) 2008-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.
#if defined(OS_WIN)
#include <windows.h>
#endif
#include <string>
#include "base/string_piece.h"
#include "v8/include/v8.h"
class WebFrame;
class WebView;
namespace webkit_glue {
// Return the HTML contents of a web frame as a string
std::string GetDocumentString(WebFrame* frame);
#if defined(OS_WIN)
// Capture a bitmap of the web view.
void CaptureWebViewBitmap(HWND mainWnd, WebView* webview, HBITMAP& bitmap,
SIZE& size);
// Save a bitmap image to file, providing optional alternative data in |lpBits|
BOOL SaveBitmapToFile(HBITMAP hBmp, HDC hDC, LPCTSTR file, LPBYTE lpBits);
#endif
// Text encoding objects must be initialized on the main thread.
void InitializeTextEncoding();
// This is called indirectly by the network layer to access resources.
StringPiece NetResourceProvider(int key);
// Retrieve the V8 context associated with the frame.
v8::Handle<v8::Context> GetV8Context(WebFrame* frame);
} // namespace webkit_glue