| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 activeDOMObjects++; | 103 activeDOMObjects++; |
| 104 } | 104 } |
| 105 return activeDOMObjects; | 105 return activeDOMObjects; |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool ContextLifecycleNotifier::hasPendingActivity() const | 108 bool ContextLifecycleNotifier::hasPendingActivity() const |
| 109 { | 109 { |
| 110 for (ContextLifecycleObserver* observer : m_observers) { | 110 for (ContextLifecycleObserver* observer : m_observers) { |
| 111 if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjec
tType) | 111 if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjec
tType) |
| 112 continue; | 112 continue; |
| 113 ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observe
r); | 113 // ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(obse
rver); |
| 114 if (activeDOMObject->hasPendingActivity()) | 114 // if (activeDOMObject->hasPendingActivity()) |
| 115 return true; | 115 return true; |
| 116 } | 116 } |
| 117 return false; | 117 return false; |
| 118 } | 118 } |
| 119 | 119 |
| 120 #if ENABLE(ASSERT) | 120 #if ENABLE(ASSERT) |
| 121 bool ContextLifecycleNotifier::contains(ActiveDOMObject* object) const | 121 bool ContextLifecycleNotifier::contains(ActiveDOMObject* object) const |
| 122 { | 122 { |
| 123 for (ContextLifecycleObserver* observer : m_observers) { | 123 for (ContextLifecycleObserver* observer : m_observers) { |
| 124 if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjec
tType) | 124 if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjec
tType) |
| 125 continue; | 125 continue; |
| 126 ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observe
r); | 126 ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observe
r); |
| 127 if (activeDOMObject == object) | 127 if (activeDOMObject == object) |
| 128 return true; | 128 return true; |
| 129 } | 129 } |
| 130 return false; | 130 return false; |
| 131 } | 131 } |
| 132 #endif | 132 #endif |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |