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

Unified Diff: components/test_runner/event_sender.h

Issue 1855513002: Consider isPrimary and pointerType when preventing compat mouse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/test_runner/event_sender.cc » ('j') | components/test_runner/event_sender.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/event_sender.h
diff --git a/components/test_runner/event_sender.h b/components/test_runner/event_sender.h
index be4bd7866259e29c860b71fbd6562e1f46bc3fcc..8abb561ddba6cd1596b38a0fba8688535f4c56fb 100644
--- a/components/test_runner/event_sender.h
+++ b/components/test_runner/event_sender.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <map>
#include <queue>
#include <string>
#include <vector>
@@ -61,8 +62,14 @@ class EventSender : public base::SupportsWeakPtr<EventSender> {
void DoDragDrop(const blink::WebDragData&, blink::WebDragOperationsMask);
- void MouseDown(int button_number, int modifiers);
- void MouseUp(int button_number, int modifiers);
+ void MouseDown(int button_number, int modifiers,
+ blink::WebPointerProperties::PointerType =
+ blink::WebPointerProperties::PointerType::Mouse,
+ int pointerId = 0);
+ void MouseUp(int button_number, int modifiers,
+ blink::WebPointerProperties::PointerType =
+ blink::WebPointerProperties::PointerType::Mouse,
+ int pointerId = 0);
void SetMouseButtonState(int button_number, int modifiers);
void KeyDown(const std::string& code_str,
@@ -267,6 +274,21 @@ class EventSender : public base::SupportsWeakPtr<EventSender> {
// Location of the touch point that initiated a gesture.
blink::WebPoint current_gesture_location_;
+
+ // Pen pointer properties
+ typedef struct PenProperties {
dtapuska 2016/04/05 19:21:25 I don't think we need to define structs in c-style
Navid Zolghadr 2016/04/05 20:17:25 Done.
+ blink::WebMouseEvent::Button pressed_button_;
+ int current_buttons_;
+ int modifiers_;
+ blink::WebPoint last_pos_;
+ PenProperties()
+ : pressed_button_(blink::WebMouseEvent::ButtonNone)
+ , current_buttons_(0)
+ , modifiers_(0)
+ , last_pos_(blink::WebPoint(0, 0)) { }
+ } PenProperties;
+ std::map<int, PenProperties> stateOfPen;
dtapuska 2016/04/05 19:21:25 Add a typedef for this map. Can this be an unorder
Navid Zolghadr 2016/04/05 20:17:25 Done.
+
// Last pressed mouse button (Left/Right/Middle or None).
static blink::WebMouseEvent::Button pressed_button_;
« no previous file with comments | « no previous file | components/test_runner/event_sender.cc » ('j') | components/test_runner/event_sender.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698