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

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: 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..ccb50aff8e875fedbadbb9e3592f7364206e3081 100644
--- a/Source/core/events/MouseEvent.h
+++ b/Source/core/events/MouseEvent.h
@@ -92,6 +92,11 @@ public:
bool isDragEvent() const final;
int which() const final;
+ void setTrusted(bool trusted) { m_trusted = trusted; }
+ bool isTrusted() const { return m_trusted; }
+
+ PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override;
+
DECLARE_VIRTUAL_TRACE();
protected:
@@ -112,6 +117,7 @@ private:
RefPtrWillBeMember<EventTarget> m_relatedTarget;
PersistentWillBeMember<DataTransfer> m_dataTransfer;
PlatformMouseEvent::SyntheticEventType m_syntheticEventType;
+ unsigned m_trusted : 1;
tkent 2015/07/15 00:09:16 The member name should be |m_isTrusted|.
dtapuska 2015/07/15 01:46:17 Done.
};
class SimulatedMouseEvent final : public MouseEvent {
@@ -127,16 +133,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