Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: webkit/tools/test_shell/mac/webwidget_host.mm

Issue 27332: Fixing WebKeyboardEvent. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/tools/test_shell/keyboard_unittest.cc ('k') | webkit/tools/test_shell/test_shell.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "webkit/tools/test_shell/webwidget_host.h" 7 #include "webkit/tools/test_shell/webwidget_host.h"
8 8
9 #include "base/gfx/platform_canvas_mac.h" 9 #include "base/gfx/platform_canvas_mac.h"
10 #include "base/gfx/rect.h" 10 #include "base/gfx/rect.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 void WebWidgetHost::MouseEvent(NSEvent *event) { 215 void WebWidgetHost::MouseEvent(NSEvent *event) {
216 WebMouseEvent web_event(event, view_); 216 WebMouseEvent web_event(event, view_);
217 switch (web_event.type) { 217 switch (web_event.type) {
218 case WebInputEvent::MOUSE_MOVE: 218 case WebInputEvent::MOUSE_MOVE:
219 TrackMouseLeave(true); 219 TrackMouseLeave(true);
220 break; 220 break;
221 case WebInputEvent::MOUSE_LEAVE: 221 case WebInputEvent::MOUSE_LEAVE:
222 TrackMouseLeave(false); 222 TrackMouseLeave(false);
223 break; 223 break;
224 case WebInputEvent::MOUSE_DOWN: 224 default:
225 break;
226 case WebInputEvent::MOUSE_UP:
227 break;
228 case WebInputEvent::MOUSE_DOUBLE_CLICK:
229 case WebInputEvent::MOUSE_WHEEL:
230 case WebInputEvent::KEY_DOWN:
231 case WebInputEvent::KEY_UP:
232 case WebInputEvent::CHAR:
233 break; 225 break;
234 } 226 }
235 webwidget_->HandleInputEvent(&web_event); 227 webwidget_->HandleInputEvent(&web_event);
236 } 228 }
237 229
238 void WebWidgetHost::WheelEvent(NSEvent *event) { 230 void WebWidgetHost::WheelEvent(NSEvent *event) {
239 WebMouseWheelEvent web_event(event, view_); 231 WebMouseWheelEvent web_event(event, view_);
240 webwidget_->HandleInputEvent(&web_event); 232 webwidget_->HandleInputEvent(&web_event);
241 } 233 }
242 234
(...skipping 18 matching lines...) Expand all
261 void WebWidgetHost::PaintRect(const gfx::Rect& rect) { 253 void WebWidgetHost::PaintRect(const gfx::Rect& rect) {
262 #ifndef NDEBUG 254 #ifndef NDEBUG
263 DCHECK(!painting_); 255 DCHECK(!painting_);
264 #endif 256 #endif
265 DCHECK(canvas_.get()); 257 DCHECK(canvas_.get());
266 258
267 set_painting(true); 259 set_painting(true);
268 webwidget_->Paint(canvas_.get(), rect); 260 webwidget_->Paint(canvas_.get(), rect);
269 set_painting(false); 261 set_painting(false);
270 } 262 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/keyboard_unittest.cc ('k') | webkit/tools/test_shell/test_shell.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698