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

Side by Side Diff: ui/events/gesture_detection/gesture_provider.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 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
« no previous file with comments | « ui/chromeos/network/network_icon.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/events/gesture_detection/gesture_provider.h" 5 #include "ui/events/gesture_detection/gesture_provider.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 public GestureListener, 81 public GestureListener,
82 public DoubleTapListener { 82 public DoubleTapListener {
83 public: 83 public:
84 GestureListenerImpl(const GestureProvider::Config& config, 84 GestureListenerImpl(const GestureProvider::Config& config,
85 GestureProviderClient* client) 85 GestureProviderClient* client)
86 : config_(config), 86 : config_(config),
87 client_(client), 87 client_(client),
88 gesture_detector_(config.gesture_detector_config, this, this), 88 gesture_detector_(config.gesture_detector_config, this, this),
89 scale_gesture_detector_(config.scale_gesture_detector_config, this), 89 scale_gesture_detector_(config.scale_gesture_detector_config, this),
90 snap_scroll_controller_(config.gesture_detector_config.touch_slop, 90 snap_scroll_controller_(config.gesture_detector_config.touch_slop,
91 config.display.size()), 91 gfx::SizeF(config.display.size())),
92 ignore_multitouch_zoom_events_(false), 92 ignore_multitouch_zoom_events_(false),
93 ignore_single_tap_(false), 93 ignore_single_tap_(false),
94 pinch_event_sent_(false), 94 pinch_event_sent_(false),
95 scroll_event_sent_(false), 95 scroll_event_sent_(false),
96 max_diameter_before_show_press_(0), 96 max_diameter_before_show_press_(0),
97 show_press_event_sent_(false) {} 97 show_press_event_sent_(false) {}
98 98
99 void OnTouchEvent(const MotionEvent& event) { 99 void OnTouchEvent(const MotionEvent& event) {
100 const bool in_scale_gesture = IsScaleGestureDetectionInProgress(); 100 const bool in_scale_gesture = IsScaleGestureDetectionInProgress();
101 snap_scroll_controller_.SetSnapScrollMode(event, in_scale_gesture); 101 snap_scroll_controller_.SetSnapScrollMode(event, in_scale_gesture);
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 // null'ing of the listener until the sequence has ended. 821 // null'ing of the listener until the sequence has ended.
822 if (current_down_event_) 822 if (current_down_event_)
823 return; 823 return;
824 824
825 const bool double_tap_enabled = 825 const bool double_tap_enabled =
826 double_tap_support_for_page_ && double_tap_support_for_platform_; 826 double_tap_support_for_page_ && double_tap_support_for_platform_;
827 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled); 827 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled);
828 } 828 }
829 829
830 } // namespace ui 830 } // namespace ui
OLDNEW
« no previous file with comments | « ui/chromeos/network/network_icon.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698