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

Side by Side Diff: Source/WebCore/bindings/dart/DartDOMData.h

Issue 10745003: Properly retain non-node event listeners. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: . Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/WebCore/bindings/dart/DartDOMWrapper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 27 matching lines...) Expand all
38 #include <wtf/HashSet.h> 38 #include <wtf/HashSet.h>
39 #include <wtf/RefPtr.h> 39 #include <wtf/RefPtr.h>
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 class ActiveDOMObject; 43 class ActiveDOMObject;
44 class DOMWindow; 44 class DOMWindow;
45 class DartApplicationLoader; 45 class DartApplicationLoader;
46 class DartEventListener; 46 class DartEventListener;
47 class DartWeakCallback; 47 class DartWeakCallback;
48 class EventTarget;
48 class MessagePort; 49 class MessagePort;
49 class Node; 50 class Node;
50 class ScriptExecutionContext; 51 class ScriptExecutionContext;
51 52
52 typedef HashMap<Node*, Dart_Handle> DartDOMNodeMap; 53 typedef HashMap<Node*, Dart_Handle> DartDOMNodeMap;
53 typedef HashMap<void*, Dart_Handle> DartDOMObjectMap; 54 typedef HashMap<void*, Dart_Handle> DartDOMObjectMap;
54 typedef HashMap<MessagePort*, Dart_Handle> DartMessagePortMap; 55 typedef HashMap<MessagePort*, Dart_Handle> DartMessagePortMap;
55 typedef HashMap<ActiveDOMObject*, Dart_Handle> DartActiveDOMObjectMap; 56 typedef HashMap<ActiveDOMObject*, Dart_Handle> DartActiveDOMObjectMap;
57 typedef HashMap<EventTarget*, Dart_Handle> DartEventTargetMap;
56 typedef HashSet<DartWeakCallback*> DartWeakCallbacks; 58 typedef HashSet<DartWeakCallback*> DartWeakCallbacks;
57 59
58 class DartDOMData { 60 class DartDOMData {
59 public: 61 public:
60 DartDOMData(PassRefPtr<DartApplicationLoader>, ScriptExecutionContext*); 62 DartDOMData(PassRefPtr<DartApplicationLoader>, ScriptExecutionContext*);
61 ~DartDOMData(); 63 ~DartDOMData();
62 64
63 PassRefPtr<DartApplicationLoader> applicationLoader(); 65 PassRefPtr<DartApplicationLoader> applicationLoader();
64 ScriptExecutionContext* scriptExecutionContext() { return m_scriptExecutionC ontext; } 66 ScriptExecutionContext* scriptExecutionContext() { return m_scriptExecutionC ontext; }
65 67
66 int* recursion() { return &m_recursion; } 68 int* recursion() { return &m_recursion; }
67 DartStringCache& stringCache() { return m_stringCache; } 69 DartStringCache& stringCache() { return m_stringCache; }
68 70
69 DartDOMNodeMap* nodeMap() { return &m_nodeMap; } 71 DartDOMNodeMap* nodeMap() { return &m_nodeMap; }
70 DartDOMObjectMap* objectMap() { return &m_objectMap; } 72 DartDOMObjectMap* objectMap() { return &m_objectMap; }
71 DartMessagePortMap* messagePortMap() { return &m_messagePortMap; } 73 DartMessagePortMap* messagePortMap() { return &m_messagePortMap; }
72 DartActiveDOMObjectMap* activeObjectMap() { return &m_activeObjectMap; } 74 DartActiveDOMObjectMap* activeObjectMap() { return &m_activeObjectMap; }
75 DartEventTargetMap* eventTargetMap() { return &m_eventTargetMap; }
73 DartWeakCallbacks* weakCallbacks() { return &m_weakCallbacks; } 76 DartWeakCallbacks* weakCallbacks() { return &m_weakCallbacks; }
74 77
75 private: 78 private:
76 RefPtr<DartApplicationLoader> m_applicationLoader; 79 RefPtr<DartApplicationLoader> m_applicationLoader;
77 ScriptExecutionContext* m_scriptExecutionContext; 80 ScriptExecutionContext* m_scriptExecutionContext;
78 int m_recursion; 81 int m_recursion;
79 DartStringCache m_stringCache; 82 DartStringCache m_stringCache;
80 83
81 DartDOMNodeMap m_nodeMap; 84 DartDOMNodeMap m_nodeMap;
82 DartDOMObjectMap m_objectMap; 85 DartDOMObjectMap m_objectMap;
83 DartMessagePortMap m_messagePortMap; 86 DartMessagePortMap m_messagePortMap;
84 DartActiveDOMObjectMap m_activeObjectMap; 87 DartActiveDOMObjectMap m_activeObjectMap;
88 DartEventTargetMap m_eventTargetMap;
85 DartWeakCallbacks m_weakCallbacks; 89 DartWeakCallbacks m_weakCallbacks;
86 }; 90 };
87 91
88 } 92 }
89 93
90 #endif // DartDOMData_h 94 #endif // DartDOMData_h
OLDNEW
« no previous file with comments | « no previous file | Source/WebCore/bindings/dart/DartDOMWrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698