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

Side by Side Diff: content/browser/renderer_host/input/content_motion_event_impl.h

Issue 128613003: [Tracking Patch] Unified gesture detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_CONTENT_MOTION_EVENT_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_CONTENT_MOTION_EVENT_IMPL_H_
7
8 #include "content/browser/renderer_host/input/native_web_touch_event.h"
9 #include "ui/events/gesture_detection/motion_event.h"
10
11 namespace content {
12
13 // Content implementation of ui::MotionEvent.
14 class ContentMotionEventImpl : public ui::MotionEvent {
15 public:
16 #if defined(OS_ANDROID)
17 ContentMotionEventImpl(jobject android_motion_event,
18 bool should_recycle,
19 float device_scale_factor);
20 #endif
21 explicit ContentMotionEventImpl(const NativeWebTouchEvent& event);
22 virtual ~ContentMotionEventImpl();
23
24 // ui::MotionEvent
25 virtual Action GetAction() const OVERRIDE;
26 virtual int GetActionIndex() const OVERRIDE;
27 virtual size_t GetPointerCount() const OVERRIDE;
28 virtual int GetPointerId(size_t pointer_index) const OVERRIDE;
29 virtual float GetX(size_t pointer_index) const OVERRIDE;
30 virtual float GetY(size_t pointer_index) const OVERRIDE;
31 virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE;
32 virtual base::TimeTicks GetEventTime() const OVERRIDE;
33 virtual size_t GetHistorySize() const OVERRIDE;
34 virtual base::TimeTicks GetHistoricalEventTime(
35 size_t historical_index) const OVERRIDE;
36 virtual float GetHistoricalTouchMajor(
37 size_t pointer_index,
38 size_t historical_index) const OVERRIDE;
39 virtual float GetHistoricalX(
40 size_t pointer_index,
41 size_t historical_index) const OVERRIDE;
42 virtual float GetHistoricalY(
43 size_t pointer_index,
44 size_t historical_index) const OVERRIDE;
45 virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE;
46 virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE;
47
48 private:
49 NativeWebTouchEvent event_;
50 Action cached_action_;
51 int cached_action_index_;
52
53 DISALLOW_COPY_AND_ASSIGN(ContentMotionEventImpl);
54 };
55
56 } // namespace content
57
58 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_CONTENT_MOTION_EVENT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698