| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class ActiveDOMObject; | 35 class ActiveDOMObject; |
| 36 class ContextLifecycleObserver; | 36 class ContextLifecycleObserver; |
| 37 class ExecutionContext; | 37 class ExecutionContext; |
| 38 | 38 |
| 39 class ContextLifecycleNotifier : public LifecycleNotifier<ExecutionContext, Cont
extLifecycleObserver> { | 39 class ContextLifecycleNotifier : public LifecycleNotifier<ExecutionContext, Cont
extLifecycleObserver> { |
| 40 public: | 40 public: |
| 41 void addObserver(ContextLifecycleObserver*); | 41 void addObserver(ContextLifecycleObserver*); |
| 42 void removeObserver(ContextLifecycleObserver*); | |
| 43 | 42 |
| 44 void notifyResumingActiveDOMObjects(); | 43 void notifyResumingActiveDOMObjects(); |
| 45 void notifySuspendingActiveDOMObjects(); | 44 void notifySuspendingActiveDOMObjects(); |
| 46 void notifyStoppingActiveDOMObjects(); | 45 void notifyStoppingActiveDOMObjects(); |
| 47 | 46 |
| 48 unsigned activeDOMObjectCount() const; | 47 unsigned activeDOMObjectCount() const; |
| 49 bool hasPendingActivity() const; | 48 bool hasPendingActivity() const; |
| 50 | 49 |
| 51 protected: | 50 protected: |
| 52 explicit ContextLifecycleNotifier(ExecutionContext*); | 51 explicit ContextLifecycleNotifier(ExecutionContext*); |
| 53 | 52 |
| 54 #if ENABLE(ASSERT) | 53 #if ENABLE(ASSERT) |
| 55 bool contains(ActiveDOMObject*) const; | 54 bool contains(ActiveDOMObject*) const; |
| 56 #endif | 55 #endif |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 } // namespace blink | 58 } // namespace blink |
| 60 | 59 |
| 61 #endif // ContextLifecycleNotifier_h | 60 #endif // ContextLifecycleNotifier_h |
| OLD | NEW |