diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-16 23:40:15 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-16 23:40:15 +0000 |
commit | 86a18d9f3b81fc6a7425ae20a84b17786605d762 (patch) | |
tree | 31067e682471b02ce89bff768af78dc0a007c60c /webkit/tools/test_shell/event_sending_controller.cc | |
parent | d4e53eb321385290f47aaeecb041a9e693f9a24f (diff) | |
download | chromium_src-86a18d9f3b81fc6a7425ae20a84b17786605d762.zip chromium_src-86a18d9f3b81fc6a7425ae20a84b17786605d762.tar.gz chromium_src-86a18d9f3b81fc6a7425ae20a84b17786605d762.tar.bz2 |
Revert 41781 - Revert 41769 Fix test_shell so that eventSender works for opened windows. I've also made focus go to the webview, just like what happens in Chrome.
This is needed for https://bugs.webkit.org/show_bug.cgi?id=36147 and also fixes plugins/keyboardevents.html on Windows.
Review URL: http://codereview.chromium.org/1011005
TBR=jam@chromium.org
Review URL: http://codereview.chromium.org/997008
TBR=stuartmorgan@chromium.org
Review URL: http://codereview.chromium.org/990005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/event_sending_controller.cc')
-rw-r--r-- | webkit/tools/test_shell/event_sending_controller.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc index 2ab01a0..9cc100f 100644 --- a/webkit/tools/test_shell/event_sending_controller.cc +++ b/webkit/tools/test_shell/event_sending_controller.cc @@ -60,7 +60,6 @@ using WebKit::WebTouchEvent; using WebKit::WebTouchPoint; using WebKit::WebView; -TestShell* EventSendingController::shell_ = NULL; gfx::Point EventSendingController::last_mouse_pos_; WebMouseEvent::Button EventSendingController::pressed_button_ = WebMouseEvent::ButtonNone; @@ -252,13 +251,8 @@ enum KeyLocationCode { } // anonymous namespace EventSendingController::EventSendingController(TestShell* shell) - : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { - // Set static shell_ variable since we can't do it in an initializer list. - // We also need to be careful not to assign shell_ to new windows which are - // temporary. - if (NULL == shell_) - shell_ = shell; - + : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), + shell_(shell) { // Initialize the map that associates methods of this class with the names // they will use when called by JavaScript. The actual binding of those // names to their methods will be done by calling BindToJavaScript() (defined @@ -338,12 +332,10 @@ void EventSendingController::Reset() { touch_points.clear(); } -// static WebView* EventSendingController::webview() { return shell_->webView(); } -// static void EventSendingController::DoDragDrop(const WebKit::WebPoint &event_pos, const WebDragData& drag_data, WebDragOperationsMask mask) { @@ -451,7 +443,6 @@ void EventSendingController::mouseUp( } } -// static void EventSendingController::DoMouseUp(const WebMouseEvent& e) { webview()->handleInputEvent(e); @@ -530,7 +521,6 @@ void EventSendingController::mouseWheelTo( } } -// static void EventSendingController::DoMouseMove(const WebMouseEvent& e) { last_mouse_pos_.SetPoint(e.x, e.y); |