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

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

Issue 2664013002: input: Restrict synthetic touch gesture to view bounds.
Patch Set: Created 3 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
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" 10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 SyntheticGestureParams::GestureSourceType 48 SyntheticGestureParams::GestureSourceType
49 GetDefaultSyntheticGestureSourceType() const override; 49 GetDefaultSyntheticGestureSourceType() const override;
50 50
51 base::TimeDelta PointerAssumedStoppedTime() const override; 51 base::TimeDelta PointerAssumedStoppedTime() const override;
52 52
53 float GetTouchSlopInDips() const override; 53 float GetTouchSlopInDips() const override;
54 54
55 float GetMinScalingSpanInDips() const override; 55 float GetMinScalingSpanInDips() const override;
56 56
57 gfx::Size GetViewSize() const override;
58
57 protected: 59 protected:
58 RenderWidgetHostImpl* render_widget_host() const { return host_; } 60 RenderWidgetHostImpl* render_widget_host() const { return host_; }
59 61
60 private: 62 private:
61 bool PointIsWithinContents(int x, int y) const; 63 bool PointIsWithinContents(int x, int y) const;
62 64
63 RenderWidgetHostImpl* host_; 65 RenderWidgetHostImpl* host_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase); 67 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase);
66 }; 68 };
67 69
68 } // namespace content 70 } // namespace content
69 71
70 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ 72 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698