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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Need a default constructor to link core and modules separately. | 51 // Need a default constructor to link core and modules separately. |
52 // If no default constructor, we will see an error: "constructor for | 52 // If no default constructor, we will see an error: "constructor for |
53 // 'blink::ExecutionContext' must explicitly initialize the base class | 53 // 'blink::ExecutionContext' must explicitly initialize the base class |
54 // 'blink::ContextLifecycleNotifier' which does not have a default | 54 // 'blink::ContextLifecycleNotifier' which does not have a default |
55 // constructor ExecutionContext::ExecutionContext()". | 55 // constructor ExecutionContext::ExecutionContext()". |
56 ContextLifecycleNotifier() { } | 56 ContextLifecycleNotifier() { } |
57 | 57 |
58 #if DCHECK_IS_ON() | 58 #if DCHECK_IS_ON() |
59 bool contains(ActiveDOMObject*) const; | 59 bool contains(ActiveDOMObject*) const; |
60 #endif | 60 #endif |
| 61 |
| 62 private: |
| 63 // Iterates over a snapshot of the observers, invoking the |
| 64 // callback with each observer that is an ActiveDOMObject. |
| 65 // Observers must not be added during |eachActiveDOMObject|. It is |
| 66 // safe to remove observers, though. The callback is not invoked |
| 67 // for observers which get removed first. |
| 68 void eachActiveDOMObject(void (*)(ActiveDOMObject*)); |
61 }; | 69 }; |
62 | 70 |
63 } // namespace blink | 71 } // namespace blink |
64 | 72 |
65 #endif // ContextLifecycleNotifier_h | 73 #endif // ContextLifecycleNotifier_h |
OLD | NEW |