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

Unified Diff: content/browser/renderer_host/input/synthetic_mouse_driver.h

Issue 2634183002: Support multi-button press for synthetic mouse events (Closed)
Patch Set: Refactor 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/synthetic_mouse_driver.h
diff --git a/content/browser/renderer_host/input/synthetic_mouse_driver.h b/content/browser/renderer_host/input/synthetic_mouse_driver.h
index 04a00706411073078cb8d139222fbcb118918cf8..7404d7f29f3d13ceae562a598afdf16bbfafeb22 100644
--- a/content/browser/renderer_host/input/synthetic_mouse_driver.h
+++ b/content/browser/renderer_host/input/synthetic_mouse_driver.h
@@ -20,15 +20,20 @@ class CONTENT_EXPORT SyntheticMouseDriver : public SyntheticPointerDriver {
void DispatchEvent(SyntheticGestureTarget* target,
const base::TimeTicks& timestamp) override;
- void Press(float x, float y, int index = 0) override;
+ void Press(float x, float y, int index = 0, int button = 0) override;
void Move(float x, float y, int index = 0) override;
- void Release(int index = 0) override;
+ void Release(int index = 0, int button = 0) override;
bool UserInputCheck(
const SyntheticPointerActionParams& params) const override;
+ static unsigned GetWebMouseEventModifier(int button);
+ static blink::WebMouseEvent::Button GetWebMouseEventButton(int button);
+
private:
blink::WebMouseEvent mouse_event_;
+ unsigned last_modifiers_;
+
DISALLOW_COPY_AND_ASSIGN(SyntheticMouseDriver);
};

Powered by Google App Engine
This is Rietveld 408576698