OLD | NEW |
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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "core/dom/IdTargetObserver.h" | 29 #include "core/dom/IdTargetObserver.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 PassOwnPtrWillBeRawPtr<IdTargetObserverRegistry> IdTargetObserverRegistry::creat
e() | 33 PassOwnPtrWillBeRawPtr<IdTargetObserverRegistry> IdTargetObserverRegistry::creat
e() |
34 { | 34 { |
35 return adoptPtrWillBeNoop(new IdTargetObserverRegistry()); | 35 return adoptPtrWillBeNoop(new IdTargetObserverRegistry()); |
36 } | 36 } |
37 | 37 |
38 void IdTargetObserverRegistry::trace(Visitor* visitor) | 38 DEFINE_TRACE(IdTargetObserverRegistry) |
39 { | 39 { |
40 #if ENABLE(OILPAN) | 40 #if ENABLE(OILPAN) |
41 visitor->trace(m_registry); | 41 visitor->trace(m_registry); |
42 visitor->trace(m_notifyingObserversInSet); | 42 visitor->trace(m_notifyingObserversInSet); |
43 #endif | 43 #endif |
44 } | 44 } |
45 | 45 |
46 void IdTargetObserverRegistry::addObserver(const AtomicString& id, IdTargetObser
ver* observer) | 46 void IdTargetObserverRegistry::addObserver(const AtomicString& id, IdTargetObser
ver* observer) |
47 { | 47 { |
48 if (id.isEmpty()) | 48 if (id.isEmpty()) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 bool IdTargetObserverRegistry::hasObservers(const AtomicString& id) const | 93 bool IdTargetObserverRegistry::hasObservers(const AtomicString& id) const |
94 { | 94 { |
95 if (id.isEmpty() || m_registry.isEmpty()) | 95 if (id.isEmpty() || m_registry.isEmpty()) |
96 return false; | 96 return false; |
97 ObserverSet* set = m_registry.get(id.impl()); | 97 ObserverSet* set = m_registry.get(id.impl()); |
98 return set && !set->isEmpty(); | 98 return set && !set->isEmpty(); |
99 } | 99 } |
100 | 100 |
101 } // namespace blink | 101 } // namespace blink |
OLD | NEW |