diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 21:39:15 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 21:39:15 +0000 |
commit | 18bcc3c1e8ac29683e6d09a9c2d8b3037b0fb360 (patch) | |
tree | c1941e26ff0fa733258e7c91d2f84ad436df6963 /webkit/tools | |
parent | ab58e6cec813b33eefb397be3cebc11fcc280bdf (diff) | |
download | chromium_src-18bcc3c1e8ac29683e6d09a9c2d8b3037b0fb360.zip chromium_src-18bcc3c1e8ac29683e6d09a9c2d8b3037b0fb360.tar.gz chromium_src-18bcc3c1e8ac29683e6d09a9c2d8b3037b0fb360.tar.bz2 |
POSIX: gfx::NativeViewId and CrossProcessEvent
Create a couple new typedefs for porting work. Firstly,
gfx::NativeViewId is a handle to a platform specific widget in the
renderer process. For Windows, this is just a HWND as before. However,
in other platforms the ids used in the renderer process will be
something else.
CrossProcessEvent is the type of a HANDLE to a Windows event object
which is used across processes. Since we aren't going to support these
sorts of events on non-Windows platforms, this will have to go away at
some point. For now, however, this lets us build code without too many
ifdefs all over the place.
Review URL: http://codereview.chromium.org/18768
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8756 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rwxr-xr-x | webkit/tools/test_shell/test_shell.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index c1ae406..ceeb6e6 100755 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -595,8 +595,8 @@ bool SpellCheckWord(const wchar_t* word, int word_len, return true; } -ScreenInfo GetScreenInfo(gfx::NativeView window) { - return GetScreenInfoHelper(window); +ScreenInfo GetScreenInfo(gfx::NativeViewId window) { + return GetScreenInfoHelper(gfx::NativeViewFromId(window)); } bool IsPluginRunningInRendererProcess() { diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 631d48e..684b22a 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -10,6 +10,7 @@ #include "base/file_util.h" #include "base/gfx/point.h" +#include "base/gfx/native_widget_types.h" #include "base/message_loop.h" #include "base/string_util.h" #include "base/trace_event.h" @@ -664,9 +665,11 @@ void TestWebViewDelegate::SetUserStyleSheetLocation(const GURL& location) { // WebWidgetDelegate --------------------------------------------------------- -gfx::NativeView TestWebViewDelegate::GetContainingView(WebWidget* webwidget) { +gfx::NativeViewId TestWebViewDelegate::GetContainingView(WebWidget* webwidget) { + // For test shell, we pack a NativeView pointer into the NativeViewId since + // everything is single process. if (WebWidgetHost* host = GetHostForWidget(webwidget)) - return host->view_handle(); + return gfx::IdFromNativeView(host->view_handle()); return NULL; } diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index d934bcc..65d0723 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -205,7 +205,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, virtual int GetHistoryForwardListCount(); // WebWidgetDelegate - virtual gfx::NativeView GetContainingView(WebWidget* webwidget); + virtual gfx::NativeViewId GetContainingView(WebWidget* webwidget); virtual void DidInvalidateRect(WebWidget* webwidget, const gfx::Rect& rect); virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy, const gfx::Rect& clip_rect); |