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

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

Issue 393953012: Eager Gesture Recognition on Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests. Created 6 years, 5 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
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_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 // Update the touch event first. 1911 // Update the touch event first.
1912 blink::WebTouchPoint* point = UpdateWebTouchEventFromUIEvent(*event, 1912 blink::WebTouchPoint* point = UpdateWebTouchEventFromUIEvent(*event,
1913 &touch_event_); 1913 &touch_event_);
1914 1914
1915 // Forward the touch event only if a touch point was updated, and there's a 1915 // Forward the touch event only if a touch point was updated, and there's a
1916 // touch-event handler in the page, and no other touch-event is in the queue. 1916 // touch-event handler in the page, and no other touch-event is in the queue.
1917 // It is important to always consume the event if there is a touch-event 1917 // It is important to always consume the event if there is a touch-event
1918 // handler in the page, or some touch-event is already in the queue, even if 1918 // handler in the page, or some touch-event is already in the queue, even if
1919 // no point has been updated, to make sure that this event does not get 1919 // no point has been updated, to make sure that this event does not get
1920 // processed by the gesture recognizer before the events in the queue. 1920 // processed by the gesture recognizer before the events in the queue.
1921 if (host_->ShouldForwardTouchEvent()) 1921 if (host_->ShouldForwardTouchEvent()) {
1922 if (point && window_->GetHost())
1923 window_->GetHost()->dispatcher()->OnForwardingTouchEvent(event, window_);
sadrul 2014/07/16 21:07:48 Can you explain what OnForwardingTouchEvent does,
tdresser 2014/07/28 18:22:09 Moved to PreDispatchEvent.
1922 event->StopPropagation(); 1924 event->StopPropagation();
1925 }
1923 1926
1924 if (point) { 1927 if (point) {
1925 if (host_->ShouldForwardTouchEvent()) 1928 if (host_->ShouldForwardTouchEvent())
1926 host_->ForwardTouchEventWithLatencyInfo(touch_event_, *event->latency()); 1929 host_->ForwardTouchEventWithLatencyInfo(touch_event_, *event->latency());
1927 UpdateWebTouchEventAfterDispatch(&touch_event_, point); 1930 UpdateWebTouchEventAfterDispatch(&touch_event_, point);
1928 } 1931 }
1929 } 1932 }
1930 1933
1931 void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) { 1934 void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) {
1932 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnGestureEvent"); 1935 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnGestureEvent");
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 2483
2481 //////////////////////////////////////////////////////////////////////////////// 2484 ////////////////////////////////////////////////////////////////////////////////
2482 // RenderWidgetHostViewBase, public: 2485 // RenderWidgetHostViewBase, public:
2483 2486
2484 // static 2487 // static
2485 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2488 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2486 GetScreenInfoForWindow(results, NULL); 2489 GetScreenInfoForWindow(results, NULL);
2487 } 2490 }
2488 2491
2489 } // namespace content 2492 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698