diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-02 23:24:06 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-02 23:24:06 +0000 |
commit | f499e170777ed789fbe58f6697e3b5a46fa8deda (patch) | |
tree | 439601b6410c9cb2367644714ced54f1a742f911 /webkit/glue/webkit_glue.h | |
parent | 9a0737126e932380b53a2c1dda5364f67871f1f7 (diff) | |
download | chromium_src-f499e170777ed789fbe58f6697e3b5a46fa8deda.zip chromium_src-f499e170777ed789fbe58f6697e3b5a46fa8deda.tar.gz chromium_src-f499e170777ed789fbe58f6697e3b5a46fa8deda.tar.bz2 |
Minor cleanup in webkit/glue:
- created dom_operations_private.h for things that mention WebCore types
that are only needed within webkit/glue.
- moved contents of webkit_glue.h to the right locations.
- moved FilePath::StringType <-> WebString conversion out of glue_util
into webkit_glue since it is part of the public API.
- minimized includes in webkit_glue.h
R=dglazkov
Review URL: http://codereview.chromium.org/27351
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.h')
-rw-r--r-- | webkit/glue/webkit_glue.h | 71 |
1 files changed, 30 insertions, 41 deletions
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index efe0576..264d23a 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -15,35 +15,20 @@ #include <vector> #include "base/clipboard.h" +#include "base/file_path.h" #include "base/gfx/native_widget_types.h" #include "base/string16.h" -#include "webkit/glue/screen_info.h" -#include "webkit/glue/webplugin.h" -// We do not include the header files for these interfaces since this header -// file is included by code in webkit/port -class SharedCursor; +class GURL; +class SkBitmap; class WebView; -class WebViewDelegate; -class WebRequest; class WebFrame; -class WebFrameImpl; -class GURL; -struct _NPNetscapeFuncs; -typedef _NPNetscapeFuncs NPNetscapeFuncs; +struct WebPluginInfo; -#if defined(OS_WIN) -struct IMLangFontLink2; -#endif - -// TODO(darin): This file should not be dealing in WebCore types!! -namespace WebCore { -class Document; -class Frame; +namespace WebKit { +class WebString; } -class SkBitmap; - #if defined(OS_MACOSX) // TODO(port): // When the code (that got compiled) only used SkBitmap*, it was OK to @@ -67,15 +52,15 @@ typedef SkBitmap GlueBitmap; namespace webkit_glue { -//----------------------------------------------------------------------------- -// Functions implemented by JS engines. +struct ScreenInfo; + + +//---- BEGIN FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ----------------------------- + void SetJavaScriptFlags(const std::wstring& flags); void SetRecordPlaybackMode(bool value); void SetShouldExposeGCController(bool enable); -//----------------------------------------------------------------------------- -// Functions implemented by WebKit, called by the embedder: - // Turn on the logging for notImplemented() calls from WebCore. void EnableWebCoreNotImplementedLogging(); @@ -132,8 +117,22 @@ void CheckForLeaks(); // Returns false if the image could not be decoded. bool DecodeImage(const std::string& image_data, SkBitmap* image); -//----------------------------------------------------------------------------- -// Functions implemented by the embedder, called by WebKit: +// Tells the plugin thread to terminate the process forcefully instead of +// exiting cleanly. +void SetForcefullyTerminatePluginProcess(bool value); + +// Returns true if the plugin thread should terminate the process forcefully +// instead of exiting cleanly. +bool ShouldForcefullyTerminatePluginProcess(); + +// File path string conversions. +FilePath::StringType WebStringToFilePathString(const WebKit::WebString& str); +WebKit::WebString FilePathStringToWebString(const FilePath::StringType& str); + +//---- END FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ------------------------------- + + +//---- BEGIN FUNCTIONS IMPLEMENTED BY EMBEDDER -------------------------------- // Set during RenderProcess::GlobalInit when --enable-video has been passed in // and all media related libraries were successfully loaded. @@ -231,8 +230,6 @@ bool EnsureFontLoaded(HFONT font); // Returns screen information corresponding to the given window. ScreenInfo GetScreenInfo(gfx::NativeViewId window); -// Functions implemented by webkit_glue for WebKit ---------------------------- - // Returns a bool indicating if the Null plugin should be enabled or not. bool IsDefaultPluginEnabled(); @@ -252,17 +249,6 @@ bool FindProxyForUrl(const GURL& url, std::string* proxy_list); // the form language-country (e.g., en-US or pt-BR). std::wstring GetWebKitLocale(); -// Notifies the browser that the current page runs out of JS memory. -void NotifyJSOutOfMemory(WebCore::Frame* frame); - -// Tells the plugin thread to terminate the process forcefully instead of -// exiting cleanly. -void SetForcefullyTerminatePluginProcess(bool value); - -// Returns true if the plugin thread should terminate the process forcefully -// instead of exiting cleanly. -bool ShouldForcefullyTerminatePluginProcess(); - // Returns the hash for the given canonicalized URL for use in visited link // coloring. uint64 VisitedLinkHash(const char* canonical_url, size_t length); @@ -271,6 +257,9 @@ uint64 VisitedLinkHash(const char* canonical_url, size_t length); // have been generated by calling VisitedLinkHash(). bool IsLinkVisited(uint64 link_hash); +// ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- + + } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |