summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/webwidget_host_win.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 05:33:47 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 05:33:47 +0000
commitcf13bb696f6a50b06930ed8fabb0984cd6af7be9 (patch)
treea883217d4a1eee49750954f851188c5ca6fa6308 /webkit/tools/test_shell/webwidget_host_win.cc
parent05158051ea881677c03a22ddf38a3e6779cebb9e (diff)
downloadchromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.zip
chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.tar.gz
chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.tar.bz2
Reverting 20854.
Review URL: http://codereview.chromium.org/155621 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/webwidget_host_win.cc')
-rw-r--r--webkit/tools/test_shell/webwidget_host_win.cc27
1 files changed, 12 insertions, 15 deletions
diff --git a/webkit/tools/test_shell/webwidget_host_win.cc b/webkit/tools/test_shell/webwidget_host_win.cc
index 66b283e..164a051 100644
--- a/webkit/tools/test_shell/webwidget_host_win.cc
+++ b/webkit/tools/test_shell/webwidget_host_win.cc
@@ -9,11 +9,11 @@
#include "base/win_util.h"
#include "skia/ext/platform_canvas.h"
#include "webkit/api/public/WebInputEvent.h"
-#include "webkit/api/public/WebPopupMenu.h"
#include "webkit/api/public/WebScreenInfo.h"
#include "webkit/api/public/WebSize.h"
#include "webkit/api/public/win/WebInputEventFactory.h"
#include "webkit/api/public/win/WebScreenInfoFactory.h"
+#include "webkit/glue/webwidget.h"
#include "webkit/tools/test_shell/test_shell.h"
using WebKit::WebInputEvent;
@@ -21,18 +21,15 @@ using WebKit::WebInputEventFactory;
using WebKit::WebKeyboardEvent;
using WebKit::WebMouseEvent;
using WebKit::WebMouseWheelEvent;
-using WebKit::WebPopupMenu;
using WebKit::WebScreenInfo;
using WebKit::WebScreenInfoFactory;
using WebKit::WebSize;
-using WebKit::WebWidget;
-using WebKit::WebWidgetClient;
static const wchar_t kWindowClassName[] = L"WebWidgetHost";
/*static*/
WebWidgetHost* WebWidgetHost::Create(HWND parent_view,
- WebWidgetClient* client) {
+ WebWidgetDelegate* delegate) {
WebWidgetHost* host = new WebWidgetHost();
static bool registered_class = false;
@@ -54,7 +51,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view,
parent_view, NULL, GetModuleHandle(NULL), NULL);
win_util::SetWindowUserData(host->view_, host);
- host->webwidget_ = WebPopupMenu::create(client);
+ host->webwidget_ = WebWidget::Create(delegate);
return host;
}
@@ -201,7 +198,7 @@ WebWidgetHost::~WebWidgetHost() {
TrackMouseLeave(false);
- webwidget_->close();
+ webwidget_->Close();
}
bool WebWidgetHost::WndProc(UINT message, WPARAM wparam, LPARAM lparam) {
@@ -235,7 +232,7 @@ void WebWidgetHost::Paint() {
}
// This may result in more invalidation
- webwidget_->layout();
+ webwidget_->Layout();
// Scroll the canvas if necessary
scroll_rect_ = client_rect.Intersect(scroll_rect_);
@@ -285,7 +282,7 @@ void WebWidgetHost::Resize(LPARAM lparam) {
// Force an entire re-paint. TODO(darin): Maybe reuse this memory buffer.
DiscardBackingStore();
- webwidget_->resize(WebSize(LOWORD(lparam), HIWORD(lparam)));
+ webwidget_->Resize(WebSize(LOWORD(lparam), HIWORD(lparam)));
}
void WebWidgetHost::MouseEvent(UINT message, WPARAM wparam, LPARAM lparam) {
@@ -311,30 +308,30 @@ void WebWidgetHost::MouseEvent(UINT message, WPARAM wparam, LPARAM lparam) {
ReleaseCapture();
break;
}
- webwidget_->handleInputEvent(event);
+ webwidget_->HandleInputEvent(&event);
}
void WebWidgetHost::WheelEvent(WPARAM wparam, LPARAM lparam) {
const WebMouseWheelEvent& event = WebInputEventFactory::mouseWheelEvent(
view_, WM_MOUSEWHEEL, wparam, lparam);
- webwidget_->handleInputEvent(event);
+ webwidget_->HandleInputEvent(&event);
}
void WebWidgetHost::KeyEvent(UINT message, WPARAM wparam, LPARAM lparam) {
const WebKeyboardEvent& event = WebInputEventFactory::keyboardEvent(
view_, message, wparam, lparam);
- webwidget_->handleInputEvent(event);
+ webwidget_->HandleInputEvent(&event);
}
void WebWidgetHost::CaptureLostEvent() {
- webwidget_->mouseCaptureLost();
+ webwidget_->MouseCaptureLost();
}
void WebWidgetHost::SetFocus(bool enable) {
// Ignore focus calls in layout test mode so that tests don't mess with each
// other's focus when running in parallel.
if (!TestShell::layout_test_mode())
- webwidget_->setFocus(enable);
+ webwidget_->SetFocus(enable);
}
void WebWidgetHost::TrackMouseLeave(bool track) {
@@ -367,6 +364,6 @@ void WebWidgetHost::PaintRect(const gfx::Rect& rect) {
DCHECK(canvas_.get());
set_painting(true);
- webwidget_->paint(canvas_.get(), rect);
+ webwidget_->Paint(canvas_.get(), rect);
set_painting(false);
}