| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #ifndef ContextDestructionObserver_h | 27 #ifndef ContextDestructionObserver_h |
| 28 #define ContextDestructionObserver_h | 28 #define ContextDestructionObserver_h |
| 29 | 29 |
| 30 namespace WebCore { | 30 namespace WebCore { |
| 31 | 31 |
| 32 class ScriptExecutionContext; | 32 class ScriptExecutionContext; |
| 33 | 33 |
| 34 class ContextDestructionObserver { | 34 class ContextDestructionObserver { |
| 35 public: | 35 public: |
| 36 enum Type { | 36 explicit ContextDestructionObserver(ScriptExecutionContext*); |
| 37 ActiveDOMObjectType, | |
| 38 DocumentLifecycleObserverType, | |
| 39 GenericType | |
| 40 }; | |
| 41 | |
| 42 explicit ContextDestructionObserver(ScriptExecutionContext*, Type = GenericT
ype); | |
| 43 virtual void contextDestroyed(); | 37 virtual void contextDestroyed(); |
| 44 | 38 |
| 45 ScriptExecutionContext* scriptExecutionContext() const { return m_scriptExec
utionContext; } | 39 ScriptExecutionContext* scriptExecutionContext() const { return m_scriptExec
utionContext; } |
| 46 | 40 |
| 47 protected: | 41 protected: |
| 48 virtual ~ContextDestructionObserver(); | 42 virtual ~ContextDestructionObserver(); |
| 49 void observeContext(ScriptExecutionContext*, Type); | 43 void observeContext(ScriptExecutionContext*); |
| 50 | 44 |
| 51 ScriptExecutionContext* m_scriptExecutionContext; | 45 ScriptExecutionContext* m_scriptExecutionContext; |
| 52 }; | 46 }; |
| 53 | 47 |
| 54 } // namespace WebCore | 48 } // namespace WebCore |
| 55 | 49 |
| 56 #endif // ContextDestructionObserver_h | 50 #endif // ContextDestructionObserver_h |
| OLD | NEW |