OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 protected: | 60 protected: |
61 LifecycleNotifier() | 61 LifecycleNotifier() |
62 : m_iterating(IteratingNone) | 62 : m_iterating(IteratingNone) |
63 , m_didCallContextDestroyed(false) | 63 , m_didCallContextDestroyed(false) |
64 { | 64 { |
65 } | 65 } |
66 | 66 |
67 enum IterationType { | 67 enum IterationType { |
68 IteratingNone, | 68 IteratingNone, |
69 IteratingOverAll, | 69 IteratingOverAll, |
70 IteratingOverActiveDOMObjects, | |
71 }; | 70 }; |
72 | 71 |
73 IterationType m_iterating; | 72 IterationType m_iterating; |
haraken
2015/03/23 14:30:43
We can probably change this to bool (in a follow-u
| |
74 | 73 |
75 protected: | 74 protected: |
76 using ObserverSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Observer>>; | 75 using ObserverSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Observer>>; |
77 | 76 |
78 // FIXME: Oilpan: make LifecycleNotifier<> a GC mixin, somehow. ExecutionCon text | 77 // FIXME: Oilpan: make LifecycleNotifier<> a GC mixin, somehow. ExecutionCon text |
79 // is the problematic case, as it would then be a class with two GC mixin | 78 // is the problematic case, as it would then be a class with two GC mixin |
80 // bases, but cannot itself derive from a GC base class also. | 79 // bases, but cannot itself derive from a GC base class also. |
81 GC_PLUGIN_IGNORE("467502") | 80 GC_PLUGIN_IGNORE("467502") |
82 ObserverSet m_observers; | 81 ObserverSet m_observers; |
83 | 82 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 | 136 |
138 template<typename T, typename Observer> | 137 template<typename T, typename Observer> |
139 inline void LifecycleNotifier<T, Observer>::removeObserver(Observer* observer) | 138 inline void LifecycleNotifier<T, Observer>::removeObserver(Observer* observer) |
140 { | 139 { |
141 m_observers.remove(observer); | 140 m_observers.remove(observer); |
142 } | 141 } |
143 | 142 |
144 } // namespace blink | 143 } // namespace blink |
145 | 144 |
146 #endif // LifecycleNotifier_h | 145 #endif // LifecycleNotifier_h |
OLD | NEW |