| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 private: | 56 private: |
| 57 WeakMember<ExecutionContext> m_executionContext; | 57 WeakMember<ExecutionContext> m_executionContext; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 // ContextLifecycleObserver provides an additional contextDestroyed() hook | 60 // ContextLifecycleObserver provides an additional contextDestroyed() hook |
| 61 // to execute cleanup code when a context is destroyed. Prefer the simpler | 61 // to execute cleanup code when a context is destroyed. Prefer the simpler |
| 62 // ContextClient when possible. | 62 // ContextClient when possible. |
| 63 class CORE_EXPORT ContextLifecycleObserver | 63 class CORE_EXPORT ContextLifecycleObserver |
| 64 : public LifecycleObserver<ExecutionContext, ContextLifecycleObserver> { | 64 : public LifecycleObserver<ExecutionContext, ContextLifecycleObserver> { |
| 65 public: | 65 public: |
| 66 virtual void contextDestroyed(ExecutionContext*) {} |
| 67 |
| 66 ExecutionContext* getExecutionContext() const { return lifecycleContext(); } | 68 ExecutionContext* getExecutionContext() const { return lifecycleContext(); } |
| 67 LocalFrame* frame() const; | 69 LocalFrame* frame() const; |
| 68 | 70 |
| 69 enum Type { | 71 enum Type { |
| 70 GenericType, | 72 GenericType, |
| 71 SuspendableObjectType, | 73 SuspendableObjectType, |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 Type observerType() const { return m_observerType; } | 76 Type observerType() const { return m_observerType; } |
| 75 | 77 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 explicit DOMWindowClient(LocalDOMWindow*); | 114 explicit DOMWindowClient(LocalDOMWindow*); |
| 113 explicit DOMWindowClient(LocalFrame*); | 115 explicit DOMWindowClient(LocalFrame*); |
| 114 | 116 |
| 115 private: | 117 private: |
| 116 WeakMember<LocalDOMWindow> m_domWindow; | 118 WeakMember<LocalDOMWindow> m_domWindow; |
| 117 }; | 119 }; |
| 118 | 120 |
| 119 } // namespace blink | 121 } // namespace blink |
| 120 | 122 |
| 121 #endif // ContextLifecycleObserver_h | 123 #endif // ContextLifecycleObserver_h |
| OLD | NEW |