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

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

Issue 14294003: Touch-initiated drag-out to download file but fails. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to trunk Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/render_widget_host_view_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <InputScope.h> 8 #include <InputScope.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), 404 text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
405 can_compose_inline_(true), 405 can_compose_inline_(true),
406 is_fullscreen_(false), 406 is_fullscreen_(false),
407 ignore_mouse_movement_(true), 407 ignore_mouse_movement_(true),
408 composition_range_(ui::Range::InvalidRange()), 408 composition_range_(ui::Range::InvalidRange()),
409 touch_state_(new WebTouchState(this)), 409 touch_state_(new WebTouchState(this)),
410 pointer_down_context_(false), 410 pointer_down_context_(false),
411 last_touch_location_(-1, -1), 411 last_touch_location_(-1, -1),
412 touch_events_enabled_(false), 412 touch_events_enabled_(false),
413 gesture_recognizer_(ui::GestureRecognizer::Create(this)) { 413 gesture_recognizer_(ui::GestureRecognizer::Create(this)) {
414 in_long_press_gesture_(false) {
414 render_widget_host_->SetView(this); 415 render_widget_host_->SetView(this);
415 registrar_.Add(this, 416 registrar_.Add(this,
416 NOTIFICATION_RENDERER_PROCESS_TERMINATED, 417 NOTIFICATION_RENDERER_PROCESS_TERMINATED,
417 NotificationService::AllBrowserContextsAndSources()); 418 NotificationService::AllBrowserContextsAndSources());
418 } 419 }
419 420
420 RenderWidgetHostViewWin::~RenderWidgetHostViewWin() { 421 RenderWidgetHostViewWin::~RenderWidgetHostViewWin() {
421 UnlockMouse(); 422 UnlockMouse();
422 ResetTooltip(); 423 ResetTooltip();
423 } 424 }
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 handled = FALSE; 1740 handled = FALSE;
1740 return 0; 1741 return 0;
1741 } 1742 }
1742 } 1743 }
1743 1744
1744 LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam, 1745 LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam,
1745 LPARAM lparam, BOOL& handled) { 1746 LPARAM lparam, BOOL& handled) {
1746 TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnMouseEvent"); 1747 TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnMouseEvent");
1747 handled = TRUE; 1748 handled = TRUE;
1748 1749
1750 // Set the long press gesture is invalid once mouse up event is received.
1751 // On Windows, a mouse up event gets triggerred once a touch point is
1752 // removed from screen.
1753 if (message == WM_LBUTTONUP || message == WM_RBUTTONUP)
1754 in_long_press_gesture_ = false;
1755
1749 if (message == WM_MOUSELEAVE) 1756 if (message == WM_MOUSELEAVE)
1750 ignore_mouse_movement_ = true; 1757 ignore_mouse_movement_ = true;
1751 1758
1752 if (mouse_locked_) { 1759 if (mouse_locked_) {
1753 HandleLockedMouseEvent(message, wparam, lparam); 1760 HandleLockedMouseEvent(message, wparam, lparam);
1754 MoveCursorToCenterIfNecessary(); 1761 MoveCursorToCenterIfNecessary();
1755 return 0; 1762 return 0;
1756 } 1763 }
1757 1764
1758 if (::IsWindow(tooltip_hwnd_)) { 1765 if (::IsWindow(tooltip_hwnd_)) {
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
2813 } 2820 }
2814 2821
2815 WebKit::WebGestureEvent web_gesture = CreateWebGestureEvent(m_hWnd, *gesture); 2822 WebKit::WebGestureEvent web_gesture = CreateWebGestureEvent(m_hWnd, *gesture);
2816 if (web_gesture.type == WebKit::WebGestureEvent::Undefined) 2823 if (web_gesture.type == WebKit::WebGestureEvent::Undefined)
2817 return false; 2824 return false;
2818 if (web_gesture.type == WebKit::WebGestureEvent::GestureTapDown) { 2825 if (web_gesture.type == WebKit::WebGestureEvent::GestureTapDown) {
2819 render_widget_host_->ForwardGestureEvent( 2826 render_widget_host_->ForwardGestureEvent(
2820 CreateFlingCancelEvent(gesture->time_stamp().InSecondsF())); 2827 CreateFlingCancelEvent(gesture->time_stamp().InSecondsF()));
2821 } 2828 }
2822 render_widget_host_->ForwardGestureEvent(web_gesture); 2829 render_widget_host_->ForwardGestureEvent(web_gesture);
2830
2831 if (web_gesture.type == WebKit::WebGestureEvent::GestureLongPress)
2832 in_long_press_gesture_ = true;
2833
2823 return true; 2834 return true;
2824 } 2835 }
2825 2836
2826 void RenderWidgetHostViewWin::ForwardMouseEventToRenderer(UINT message, 2837 void RenderWidgetHostViewWin::ForwardMouseEventToRenderer(UINT message,
2827 WPARAM wparam, 2838 WPARAM wparam,
2828 LPARAM lparam) { 2839 LPARAM lparam) {
2829 TRACE_EVENT0("browser", 2840 TRACE_EVENT0("browser",
2830 "RenderWidgetHostViewWin::ForwardMouseEventToRenderer"); 2841 "RenderWidgetHostViewWin::ForwardMouseEventToRenderer");
2831 if (!render_widget_host_) { 2842 if (!render_widget_host_) {
2832 TRACE_EVENT0("browser", "EarlyOut_NoRWH"); 2843 TRACE_EVENT0("browser", "EarlyOut_NoRWH");
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3136 return new RenderWidgetHostViewWin(widget); 3147 return new RenderWidgetHostViewWin(widget);
3137 } 3148 }
3138 3149
3139 // static 3150 // static
3140 void RenderWidgetHostViewPort::GetDefaultScreenInfo( 3151 void RenderWidgetHostViewPort::GetDefaultScreenInfo(
3141 WebKit::WebScreenInfo* results) { 3152 WebKit::WebScreenInfo* results) {
3142 GetScreenInfoForWindow(results, 0); 3153 GetScreenInfoForWindow(results, 0);
3143 } 3154 }
3144 3155
3145 } // namespace content 3156 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.h ('k') | content/browser/web_contents/web_contents_drag_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698