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 27 matching lines...) Expand all Loading... |
38 class ContextLifecycleObserver; | 38 class ContextLifecycleObserver; |
39 class ExecutionContext; | 39 class ExecutionContext; |
40 | 40 |
41 class CORE_EXPORT ContextLifecycleNotifier | 41 class CORE_EXPORT ContextLifecycleNotifier |
42 : public LifecycleNotifier<ExecutionContext, ContextLifecycleObserver> { | 42 : public LifecycleNotifier<ExecutionContext, ContextLifecycleObserver> { |
43 WTF_MAKE_NONCOPYABLE(ContextLifecycleNotifier); | 43 WTF_MAKE_NONCOPYABLE(ContextLifecycleNotifier); |
44 | 44 |
45 public: | 45 public: |
46 void notifyResumingActiveDOMObjects(); | 46 void notifyResumingActiveDOMObjects(); |
47 void notifySuspendingActiveDOMObjects(); | 47 void notifySuspendingActiveDOMObjects(); |
48 void notifyStoppingActiveDOMObjects(); | |
49 | 48 |
50 unsigned activeDOMObjectCount() const; | 49 unsigned activeDOMObjectCount() const; |
51 | 50 |
52 protected: | 51 protected: |
53 // Need a default constructor to link core and modules separately. | 52 // Need a default constructor to link core and modules separately. |
54 // If no default constructor, we will see an error: "constructor for | 53 // If no default constructor, we will see an error: "constructor for |
55 // 'blink::ExecutionContext' must explicitly initialize the base class | 54 // 'blink::ExecutionContext' must explicitly initialize the base class |
56 // 'blink::ContextLifecycleNotifier' which does not have a default | 55 // 'blink::ContextLifecycleNotifier' which does not have a default |
57 // constructor ExecutionContext::ExecutionContext()". | 56 // constructor ExecutionContext::ExecutionContext()". |
58 ContextLifecycleNotifier() {} | 57 ContextLifecycleNotifier() {} |
59 | 58 |
60 #if DCHECK_IS_ON() | 59 #if DCHECK_IS_ON() |
61 bool contains(ActiveDOMObject*) const; | 60 bool contains(ActiveDOMObject*) const; |
62 #endif | 61 #endif |
63 }; | 62 }; |
64 | 63 |
65 } // namespace blink | 64 } // namespace blink |
66 | 65 |
67 #endif // ContextLifecycleNotifier_h | 66 #endif // ContextLifecycleNotifier_h |
OLD | NEW |