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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.h

Issue 8341125: Forward Windows touch messages to the renderer (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlapp.h> 10 #include <atlapp.h>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 MESSAGE_HANDLER(WM_SYSKEYDOWN, OnKeyEvent) 134 MESSAGE_HANDLER(WM_SYSKEYDOWN, OnKeyEvent)
135 MESSAGE_HANDLER(WM_SYSKEYUP, OnKeyEvent) 135 MESSAGE_HANDLER(WM_SYSKEYUP, OnKeyEvent)
136 MESSAGE_HANDLER(WM_KEYDOWN, OnKeyEvent) 136 MESSAGE_HANDLER(WM_KEYDOWN, OnKeyEvent)
137 MESSAGE_HANDLER(WM_KEYUP, OnKeyEvent) 137 MESSAGE_HANDLER(WM_KEYUP, OnKeyEvent)
138 MESSAGE_HANDLER(WM_MOUSEWHEEL, OnWheelEvent) 138 MESSAGE_HANDLER(WM_MOUSEWHEEL, OnWheelEvent)
139 MESSAGE_HANDLER(WM_MOUSEHWHEEL, OnWheelEvent) 139 MESSAGE_HANDLER(WM_MOUSEHWHEEL, OnWheelEvent)
140 MESSAGE_HANDLER(WM_HSCROLL, OnWheelEvent) 140 MESSAGE_HANDLER(WM_HSCROLL, OnWheelEvent)
141 MESSAGE_HANDLER(WM_VSCROLL, OnWheelEvent) 141 MESSAGE_HANDLER(WM_VSCROLL, OnWheelEvent)
142 MESSAGE_HANDLER(WM_CHAR, OnKeyEvent) 142 MESSAGE_HANDLER(WM_CHAR, OnKeyEvent)
143 MESSAGE_HANDLER(WM_SYSCHAR, OnKeyEvent) 143 MESSAGE_HANDLER(WM_SYSCHAR, OnKeyEvent)
144 MESSAGE_HANDLER(WM_TOUCH, OnTouchEvent)
144 MESSAGE_HANDLER(WM_IME_CHAR, OnKeyEvent) 145 MESSAGE_HANDLER(WM_IME_CHAR, OnKeyEvent)
145 MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate) 146 MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate)
146 MESSAGE_HANDLER(WM_GETOBJECT, OnGetObject) 147 MESSAGE_HANDLER(WM_GETOBJECT, OnGetObject)
147 MESSAGE_HANDLER(WM_PARENTNOTIFY, OnParentNotify) 148 MESSAGE_HANDLER(WM_PARENTNOTIFY, OnParentNotify)
148 MESSAGE_HANDLER(WM_POINTERDOWN, OnPointerMessage) 149 MESSAGE_HANDLER(WM_POINTERDOWN, OnPointerMessage)
149 MESSAGE_HANDLER(WM_POINTERUP, OnPointerMessage) 150 MESSAGE_HANDLER(WM_POINTERUP, OnPointerMessage)
150 MESSAGE_HANDLER(WM_GESTURE, OnGestureEvent) 151 MESSAGE_HANDLER(WM_GESTURE, OnGestureEvent)
151 END_MSG_MAP() 152 END_MSG_MAP()
152 153
153 // Implementation of RenderWidgetHostView: 154 // Implementation of RenderWidgetHostView:
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 LRESULT OnImeEndComposition( 241 LRESULT OnImeEndComposition(
241 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); 242 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
242 LRESULT OnImeRequest( 243 LRESULT OnImeRequest(
243 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); 244 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
244 LRESULT OnMouseEvent( 245 LRESULT OnMouseEvent(
245 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); 246 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
246 LRESULT OnKeyEvent( 247 LRESULT OnKeyEvent(
247 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); 248 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
248 LRESULT OnWheelEvent( 249 LRESULT OnWheelEvent(
249 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); 250 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
251 LRESULT OnTouchEvent(
252 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
250 LRESULT OnMouseActivate(UINT message, 253 LRESULT OnMouseActivate(UINT message,
251 WPARAM wparam, 254 WPARAM wparam,
252 LPARAM lparam, 255 LPARAM lparam,
253 BOOL& handled); 256 BOOL& handled);
254 // Handle MSAA requests for accessibility information. 257 // Handle MSAA requests for accessibility information.
255 LRESULT OnGetObject(UINT message, WPARAM wparam, LPARAM lparam, 258 LRESULT OnGetObject(UINT message, WPARAM wparam, LPARAM lparam,
256 BOOL& handled); 259 BOOL& handled);
257 // Handle vertical scrolling. 260 // Handle vertical scrolling.
258 LRESULT OnVScroll(int code, short position, HWND scrollbar_control); 261 LRESULT OnVScroll(int code, short position, HWND scrollbar_control);
259 // Handle horizontal scrolling. 262 // Handle horizontal scrolling.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // Do initialization needed by both InitAsPopup() and InitAsFullscreen(). 325 // Do initialization needed by both InitAsPopup() and InitAsFullscreen().
323 void DoPopupOrFullscreenInit(HWND parent_hwnd, 326 void DoPopupOrFullscreenInit(HWND parent_hwnd,
324 const gfx::Rect& pos, 327 const gfx::Rect& pos,
325 DWORD ex_style); 328 DWORD ex_style);
326 329
327 CPoint GetClientCenter() const; 330 CPoint GetClientCenter() const;
328 void MoveCursorToCenter() const; 331 void MoveCursorToCenter() const;
329 332
330 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); 333 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam);
331 334
335 // Copy details from a TOUCHINPUT to an existing WebTouchPoint, returning
336 // true if the resulting point is a stationary move.
337 bool UpdateTouchPoint(WebKit::WebTouchPoint* touch_point,
338 TOUCHINPUT* touch_input);
339
340 // Adds a touch point or returns NULL if there's not enough space.
341 WebKit::WebTouchPoint* AddTouchPoint(TOUCHINPUT* touch_input);
342
343 // Completes a touch event if needed (e.g. due to a focus change)
344 void FinishTouchEvent();
cpu_(ooo_6.6-7.5) 2011/11/08 02:34:04 You are going to hate me but I have the urge to te
jschuh 2011/11/08 17:12:41 Yeah, I was thinking about that but I anticipate s
cpu_(ooo_6.6-7.5) 2011/11/08 19:20:14 I think now it's a good time. If you want you can
345
332 LRESULT OnDocumentFeed(RECONVERTSTRING* reconv); 346 LRESULT OnDocumentFeed(RECONVERTSTRING* reconv);
333 LRESULT OnReconvertString(RECONVERTSTRING* reconv); 347 LRESULT OnReconvertString(RECONVERTSTRING* reconv);
334 348
335 // The associated Model. While |this| is being Destroyed, 349 // The associated Model. While |this| is being Destroyed,
336 // |render_widget_host_| is NULL and the Windows message loop is run one last 350 // |render_widget_host_| is NULL and the Windows message loop is run one last
337 // time. Message handlers must check for a NULL |render_widget_host_|. 351 // time. Message handlers must check for a NULL |render_widget_host_|.
338 RenderWidgetHost* render_widget_host_; 352 RenderWidgetHost* render_widget_host_;
339 353
340 // When we are doing accelerated compositing 354 // When we are doing accelerated compositing
341 HWND compositor_host_window_; 355 HWND compositor_host_window_;
(...skipping 18 matching lines...) Expand all
360 // Represents whether or not this browser process is receiving status 374 // Represents whether or not this browser process is receiving status
361 // messages about the focused edit control from a renderer process. 375 // messages about the focused edit control from a renderer process.
362 bool ime_notification_; 376 bool ime_notification_;
363 377
364 // true if Enter was hit when render widget host was in focus. 378 // true if Enter was hit when render widget host was in focus.
365 bool capture_enter_key_; 379 bool capture_enter_key_;
366 380
367 // true if the View is not visible. 381 // true if the View is not visible.
368 bool is_hidden_; 382 bool is_hidden_;
369 383
384 // The touch-event. Its touch-points are updated as necessary. A new
385 // touch-point is added from an TOUCHEVENTF_DOWN message, and a touch-point
386 // is removed from the list on an TOUCHEVENTF_UP message.
387 WebKit::WebTouchEvent touch_event_;
388
370 // True if we're in the midst of a paint operation and should respond to 389 // True if we're in the midst of a paint operation and should respond to
371 // DidPaintRect() notifications by merely invalidating. See comments on 390 // DidPaintRect() notifications by merely invalidating. See comments on
372 // render_widget_host_view.h:DidPaintRect(). 391 // render_widget_host_view.h:DidPaintRect().
373 bool about_to_validate_and_paint_; 392 bool about_to_validate_and_paint_;
374 393
375 // true if the View should be closed when its HWND is deactivated (used to 394 // true if the View should be closed when its HWND is deactivated (used to
376 // support SELECT popups which are closed when they are deactivated). 395 // support SELECT popups which are closed when they are deactivated).
377 bool close_on_deactivate_; 396 bool close_on_deactivate_;
378 397
379 // Whether Destroy() has been called. Used to detect a crasher 398 // Whether Destroy() has been called. Used to detect a crasher
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // duplicate lbutton down messages to the renderer. 465 // duplicate lbutton down messages to the renderer.
447 bool ignore_next_lbutton_message_at_same_location; 466 bool ignore_next_lbutton_message_at_same_location;
448 // The location of the last WM_POINTERDOWN message. We ignore the subsequent 467 // The location of the last WM_POINTERDOWN message. We ignore the subsequent
449 // lbutton down only if the locations match. 468 // lbutton down only if the locations match.
450 LPARAM last_pointer_down_location_; 469 LPARAM last_pointer_down_location_;
451 470
452 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); 471 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin);
453 }; 472 };
454 473
455 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ 474 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698