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

Side by Side Diff: third_party/WebKit/Source/core/events/EventTarget.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 26 matching lines...) Expand all
37 #include "bindings/core/v8/ScriptWrappable.h" 37 #include "bindings/core/v8/ScriptWrappable.h"
38 #include "core/CoreExport.h" 38 #include "core/CoreExport.h"
39 #include "core/EventNames.h" 39 #include "core/EventNames.h"
40 #include "core/EventTargetNames.h" 40 #include "core/EventTargetNames.h"
41 #include "core/EventTypeNames.h" 41 #include "core/EventTypeNames.h"
42 #include "core/events/EventDispatchResult.h" 42 #include "core/events/EventDispatchResult.h"
43 #include "core/events/EventListenerMap.h" 43 #include "core/events/EventListenerMap.h"
44 #include "platform/heap/Handle.h" 44 #include "platform/heap/Handle.h"
45 #include "wtf/Allocator.h" 45 #include "wtf/Allocator.h"
46 #include "wtf/text/AtomicString.h" 46 #include "wtf/text/AtomicString.h"
47 #include <memory>
48 47
49 namespace blink { 48 namespace blink {
50 49
51 class DOMWindow; 50 class DOMWindow;
52 class Event; 51 class Event;
53 class LocalDOMWindow; 52 class LocalDOMWindow;
54 class ExceptionState; 53 class ExceptionState;
55 class MessagePort; 54 class MessagePort;
56 class Node; 55 class Node;
57 56
(...skipping 14 matching lines...) Expand all
72 71
73 class CORE_EXPORT EventTargetData final : public GarbageCollectedFinalized<Event TargetData> { 72 class CORE_EXPORT EventTargetData final : public GarbageCollectedFinalized<Event TargetData> {
74 WTF_MAKE_NONCOPYABLE(EventTargetData); 73 WTF_MAKE_NONCOPYABLE(EventTargetData);
75 public: 74 public:
76 EventTargetData(); 75 EventTargetData();
77 ~EventTargetData(); 76 ~EventTargetData();
78 77
79 DECLARE_TRACE(); 78 DECLARE_TRACE();
80 79
81 EventListenerMap eventListenerMap; 80 EventListenerMap eventListenerMap;
82 std::unique_ptr<FiringEventIteratorVector> firingEventIterators; 81 OwnPtr<FiringEventIteratorVector> firingEventIterators;
83 }; 82 };
84 83
85 // This is the base class for all DOM event targets. To make your class an 84 // This is the base class for all DOM event targets. To make your class an
86 // EventTarget, follow these steps: 85 // EventTarget, follow these steps:
87 // - Make your IDL interface inherit from EventTarget. 86 // - Make your IDL interface inherit from EventTarget.
88 // - Inherit from EventTargetWithInlineData (only in rare cases should you 87 // - Inherit from EventTargetWithInlineData (only in rare cases should you
89 // use EventTarget directly). 88 // use EventTarget directly).
90 // - In your class declaration, EventTargetWithInlineData must come first in 89 // - In your class declaration, EventTargetWithInlineData must come first in
91 // the base class list. If your class is non-final, classes inheriting from 90 // the base class list. If your class is non-final, classes inheriting from
92 // your class need to come first, too. 91 // your class need to come first, too.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 { 255 {
257 EventTargetData* d = eventTargetData(); 256 EventTargetData* d = eventTargetData();
258 if (!d) 257 if (!d)
259 return false; 258 return false;
260 return d->eventListenerMap.containsCapturing(eventType); 259 return d->eventListenerMap.containsCapturing(eventType);
261 } 260 }
262 261
263 } // namespace blink 262 } // namespace blink
264 263
265 #endif // EventTarget_h 264 #endif // EventTarget_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventQueue.h ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698