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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture_target_aura.cc

Issue 164023004: Set default synthetic gesture source type on aura to be touch event (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/input/synthetic_gesture_target_aura.h" 5 #include "content/browser/renderer_host/input/synthetic_gesture_target_aura.h"
6 6
7 #include "content/browser/renderer_host/render_widget_host_impl.h" 7 #include "content/browser/renderer_host/render_widget_host_impl.h"
8 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 8 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
9 #include "content/browser/renderer_host/ui_events_helper.h" 9 #include "content/browser/renderer_host/ui_events_helper.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 ui::MouseEvent mouse_event(event_type, location, location, flags, flags); 141 ui::MouseEvent mouse_event(event_type, location, location, flags, flags);
142 142
143 ui::EventDispatchDetails details = 143 ui::EventDispatchDetails details =
144 GetWindowEventDispatcher()->OnEventFromSource(&mouse_event); 144 GetWindowEventDispatcher()->OnEventFromSource(&mouse_event);
145 if (details.dispatcher_destroyed) 145 if (details.dispatcher_destroyed)
146 return; 146 return;
147 } 147 }
148 148
149 SyntheticGestureParams::GestureSourceType 149 SyntheticGestureParams::GestureSourceType
150 SyntheticGestureTargetAura::GetDefaultSyntheticGestureSourceType() const { 150 SyntheticGestureTargetAura::GetDefaultSyntheticGestureSourceType() const {
151 return SyntheticGestureParams::MOUSE_INPUT; 151 return SyntheticGestureParams::TOUCH_INPUT;
152 } 152 }
153 153
154 bool SyntheticGestureTargetAura::SupportsSyntheticGestureSourceType( 154 bool SyntheticGestureTargetAura::SupportsSyntheticGestureSourceType(
155 SyntheticGestureParams::GestureSourceType gesture_source_type) const { 155 SyntheticGestureParams::GestureSourceType gesture_source_type) const {
156 return gesture_source_type == SyntheticGestureParams::TOUCH_INPUT || 156 return gesture_source_type == SyntheticGestureParams::TOUCH_INPUT ||
157 gesture_source_type == SyntheticGestureParams::MOUSE_INPUT; 157 gesture_source_type == SyntheticGestureParams::MOUSE_INPUT;
158 } 158 }
159 159
160 int SyntheticGestureTargetAura::GetTouchSlopInDips() const { 160 int SyntheticGestureTargetAura::GetTouchSlopInDips() const {
161 // - 1 because Aura considers a pointer to be moving if it has moved at least 161 // - 1 because Aura considers a pointer to be moving if it has moved at least
(...skipping 17 matching lines...) Expand all
179 aura::client::ScreenPositionClient* 179 aura::client::ScreenPositionClient*
180 SyntheticGestureTargetAura::GetScreenPositionClient() const { 180 SyntheticGestureTargetAura::GetScreenPositionClient() const {
181 aura::Window* root_window = GetWindow()->GetRootWindow(); 181 aura::Window* root_window = GetWindow()->GetRootWindow();
182 aura::client::ScreenPositionClient* position_client = 182 aura::client::ScreenPositionClient* position_client =
183 aura::client::GetScreenPositionClient(root_window); 183 aura::client::GetScreenPositionClient(root_window);
184 DCHECK(position_client); 184 DCHECK(position_client);
185 return position_client; 185 return position_client;
186 } 186 }
187 187
188 } // namespace content 188 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698