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

Side by Side Diff: components/exo/touch.h

Issue 2560633002: exo: Implement v6 of touch protocol including shape and frame event (Closed)
Patch Set: extend event_generator to test touch radius Created 4 years 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 | components/exo/touch.cc » ('j') | components/exo/touch.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_EXO_TOUCH_H_ 5 #ifndef COMPONENTS_EXO_TOUCH_H_
6 #define COMPONENTS_EXO_TOUCH_H_ 6 #define COMPONENTS_EXO_TOUCH_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 explicit Touch(TouchDelegate* delegate); 25 explicit Touch(TouchDelegate* delegate);
26 ~Touch() override; 26 ~Touch() override;
27 27
28 // Overridden from ui::EventHandler: 28 // Overridden from ui::EventHandler:
29 void OnTouchEvent(ui::TouchEvent* event) override; 29 void OnTouchEvent(ui::TouchEvent* event) override;
30 30
31 // Overridden from SurfaceObserver: 31 // Overridden from SurfaceObserver:
32 void OnSurfaceDestroying(Surface* surface) override; 32 void OnSurfaceDestroying(Surface* surface) override;
33 33
34 private: 34 private:
35 struct TouchDetails {
36 int id;
37 float major;
38 float minor;
39 };
40
35 // Returns the effective target for |event|. 41 // Returns the effective target for |event|.
36 Surface* GetEffectiveTargetForEvent(ui::Event* event) const; 42 Surface* GetEffectiveTargetForEvent(ui::Event* event) const;
37 43
38 // The delegate instance that all events are dispatched to. 44 // The delegate instance that all events are dispatched to.
39 TouchDelegate* const delegate_; 45 TouchDelegate* const delegate_;
40 46
41 // The current focus surface for the touch device. 47 // The current focus surface for the touch device.
42 Surface* focus_ = nullptr; 48 Surface* focus_ = nullptr;
43 49
44 // Vector of touch points in focus surface. 50 // Vector of touch points in focus surface.
45 std::vector<int> touch_points_; 51 std::vector<TouchDetails> touch_points_;
52
53 // Helper method to find touches of a specific id.
54 std::vector<TouchDetails>::iterator FindTouch(int id);
46 55
47 DISALLOW_COPY_AND_ASSIGN(Touch); 56 DISALLOW_COPY_AND_ASSIGN(Touch);
48 }; 57 };
49 58
50 } // namespace exo 59 } // namespace exo
51 60
52 #endif // COMPONENTS_EXO_TOUCH_H_ 61 #endif // COMPONENTS_EXO_TOUCH_H_
OLDNEW
« no previous file with comments | « no previous file | components/exo/touch.cc » ('j') | components/exo/touch.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698