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

Side by Side Diff: content/common/input/synthetic_web_input_event_builders.h

Issue 2633233002: Add the pointer type of pen to the synthetic WebMousEvent (Closed)
Patch Set: pen type Created 3 years, 11 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_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ 5 #ifndef CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_
6 #define CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ 6 #define CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/platform/WebGestureEvent.h" 10 #include "third_party/WebKit/public/platform/WebGestureEvent.h"
11 #include "third_party/WebKit/public/platform/WebInputEvent.h" 11 #include "third_party/WebKit/public/platform/WebInputEvent.h"
12 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h" 12 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h"
13 13
14 // Provides sensible creation of default WebInputEvents for testing purposes. 14 // Provides sensible creation of default WebInputEvents for testing purposes.
15 15
16 namespace content { 16 namespace content {
17 17
18 class CONTENT_EXPORT SyntheticWebMouseEventBuilder { 18 class CONTENT_EXPORT SyntheticWebMouseEventBuilder {
19 public: 19 public:
20 static blink::WebMouseEvent Build(blink::WebInputEvent::Type type); 20 static blink::WebMouseEvent Build(blink::WebInputEvent::Type type);
21 static blink::WebMouseEvent Build(blink::WebInputEvent::Type type, 21 static blink::WebMouseEvent Build(
22 int window_x, 22 blink::WebInputEvent::Type type,
23 int window_y, 23 int window_x,
24 int modifiers); 24 int window_y,
25 int modifiers,
26 blink::WebPointerProperties::PointerType pointer_type =
27 blink::WebPointerProperties::PointerType::Mouse);
25 }; 28 };
26 29
27 class CONTENT_EXPORT SyntheticWebMouseWheelEventBuilder { 30 class CONTENT_EXPORT SyntheticWebMouseWheelEventBuilder {
28 public: 31 public:
29 static blink::WebMouseWheelEvent Build( 32 static blink::WebMouseWheelEvent Build(
30 blink::WebMouseWheelEvent::Phase phase); 33 blink::WebMouseWheelEvent::Phase phase);
31 static blink::WebMouseWheelEvent Build(float x, 34 static blink::WebMouseWheelEvent Build(float x,
32 float y, 35 float y,
33 float dx, 36 float dx,
34 float dy, 37 float dy,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void CancelPoint(int index); 93 void CancelPoint(int index);
91 94
92 void SetTimestamp(base::TimeTicks timestamp); 95 void SetTimestamp(base::TimeTicks timestamp);
93 96
94 int FirstFreeIndex(); 97 int FirstFreeIndex();
95 }; 98 };
96 99
97 } // namespace content 100 } // namespace content
98 101
99 #endif // CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ 102 #endif // CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698