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

Unified Diff: Source/core/events/MouseEvent.h

Issue 1227363006: Virtualize EventDispatchMediator creation and cleanup calling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master_event_trusted_main
Patch Set: Rebase Created 5 years, 5 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 | « Source/core/events/KeyboardEvent.cpp ('k') | Source/core/events/MouseEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/MouseEvent.h
diff --git a/Source/core/events/MouseEvent.h b/Source/core/events/MouseEvent.h
index 8c2e2d26902dbd8f4c50b8cefc55917f1e785347..09e599116f149001862e74f3e85fe27f8998af37 100644
--- a/Source/core/events/MouseEvent.h
+++ b/Source/core/events/MouseEvent.h
@@ -92,6 +92,13 @@ public:
bool isDragEvent() const final;
int which() const final;
+ // TODO(dtapuska): Move isTrusted support from MouseEvent
+ // to Event. http://crbug.com/334015
+ void setTrusted(bool trusted) { m_isTrusted = trusted; }
+ bool isTrusted() const { return m_isTrusted; }
+
+ PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override;
+
DECLARE_VIRTUAL_TRACE();
protected:
@@ -112,6 +119,7 @@ private:
RefPtrWillBeMember<EventTarget> m_relatedTarget;
PersistentWillBeMember<DataTransfer> m_dataTransfer;
PlatformMouseEvent::SyntheticEventType m_syntheticEventType;
+ unsigned m_isTrusted : 1;
};
class SimulatedMouseEvent final : public MouseEvent {
@@ -127,16 +135,13 @@ private:
class MouseEventDispatchMediator final : public EventDispatchMediator {
public:
- enum MouseEventType { SyntheticMouseEvent, NonSyntheticMouseEvent};
- static PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> create(PassRefPtrWillBeRawPtr<MouseEvent>, MouseEventType = NonSyntheticMouseEvent);
+ static PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> create(PassRefPtrWillBeRawPtr<MouseEvent>);
private:
- explicit MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent>, MouseEventType);
+ explicit MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent>);
MouseEvent& event() const;
bool dispatchEvent(EventDispatcher&) const override;
- bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMouseEvent; }
- MouseEventType m_mouseEventType;
};
DEFINE_EVENT_TYPE_CASTS(MouseEvent);
« no previous file with comments | « Source/core/events/KeyboardEvent.cpp ('k') | Source/core/events/MouseEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698