2010-10-03 23:04:50 +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.
|
|
|
|
|
|
|
|
#if defined(OS_WIN)
|
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "base/string_piece.h"
|
|
|
|
#include "v8/include/v8.h"
|
|
|
|
|
|
|
|
namespace WebKit {
|
|
|
|
class WebFrame;
|
|
|
|
class WebView;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace webkit_glue {
|
|
|
|
|
|
|
|
#if defined(OS_WIN)
|
|
|
|
// Capture a bitmap of the web view.
|
|
|
|
void CaptureWebViewBitmap(HWND mainWnd, WebKit::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
|
2010-11-15 16:39:56 +01:00
|
|
|
|
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
void InitializeDataPak();
|
|
|
|
#endif
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
// Text encoding objects must be initialized on the main thread.
|
|
|
|
void InitializeTextEncoding();
|
|
|
|
|
|
|
|
// This is called indirectly by the network layer to access resources.
|
|
|
|
base::StringPiece NetResourceProvider(int key);
|
|
|
|
|
|
|
|
// Retrieve the V8 context associated with the frame.
|
|
|
|
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame);
|
|
|
|
|
|
|
|
// Clear all cached data.
|
|
|
|
void ClearCache();
|
|
|
|
|
2011-01-06 20:26:45 +01:00
|
|
|
// Returns true if the request represents a download based on
|
|
|
|
// the supplied Content-Type and Content-Disposition headers.
|
|
|
|
bool ShouldDownload(const std::string& content_disposition,
|
|
|
|
const std::string& mime_type);
|
2010-10-16 21:10:11 +02:00
|
|
|
|
2010-10-03 23:04:50 +02:00
|
|
|
} // namespace webkit_glue
|