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

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

Issue 2411143003: Make WebContentsObserver::DidGetUserInteraction fire on TouchStart instead of GestureTapBegin. (Closed)
Patch Set: Created 4 years, 2 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_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 // events are being ignored in order to keep the renderer from getting 1871 // events are being ignored in order to keep the renderer from getting
1872 // confused about how many touches are active. 1872 // confused about how many touches are active.
1873 if (ShouldDropInputEvents() && event.type != WebInputEvent::TouchCancel) 1873 if (ShouldDropInputEvents() && event.type != WebInputEvent::TouchCancel)
1874 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; 1874 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
1875 1875
1876 if (!process_->HasConnection()) 1876 if (!process_->HasConnection())
1877 return INPUT_EVENT_ACK_STATE_UNKNOWN; 1877 return INPUT_EVENT_ACK_STATE_UNKNOWN;
1878 1878
1879 if (delegate_ && (event.type == WebInputEvent::MouseDown || 1879 if (delegate_ && (event.type == WebInputEvent::MouseDown ||
1880 event.type == WebInputEvent::GestureScrollBegin || 1880 event.type == WebInputEvent::GestureScrollBegin ||
1881 event.type == WebInputEvent::GestureTapDown || 1881 event.type == WebInputEvent::TouchStart ||
1882 event.type == WebInputEvent::RawKeyDown)) { 1882 event.type == WebInputEvent::RawKeyDown)) {
1883 delegate_->OnUserInteraction(this, event.type); 1883 delegate_->OnUserInteraction(this, event.type);
1884 } 1884 }
1885 1885
1886 return view_ ? view_->FilterInputEvent(event) 1886 return view_ ? view_->FilterInputEvent(event)
1887 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 1887 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
1888 } 1888 }
1889 1889
1890 void RenderWidgetHostImpl::IncrementInFlightEventCount() { 1890 void RenderWidgetHostImpl::IncrementInFlightEventCount() {
1891 increment_in_flight_event_count(); 1891 increment_in_flight_event_count();
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2210 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2211 } 2211 }
2212 2212
2213 BrowserAccessibilityManager* 2213 BrowserAccessibilityManager*
2214 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2214 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2215 return delegate_ ? 2215 return delegate_ ?
2216 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2216 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2217 } 2217 }
2218 2218
2219 } // namespace content 2219 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/engagement/site_engagement_helper_unittest.cc ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698