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

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: Make disallow copy private 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_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/WebKeyboardEvent.h" 12 #include "third_party/WebKit/public/platform/WebKeyboardEvent.h"
13 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h" 13 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h"
14 #include "third_party/WebKit/public/platform/WebTouchEvent.h" 14 #include "third_party/WebKit/public/platform/WebTouchEvent.h"
15 15
16 // Provides sensible creation of default WebInputEvents for testing purposes. 16 // Provides sensible creation of default WebInputEvents for testing purposes.
17 17
18 namespace content { 18 namespace content {
19 19
20 class CONTENT_EXPORT SyntheticWebMouseEventBuilder { 20 class CONTENT_EXPORT SyntheticWebMouseEventBuilder {
21 public: 21 public:
22 static blink::WebMouseEvent Build(blink::WebInputEvent::Type type); 22 static blink::WebMouseEvent Build(blink::WebInputEvent::Type type);
23 static blink::WebMouseEvent Build(blink::WebInputEvent::Type type, 23 static blink::WebMouseEvent Build(
24 int window_x, 24 blink::WebInputEvent::Type type,
25 int window_y, 25 int window_x,
26 int modifiers); 26 int window_y,
27 int modifiers,
28 blink::WebPointerProperties::PointerType pointer_type =
29 blink::WebPointerProperties::PointerType::Mouse);
27 }; 30 };
28 31
29 class CONTENT_EXPORT SyntheticWebMouseWheelEventBuilder { 32 class CONTENT_EXPORT SyntheticWebMouseWheelEventBuilder {
30 public: 33 public:
31 static blink::WebMouseWheelEvent Build( 34 static blink::WebMouseWheelEvent Build(
32 blink::WebMouseWheelEvent::Phase phase); 35 blink::WebMouseWheelEvent::Phase phase);
33 static blink::WebMouseWheelEvent Build(float x, 36 static blink::WebMouseWheelEvent Build(float x,
34 float y, 37 float y,
35 float dx, 38 float dx,
36 float dy, 39 float dy,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void CancelPoint(int index); 95 void CancelPoint(int index);
93 96
94 void SetTimestamp(base::TimeTicks timestamp); 97 void SetTimestamp(base::TimeTicks timestamp);
95 98
96 int FirstFreeIndex(); 99 int FirstFreeIndex();
97 }; 100 };
98 101
99 } // namespace content 102 } // namespace content
100 103
101 #endif // CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ 104 #endif // CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_
OLDNEW
« no previous file with comments | « content/common/input/synthetic_gesture_params.h ('k') | content/common/input/synthetic_web_input_event_builders.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698