2009-07-24 21:11:01 +02:00
|
|
|
// 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.
|
2008-12-02 16:48:14 +01:00
|
|
|
|
2009-04-28 02:29:14 +02:00
|
|
|
#if defined(OS_WIN)
|
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
2008-12-02 16:48:14 +01:00
|
|
|
#include <string>
|
|
|
|
|
2009-04-28 02:29:14 +02:00
|
|
|
#include "base/string_piece.h"
|
2009-05-28 02:31:21 +02:00
|
|
|
#include "v8/include/v8.h"
|
2009-04-28 02:29:14 +02:00
|
|
|
|
2009-08-13 19:23:08 +02:00
|
|
|
namespace WebKit {
|
2008-12-02 16:48:14 +01:00
|
|
|
class WebFrame;
|
2010-02-11 19:33:33 +01:00
|
|
|
class WebString;
|
2008-12-02 16:48:14 +01:00
|
|
|
class WebView;
|
2009-10-22 01:27:29 +02:00
|
|
|
}
|
2008-12-02 16:48:14 +01:00
|
|
|
|
|
|
|
namespace webkit_glue {
|
|
|
|
|
|
|
|
#if defined(OS_WIN)
|
|
|
|
// Capture a bitmap of the web view.
|
2009-10-22 01:27:29 +02:00
|
|
|
void CaptureWebViewBitmap(HWND mainWnd, WebKit::WebView* webview,
|
|
|
|
HBITMAP& bitmap, SIZE& size);
|
2008-12-02 16:48:14 +01:00
|
|
|
|
|
|
|
// Save a bitmap image to file, providing optional alternative data in |lpBits|
|
|
|
|
BOOL SaveBitmapToFile(HBITMAP hBmp, HDC hDC, LPCTSTR file, LPBYTE lpBits);
|
|
|
|
#endif
|
|
|
|
|
2009-03-05 18:14:16 +01:00
|
|
|
// Text encoding objects must be initialized on the main thread.
|
|
|
|
void InitializeTextEncoding();
|
|
|
|
|
2009-07-24 21:11:01 +02:00
|
|
|
// This is called indirectly by the network layer to access resources.
|
2009-09-17 18:56:32 +02:00
|
|
|
base::StringPiece NetResourceProvider(int key);
|
2009-04-28 02:29:14 +02:00
|
|
|
|
2010-08-31 19:52:34 +02:00
|
|
|
// Retrieve the V8 context associated with the frame.
|
|
|
|
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame);
|
|
|
|
|
2009-09-26 03:22:33 +02:00
|
|
|
// Clear all cached data.
|
|
|
|
void ClearCache();
|
|
|
|
|
2010-02-11 19:33:33 +01:00
|
|
|
WebKit::WebString StdStringToWebString(const std::string& str);
|
|
|
|
|
|
|
|
std::string WebStringToStdString(const WebKit::WebString& str);
|
|
|
|
|
2008-12-02 16:48:14 +01:00
|
|
|
} // namespace webkit_glue
|