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

Side by Side Diff: Source/core/events/RelatedEvent.h

Issue 243403006: Implement contextmenu attribute with basic support of <menu> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect HTMLMenuElement as per spec Created 6 years, 4 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
« no previous file with comments | « Source/core/events/Event.cpp ('k') | Source/core/events/RelatedEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef RelatedEvent_h
6 #define RelatedEvent_h
7
8 #include "core/events/Event.h"
9
10 namespace blink {
11
12 struct RelatedEventInit : public EventInit {
13 RelatedEventInit();
14 RefPtrWillBeMember<EventTarget> relatedTarget;
15 };
16
17 class RelatedEvent FINAL : public Event {
18 public:
19 static PassRefPtrWillBeRawPtr<RelatedEvent> create();
20 static PassRefPtrWillBeRawPtr<RelatedEvent> create(const AtomicString& type, bool canBubble, bool cancelable, EventTarget* relatedTarget);
21 static PassRefPtrWillBeRawPtr<RelatedEvent> create(const AtomicString& event Type, const RelatedEventInit&);
22
23 virtual ~RelatedEvent();
24
25 EventTarget* relatedTarget() const { return m_relatedTarget.get(); }
26 void setRelatedTarget(PassRefPtrWillBeRawPtr<EventTarget> relatedTarget) { m _relatedTarget = relatedTarget; }
27
28
29 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam es::RelatedEvent; }
30 virtual bool isRelatedEvent() const OVERRIDE { return true; }
31
32 virtual void trace(Visitor*) OVERRIDE;
33
34 private:
35 RelatedEvent();
36 RelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, Even tTarget*);
37 RelatedEvent(const AtomicString& type, const RelatedEventInit&);
38
39 RefPtrWillBeMember<EventTarget> m_relatedTarget;
40 };
41
42 DEFINE_EVENT_TYPE_CASTS(RelatedEvent);
43
44 } // namespace blink
45
46 #endif // RelatedEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/Event.cpp ('k') | Source/core/events/RelatedEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698