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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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>
47 48
48 namespace blink { 49 namespace blink {
49 50
50 class DOMWindow; 51 class DOMWindow;
51 class Event; 52 class Event;
52 class LocalDOMWindow; 53 class LocalDOMWindow;
53 class ExceptionState; 54 class ExceptionState;
54 class MessagePort; 55 class MessagePort;
55 class Node; 56 class Node;
56 57
(...skipping 14 matching lines...) Expand all
71 72
72 class CORE_EXPORT EventTargetData final : public GarbageCollectedFinalized<Event TargetData> { 73 class CORE_EXPORT EventTargetData final : public GarbageCollectedFinalized<Event TargetData> {
73 WTF_MAKE_NONCOPYABLE(EventTargetData); 74 WTF_MAKE_NONCOPYABLE(EventTargetData);
74 public: 75 public:
75 EventTargetData(); 76 EventTargetData();
76 ~EventTargetData(); 77 ~EventTargetData();
77 78
78 DECLARE_TRACE(); 79 DECLARE_TRACE();
79 80
80 EventListenerMap eventListenerMap; 81 EventListenerMap eventListenerMap;
81 OwnPtr<FiringEventIteratorVector> firingEventIterators; 82 std::unique_ptr<FiringEventIteratorVector> firingEventIterators;
82 }; 83 };
83 84
84 // This is the base class for all DOM event targets. To make your class an 85 // This is the base class for all DOM event targets. To make your class an
85 // EventTarget, follow these steps: 86 // EventTarget, follow these steps:
86 // - Make your IDL interface inherit from EventTarget. 87 // - Make your IDL interface inherit from EventTarget.
87 // - Inherit from EventTargetWithInlineData (only in rare cases should you 88 // - Inherit from EventTargetWithInlineData (only in rare cases should you
88 // use EventTarget directly). 89 // use EventTarget directly).
89 // - In your class declaration, EventTargetWithInlineData must come first in 90 // - In your class declaration, EventTargetWithInlineData must come first in
90 // the base class list. If your class is non-final, classes inheriting from 91 // the base class list. If your class is non-final, classes inheriting from
91 // your class need to come first, too. 92 // your class need to come first, too.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 { 256 {
256 EventTargetData* d = eventTargetData(); 257 EventTargetData* d = eventTargetData();
257 if (!d) 258 if (!d)
258 return false; 259 return false;
259 return d->eventListenerMap.containsCapturing(eventType); 260 return d->eventListenerMap.containsCapturing(eventType);
260 } 261 }
261 262
262 } // namespace blink 263 } // namespace blink
263 264
264 #endif // EventTarget_h 265 #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