summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webkit_glue.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 22:28:40 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 22:28:40 +0000
commit5299356524f2e169ec97db351c44fe6da701984e (patch)
tree6aeb51a22c6d3c101fce0f17ea1e65a659232507 /webkit/glue/webkit_glue.h
parent9c8108d9356604eec57bf3c880f1580eb41fd1c3 (diff)
downloadchromium_src-5299356524f2e169ec97db351c44fe6da701984e.zip
chromium_src-5299356524f2e169ec97db351c44fe6da701984e.tar.gz
chromium_src-5299356524f2e169ec97db351c44fe6da701984e.tar.bz2
Takes steps to make our PlatformScreen implementation more portable.
Introduces ChromiumBridge as a means for our WebCore port to depend on the embedder indirectly. This will be extended to support the rest of our port. WebWidgetImpl and ChromeClientImpl both needed to have their platformWindow getter implemented. This fixes a regression related to the most recent merge. Removes the orphaned Language.cpp (see the real one in the platform/chromium directory. Changed webkit_glue::GetMonitorInfoForWindow to webkit_glue::GetScreenInfo. This resulted in a varied amount of plumbing changes. It also pushes the platform specific bits up into the browser where they belong. ScreenInfo is a struct that is part of the webkit/glue API. R=dglazkov,eseidel Review URL: http://codereview.chromium.org/8761 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.h')
-rw-r--r--webkit/glue/webkit_glue.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index 71b1c68..b8b2156 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_H__
-#define WEBKIT_GLUE_H__
+#ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_
+#define WEBKIT_GLUE_WEBKIT_GLUE_H_
#include "base/basictypes.h"
@@ -14,7 +14,9 @@
#include <string>
#include <vector>
+#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
@@ -29,16 +31,15 @@ class GURL;
struct _NPNetscapeFuncs;
typedef _NPNetscapeFuncs NPNetscapeFuncs;
-#ifdef _WIN32
+#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 WebCore
+}
class SkBitmap;
@@ -69,12 +70,12 @@ bool IsLayoutTestMode();
// default way to do this operation. It can be called directly from
// GetLangFontLink.
IMLangFontLink2* GetLangFontLinkHelper();
-
-// Returns the monitor information corresponding to the window.
-// This is the default implementation.
-MONITORINFOEX GetMonitorInfoForWindowHelper(HWND window);
#endif
+// Returns screen information corresponding to the given window. This is the
+// default implementation.
+ScreenInfo GetScreenInfoHelper(gfx::ViewHandle window);
+
// Returns the text of the document element.
std::wstring DumpDocumentText(WebFrame* web_frame);
@@ -151,7 +152,7 @@ bool GetMimeTypeFromFile(const std::wstring& file_path, std::string* mime_type);
bool GetPreferredExtensionForMimeType(const std::string& mime_type,
std::wstring* ext);
-#ifdef _WIN32
+#if defined(OS_WIN)
// Returns the com object pointer for the FontLink interface
IMLangFontLink2* GetLangFontLink();
#endif
@@ -186,7 +187,7 @@ std::string GetDataResource(int resource_id);
// specified as BINDATA in the relevant .rc file.
GlueBitmap GetBitmapResource(int resource_id);
-#ifdef _WIN32
+#if defined(OS_WIN)
// Loads and returns a cursor.
HCURSOR LoadCursor(int cursor_id);
#endif
@@ -252,14 +253,14 @@ bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins);
// false otherwise.
bool IsPluginRunningInRendererProcess();
-#ifdef _WIN32
+#if defined(OS_WIN)
// Asks the browser to load the font.
bool EnsureFontLoaded(HFONT font);
-
-// Returns the monitor information corresponding to the window.
-MONITORINFOEX GetMonitorInfoForWindow(HWND window);
#endif
+// Returns screen information corresponding to the given window.
+ScreenInfo GetScreenInfo(gfx::ViewHandle window);
+
// Functions implemented by webkit_glue for WebKit ----------------------------
// Notifies the embedder that a form element value has changed. The document
@@ -270,7 +271,7 @@ void NotifyFormStateChanged(const WebCore::Document* document);
// Returns a bool indicating if the Null plugin should be enabled or not.
bool IsDefaultPluginEnabled();
-#ifdef _WIN32
+#if defined(OS_WIN)
// Downloads the file specified by the URL. On sucess a WM_COPYDATA message
// will be sent to the caller_window.
bool DownloadUrl(const std::string& url, HWND caller_window);
@@ -296,4 +297,4 @@ bool ShouldForcefullyTerminatePluginProcess();
} // namespace webkit_glue
-#endif // WEBKIT_GLUE_H__
+#endif // WEBKIT_GLUE_WEBKIT_GLUE_H_