| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class CORE_EXPORT ContextLifecycleObserver | 36 class CORE_EXPORT ContextLifecycleObserver |
| 37 : public LifecycleObserver<ExecutionContext, ContextLifecycleObserver> { | 37 : public LifecycleObserver<ExecutionContext, ContextLifecycleObserver> { |
| 38 public: | 38 public: |
| 39 ExecutionContext* getExecutionContext() const { return lifecycleContext(); } | 39 ExecutionContext* getExecutionContext() const { return lifecycleContext(); } |
| 40 | 40 |
| 41 enum Type { | 41 enum Type { |
| 42 GenericType, | 42 GenericType, |
| 43 ActiveDOMObjectType, | 43 SuspendableObjectType, |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 Type observerType() const { return m_observerType; } | 46 Type observerType() const { return m_observerType; } |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 explicit ContextLifecycleObserver(ExecutionContext* executionContext, | 49 explicit ContextLifecycleObserver(ExecutionContext* executionContext, |
| 50 Type type = GenericType) | 50 Type type = GenericType) |
| 51 : LifecycleObserver(executionContext), m_observerType(type) {} | 51 : LifecycleObserver(executionContext), m_observerType(type) {} |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 Type m_observerType; | 54 Type m_observerType; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace blink | 57 } // namespace blink |
| 58 | 58 |
| 59 #endif // ContextLifecycleObserver_h | 59 #endif // ContextLifecycleObserver_h |
| OLD | NEW |