summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/gfx/native_widget_types.h33
-rw-r--r--chrome/browser/resource_message_filter.cc2
-rw-r--r--chrome/browser/resource_message_filter.h2
-rw-r--r--chrome/common/render_messages_internal.h2
-rw-r--r--chrome/renderer/renderer_glue.cc2
-rw-r--r--webkit/glue/webkit_glue.h4
-rw-r--r--webkit/glue/webkit_glue_gtk.cc2
-rw-r--r--webkit/glue/webkit_glue_win.cc2
-rw-r--r--webkit/glue/webwidget_delegate.h2
-rw-r--r--webkit/port/platform/chromium/PlatformWidget.h2
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc2
-rw-r--r--webkit/tools/test_shell/test_shell.cc2
-rw-r--r--webkit/tools/test_shell/test_shell.h22
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm8
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc4
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_gtk.cc2
-rw-r--r--webkit/tools/test_shell/webview_host.h6
-rw-r--r--webkit/tools/test_shell/webview_host_win.cc2
-rw-r--r--webkit/tools/test_shell/webwidget_host.h16
-rw-r--r--webkit/tools/test_shell/webwidget_host_gtk.cc6
-rw-r--r--webkit/tools/test_shell/webwidget_host_win.cc4
24 files changed, 72 insertions, 63 deletions
diff --git a/base/gfx/native_widget_types.h b/base/gfx/native_widget_types.h
index b711b27..1f696b0 100644
--- a/base/gfx/native_widget_types.h
+++ b/base/gfx/native_widget_types.h
@@ -7,6 +7,17 @@
#include "build/build_config.h"
+// This file provides cross platform typedefs for native widget types.
+// NativeWindow: this is a handle to a native, top-level window
+// NativeView: this is a handle to a native UI element. It may be the
+// same type as a NativeWindow on some platforms.
+// NativeEditView: a handle to a native edit-box. The Mac folks wanted
+// this specific typedef.
+//
+// The name 'View' here meshes with OS X where the UI elements are called
+// 'views' and with our Chrome UI code where the elements are also called
+// 'views'.
+
#if defined(OS_WIN)
#include <windows.h>
#elif defined(OS_MACOSX)
@@ -26,21 +37,19 @@ typedef struct _GtkWidget GtkWidget;
namespace gfx {
#if defined(OS_WIN)
-typedef HWND ViewHandle;
-typedef HWND WindowHandle;
-typedef HWND EditViewHandle;
+typedef HWND NativeView;
+typedef HWND NativeWindow;
+typedef HWND NativeEditView;
#elif defined(OS_MACOSX)
-typedef NSView *ViewHandle;
-typedef NSWindow *WindowHandle;
-typedef NSTextField *EditViewHandle;
+typedef NSView* NativeView;
+typedef NSWindow* NativeWindow;
+typedef NSTextField* NativeEditView;
#elif defined(OS_LINUX)
-typedef GtkWidget* ViewHandle;
-typedef GtkWidget* WindowHandle;
-typedef GtkWidget* EditViewHandle;
+typedef GtkWidget* NativeView;
+typedef GtkWidget* NativeWindow;
+typedef GtkWidget* NativeEditView;
#else // null port.
-typedef void* ViewHandle;
-typedef void* WindowHandle;
-typedef void* EditViewHandle;
+#error No known OS defined
#endif
} // namespace gfx
diff --git a/chrome/browser/resource_message_filter.cc b/chrome/browser/resource_message_filter.cc
index 7a91075..a674628 100644
--- a/chrome/browser/resource_message_filter.cc
+++ b/chrome/browser/resource_message_filter.cc
@@ -386,7 +386,7 @@ void ResourceMessageFilter::OnLoadFont(LOGFONT font) {
}
void ResourceMessageFilter::OnGetScreenInfo(
- gfx::ViewHandle window, webkit_glue::ScreenInfo* results) {
+ gfx::NativeView window, webkit_glue::ScreenInfo* results) {
*results = webkit_glue::GetScreenInfoHelper(window);
}
diff --git a/chrome/browser/resource_message_filter.h b/chrome/browser/resource_message_filter.h
index 0fd3cce..0322953 100644
--- a/chrome/browser/resource_message_filter.h
+++ b/chrome/browser/resource_message_filter.h
@@ -101,7 +101,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter,
// Cache fonts for the renderer. See ResourceMessageFilter::OnLoadFont
// implementation for more details
void OnLoadFont(LOGFONT font);
- void OnGetScreenInfo(gfx::ViewHandle window,
+ void OnGetScreenInfo(gfx::NativeView window,
webkit_glue::ScreenInfo* results);
void OnGetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins);
void OnGetPluginPath(const GURL& url,
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 96d7d89..a852732 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -826,7 +826,7 @@ IPC_BEGIN_MESSAGES(ViewHost, 2)
// Returns ScreenInfo corresponding to the given window.
IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetScreenInfo,
- gfx::ViewHandle /* window */,
+ gfx::NativeView /* window */,
webkit_glue::ScreenInfo /* results */)
// Send the tooltip text for the current mouse position to the browser.
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index 1fafed2..35f2a73 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -245,7 +245,7 @@ bool webkit_glue::EnsureFontLoaded(HFONT font) {
return RenderThread::current()->Send(new ViewHostMsg_LoadFont(logfont));
}
-webkit_glue::ScreenInfo webkit_glue::GetScreenInfo(gfx::ViewHandle window) {
+webkit_glue::ScreenInfo webkit_glue::GetScreenInfo(gfx::NativeView window) {
webkit_glue::ScreenInfo results;
RenderThread::current()->Send(
new ViewHostMsg_GetScreenInfo(window, &results));
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index 8b311cb..51e60e5 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -74,7 +74,7 @@ void EnableWebCoreNotImplementedLogging();
// Returns screen information corresponding to the given window. This is the
// default implementation.
-ScreenInfo GetScreenInfoHelper(gfx::ViewHandle window);
+ScreenInfo GetScreenInfoHelper(gfx::NativeView window);
// Returns the text of the document element.
std::wstring DumpDocumentText(WebFrame* web_frame);
@@ -237,7 +237,7 @@ bool EnsureFontLoaded(HFONT font);
#endif
// Returns screen information corresponding to the given window.
-ScreenInfo GetScreenInfo(gfx::ViewHandle window);
+ScreenInfo GetScreenInfo(gfx::NativeView window);
// Functions implemented by webkit_glue for WebKit ----------------------------
diff --git a/webkit/glue/webkit_glue_gtk.cc b/webkit/glue/webkit_glue_gtk.cc
index 2cf8974..41fdc73 100644
--- a/webkit/glue/webkit_glue_gtk.cc
+++ b/webkit/glue/webkit_glue_gtk.cc
@@ -8,7 +8,7 @@
namespace webkit_glue {
-ScreenInfo GetScreenInfoHelper(gfx::ViewHandle window) {
+ScreenInfo GetScreenInfoHelper(gfx::NativeView window) {
GdkScreen* screen = gtk_widget_get_screen(GTK_WIDGET(window));
GdkVisual* visual = gdk_screen_get_system_visual(screen);
diff --git a/webkit/glue/webkit_glue_win.cc b/webkit/glue/webkit_glue_win.cc
index 107a569..eeb6cbb 100644
--- a/webkit/glue/webkit_glue_win.cc
+++ b/webkit/glue/webkit_glue_win.cc
@@ -6,7 +6,7 @@
namespace webkit_glue {
-ScreenInfo GetScreenInfoHelper(gfx::ViewHandle window) {
+ScreenInfo GetScreenInfoHelper(gfx::NativeView window) {
HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY);
MONITORINFOEX monitor_info;
diff --git a/webkit/glue/webwidget_delegate.h b/webkit/glue/webwidget_delegate.h
index 3302c5d..445cb92 100644
--- a/webkit/glue/webwidget_delegate.h
+++ b/webkit/glue/webwidget_delegate.h
@@ -20,7 +20,7 @@ struct WebPluginGeometry;
class WebWidgetDelegate {
public:
// Returns the view in which the WebWidget is embedded.
- virtual gfx::ViewHandle GetContainingWindow(WebWidget* webwidget) = 0;
+ virtual gfx::NativeView GetContainingWindow(WebWidget* webwidget) = 0;
// Called when a region of the WebWidget needs to be re-painted.
virtual void DidInvalidateRect(WebWidget* webwidget, const gfx::Rect& rect) = 0;
diff --git a/webkit/port/platform/chromium/PlatformWidget.h b/webkit/port/platform/chromium/PlatformWidget.h
index 8751657..5012eae 100644
--- a/webkit/port/platform/chromium/PlatformWidget.h
+++ b/webkit/port/platform/chromium/PlatformWidget.h
@@ -32,6 +32,6 @@
#include "base/gfx/native_widget_types.h"
-typedef gfx::ViewHandle PlatformWidget;
+typedef gfx::NativeView PlatformWidget;
#endif
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 79494b2..96a7865 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -374,7 +374,7 @@ void LayoutTestController::Reset() {
// shell. We don't want to delete elements as we're iterating, so we copy
// to a temp vector first.
WindowList* windows = TestShell::windowList();
- std::vector<gfx::WindowHandle> windows_to_delete;
+ std::vector<gfx::NativeWindow> windows_to_delete;
for (WindowList::iterator i = windows->begin(); i != windows->end(); ++i) {
if (*i != shell_->mainWnd())
windows_to_delete.push_back(*i);
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 7679265..e661066 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -300,7 +300,7 @@ void TestShell::ResetWebPreferences() {
}
// static
-bool TestShell::RemoveWindowFromList(gfx::WindowHandle window) {
+bool TestShell::RemoveWindowFromList(gfx::NativeWindow window) {
WindowList::iterator entry =
std::find(TestShell::windowList()->begin(),
TestShell::windowList()->end(),
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index ef9de09..5e6a8da 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -45,7 +45,7 @@
#include "webkit/tools/test_shell/webview_host.h"
#include "webkit/tools/test_shell/webwidget_host.h"
-typedef std::list<gfx::WindowHandle> WindowList;
+typedef std::list<gfx::NativeWindow> WindowList;
struct WebPreferences;
class TestNavigationEntry;
@@ -162,10 +162,10 @@ public:
void DumpDocumentText();
void DumpRenderTree();
- gfx::WindowHandle mainWnd() const { return m_mainWnd; }
- gfx::ViewHandle webViewWnd() const { return m_webViewHost->view_handle(); }
- gfx::EditViewHandle editWnd() const { return m_editWnd; }
- gfx::ViewHandle popupWnd() const { return m_popupHost->view_handle(); }
+ gfx::NativeWindow mainWnd() const { return m_mainWnd; }
+ gfx::NativeView webViewWnd() const { return m_webViewHost->view_handle(); }
+ gfx::NativeEditView editWnd() const { return m_editWnd; }
+ gfx::NativeView popupWnd() const { return m_popupHost->view_handle(); }
static WindowList* windowList() { return window_list_; }
@@ -173,11 +173,11 @@ public:
static bool CreateNewWindow(const std::wstring& startingURL,
TestShell** shell = NULL);
- static void DestroyWindow(gfx::WindowHandle windowHandle);
+ static void DestroyWindow(gfx::NativeWindow windowHandle);
// Remove the given window from window_list_, return true if it was in the
// list and was removed and false otherwise.
- static bool RemoveWindowFromList(gfx::WindowHandle window);
+ static bool RemoveWindowFromList(gfx::NativeWindow window);
// Implements CreateWebView for TestWebViewDelegate, which in turn
// is called as a WebViewDelegate.
@@ -246,7 +246,7 @@ public:
#if defined(OS_MACOSX)
// handle cleaning up a shell given the associated window
- static void DestroyAssociatedShell(gfx::WindowHandle handle);
+ static void DestroyAssociatedShell(gfx::NativeWindow handle);
#endif
// Show the "attach to me" dialog, for debugging test shell startup.
@@ -272,8 +272,8 @@ protected:
#endif
protected:
- gfx::WindowHandle m_mainWnd;
- gfx::EditViewHandle m_editWnd;
+ gfx::NativeWindow m_mainWnd;
+ gfx::NativeEditView m_editWnd;
scoped_ptr<WebViewHost> m_webViewHost;
WebWidgetHost* m_popupHost;
#if defined(OS_WIN)
@@ -287,7 +287,7 @@ private:
// A set of all our windows.
static WindowList* window_list_;
#if defined(OS_MACOSX)
- static base::LazyInstance<std::map<gfx::WindowHandle, TestShell *> >
+ static base::LazyInstance<std::map<gfx::NativeWindow, TestShell *> >
window_map_;
#endif
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index 35b4e69..ba2c405 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -308,7 +308,7 @@ void TestShell::InteractiveSetFocus(WebWidgetHost* host, bool enable) {
}
}
-void TestShell::DestroyWindow(gfx::WindowHandle windowHandle) {
+void TestShell::DestroyWindow(gfx::NativeWindow windowHandle) {
RemoveWindowFromList(windowHandle);
gtk_widget_destroy(windowHandle);
}
@@ -719,7 +719,7 @@ bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
return false;
}
-ScreenInfo GetScreenInfo(gfx::ViewHandle window) {
+ScreenInfo GetScreenInfo(gfx::NativeView window) {
return GetScreenInfoHelper(window);
}
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index 403f1f0..bf6ca2a 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -59,7 +59,7 @@ const int kTestWindowXLocation = -14000;
const int kTestWindowYLocation = -14000;
// Define static member variables
-base::LazyInstance <std::map<gfx::WindowHandle, TestShell *> >
+base::LazyInstance <std::map<gfx::NativeWindow, TestShell *> >
TestShell::window_map_(base::LINKER_INITIALIZED);
// Receives notification that the window is closing so that it can start the
@@ -107,7 +107,7 @@ void TestShell::PlatformCleanUp() {
}
// static
-void TestShell::DestroyAssociatedShell(gfx::WindowHandle handle) {
+void TestShell::DestroyAssociatedShell(gfx::NativeWindow handle) {
TestShell* shell = window_map_.Get()[handle];
if (shell)
window_map_.Get().erase(handle);
@@ -407,7 +407,7 @@ bool TestShell::CreateNewWindow(const std::wstring& startingURL,
}
// static
-void TestShell::DestroyWindow(gfx::WindowHandle windowHandle) {
+void TestShell::DestroyWindow(gfx::NativeWindow windowHandle) {
TestShell::RemoveWindowFromList(windowHandle);
[windowHandle close];
}
@@ -690,7 +690,7 @@ bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
return false; // NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins);
}
-ScreenInfo GetScreenInfo(gfx::ViewHandle window) {
+ScreenInfo GetScreenInfo(gfx::NativeView window) {
// This should call GetScreenInfoHelper, which should be implemented in
// webkit_glue_mac.mm
NOTIMPLEMENTED();
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index 787ac1a..b8c1870 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -167,7 +167,7 @@ bool TestShell::CreateNewWindow(const std::wstring& startingURL,
return rv;
}
-void TestShell::DestroyWindow(gfx::WindowHandle windowHandle) {
+void TestShell::DestroyWindow(gfx::NativeWindow windowHandle) {
// Do we want to tear down some of the machinery behind the scenes too?
RemoveWindowFromList(windowHandle);
::DestroyWindow(windowHandle);
@@ -768,7 +768,7 @@ bool DownloadUrl(const std::string& url, HWND caller_window) {
return false;
}
-ScreenInfo GetScreenInfo(gfx::ViewHandle window) {
+ScreenInfo GetScreenInfo(gfx::NativeView window) {
return GetScreenInfoHelper(window);
}
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 19354f6..9e79b30 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -634,7 +634,7 @@ void TestWebViewDelegate::SetUserStyleSheetLocation(const GURL& location) {
// WebWidgetDelegate ---------------------------------------------------------
-gfx::ViewHandle TestWebViewDelegate::GetContainingWindow(WebWidget* webwidget) {
+gfx::NativeView TestWebViewDelegate::GetContainingWindow(WebWidget* webwidget) {
if (WebWidgetHost* host = GetHostForWidget(webwidget))
return host->view_handle();
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index febbefa..c559b1e 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -206,7 +206,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
virtual int GetHistoryForwardListCount();
// WebWidgetDelegate
- virtual gfx::ViewHandle GetContainingWindow(WebWidget* webwidget);
+ virtual gfx::NativeView GetContainingWindow(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);
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
index 3b0bf82..6db73b4 100644
--- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
@@ -82,7 +82,7 @@ WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
}
void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) {
- // TODO(port): remove GTK_WINDOW bit after gfx::WindowHandle is fixed.
+ // TODO(port): remove GTK_WINDOW bit after gfx::NativeWindow is fixed.
GtkWidget* dialog = gtk_message_dialog_new(
GTK_WINDOW(shell_->mainWnd()), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO,
GTK_BUTTONS_OK, "%s", WideToUTF8(message).c_str());
diff --git a/webkit/tools/test_shell/webview_host.h b/webkit/tools/test_shell/webview_host.h
index 9a1e719..86dba37 100644
--- a/webkit/tools/test_shell/webview_host.h
+++ b/webkit/tools/test_shell/webview_host.h
@@ -15,13 +15,13 @@ struct WebPreferences;
class WebView;
class WebViewDelegate;
-// This class is a simple ViewHandle-based host for a WebView
+// This class is a simple NativeView-based host for a WebView
class WebViewHost : public WebWidgetHost {
public:
- // The new instance is deleted once the associated ViewHandle is destroyed.
+ // The new instance is deleted once the associated NativeView is destroyed.
// The newly created window should be resized after it is created, using the
// MoveWindow (or equivalent) function.
- static WebViewHost* Create(gfx::WindowHandle parent_window,
+ static WebViewHost* Create(gfx::NativeWindow parent_window,
WebViewDelegate* delegate,
const WebPreferences& prefs);
diff --git a/webkit/tools/test_shell/webview_host_win.cc b/webkit/tools/test_shell/webview_host_win.cc
index 5b13a7b..899ce31 100644
--- a/webkit/tools/test_shell/webview_host_win.cc
+++ b/webkit/tools/test_shell/webview_host_win.cc
@@ -14,7 +14,7 @@
static const wchar_t kWindowClassName[] = L"WebViewHost";
/*static*/
-WebViewHost* WebViewHost::Create(gfx::WindowHandle parent_window,
+WebViewHost* WebViewHost::Create(gfx::NativeWindow parent_window,
WebViewDelegate* delegate,
const WebPreferences& prefs) {
WebViewHost* host = new WebViewHost();
diff --git a/webkit/tools/test_shell/webwidget_host.h b/webkit/tools/test_shell/webwidget_host.h
index cb6c3f1..0b4e197 100644
--- a/webkit/tools/test_shell/webwidget_host.h
+++ b/webkit/tools/test_shell/webwidget_host.h
@@ -18,21 +18,21 @@ namespace gfx {
class Size;
}
-// This class is a simple ViewHandle-based host for a WebWidget
+// This class is a simple NativeView-based host for a WebWidget
class WebWidgetHost {
public:
- // The new instance is deleted once the associated ViewHandle is destroyed.
+ // The new instance is deleted once the associated NativeView is destroyed.
// The newly created window should be resized after it is created, using the
// MoveWindow (or equivalent) function.
- static WebWidgetHost* Create(gfx::WindowHandle parent_window,
+ static WebWidgetHost* Create(gfx::NativeWindow parent_window,
WebWidgetDelegate* delegate);
- static WebWidgetHost* FromWindow(gfx::WindowHandle view);
+ static WebWidgetHost* FromWindow(gfx::NativeWindow view);
#if defined(OS_MACOSX)
- static void HandleEvent(gfx::WindowHandle window, NSEvent *event);
+ static void HandleEvent(gfx::NativeWindow window, NSEvent *event);
#endif
- gfx::ViewHandle view_handle() const { return view_; }
+ gfx::NativeView view_handle() const { return view_; }
WebWidget* webwidget() const { return webwidget_; }
void DidInvalidateRect(const gfx::Rect& rect);
@@ -83,7 +83,7 @@ class WebWidgetHost {
// parent: a GtkBox to pack the new widget at the end of
// host: a pointer to a WebWidgetHost (or subclass thereof)
// ---------------------------------------------------------------------------
- static gfx::WindowHandle CreateWindow(gfx::WindowHandle parent, void* host);
+ static gfx::NativeWindow CreateWindow(gfx::NativeWindow parent, void* host);
void WindowDestroyed();
void Resize(const gfx::Size& size);
#endif
@@ -98,7 +98,7 @@ class WebWidgetHost {
#endif
}
- gfx::ViewHandle view_;
+ gfx::NativeView view_;
WebWidget* webwidget_;
scoped_ptr<gfx::PlatformCanvas> canvas_;
diff --git a/webkit/tools/test_shell/webwidget_host_gtk.cc b/webkit/tools/test_shell/webwidget_host_gtk.cc
index 389fd61..2e525b5 100644
--- a/webkit/tools/test_shell/webwidget_host_gtk.cc
+++ b/webkit/tools/test_shell/webwidget_host_gtk.cc
@@ -118,7 +118,7 @@ gboolean MouseScrollEvent(GtkWidget* widget, GdkEventScroll* event,
// -----------------------------------------------------------------------------
-gfx::WindowHandle WebWidgetHost::CreateWindow(gfx::WindowHandle box,
+gfx::NativeWindow WebWidgetHost::CreateWindow(gfx::NativeWindow box,
void* host) {
GtkWidget* widget = gtk_drawing_area_new();
gtk_box_pack_start(GTK_BOX(box), widget, TRUE, TRUE, 0);
@@ -152,7 +152,7 @@ gfx::WindowHandle WebWidgetHost::CreateWindow(gfx::WindowHandle box,
return widget;
}
-WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle box,
+WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow box,
WebWidgetDelegate* delegate) {
WebWidgetHost* host = new WebWidgetHost();
host->view_ = CreateWindow(box, host);
@@ -185,7 +185,7 @@ void WebWidgetHost::DidScrollRect(int dx, int dy, const gfx::Rect& clip_rect) {
DidInvalidateRect(clip_rect);
}
-WebWidgetHost* FromWindow(gfx::WindowHandle view) {
+WebWidgetHost* FromWindow(gfx::NativeWindow view) {
const gpointer p = g_object_get_data(G_OBJECT(view), "webwidgethost");
return (WebWidgetHost* ) p;
}
diff --git a/webkit/tools/test_shell/webwidget_host_win.cc b/webkit/tools/test_shell/webwidget_host_win.cc
index 6783b91..efe4d8b 100644
--- a/webkit/tools/test_shell/webwidget_host_win.cc
+++ b/webkit/tools/test_shell/webwidget_host_win.cc
@@ -15,7 +15,7 @@
static const wchar_t kWindowClassName[] = L"WebWidgetHost";
/*static*/
-WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle parent_window,
+WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window,
WebWidgetDelegate* delegate) {
WebWidgetHost* host = new WebWidgetHost();
@@ -45,7 +45,7 @@ WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle parent_window,
}
/*static*/
-WebWidgetHost* WebWidgetHost::FromWindow(gfx::WindowHandle hwnd) {
+WebWidgetHost* WebWidgetHost::FromWindow(gfx::NativeWindow hwnd) {
return reinterpret_cast<WebWidgetHost*>(win_util::GetWindowUserData(hwnd));
}