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 19 matching lines...) Expand all Loading... |
30 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
31 #include "core/dom/ExecutionContext.h" | 31 #include "core/dom/ExecutionContext.h" |
32 #include "platform/LifecycleObserver.h" | 32 #include "platform/LifecycleObserver.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class ContextLifecycleNotifier; | 36 class ContextLifecycleNotifier; |
37 | 37 |
38 class CORE_EXPORT ContextLifecycleObserver : public LifecycleObserver<ExecutionC
ontext, ContextLifecycleObserver, ContextLifecycleNotifier> { | 38 class CORE_EXPORT ContextLifecycleObserver : public LifecycleObserver<ExecutionC
ontext, ContextLifecycleObserver, ContextLifecycleNotifier> { |
39 public: | 39 public: |
40 ExecutionContext* executionContext() const { return lifecycleContext(); } | 40 ExecutionContext* getExecutionContext() const { return lifecycleContext(); } |
41 | 41 |
42 enum Type { | 42 enum Type { |
43 GenericType, | 43 GenericType, |
44 ActiveDOMObjectType, | 44 ActiveDOMObjectType, |
45 }; | 45 }; |
46 | 46 |
47 Type observerType() const { return m_observerType; } | 47 Type observerType() const { return m_observerType; } |
48 | 48 |
49 protected: | 49 protected: |
50 explicit ContextLifecycleObserver(ExecutionContext* executionContext, Type t
ype = GenericType) | 50 explicit ContextLifecycleObserver(ExecutionContext* executionContext, Type t
ype = GenericType) |
51 : LifecycleObserver(executionContext) | 51 : LifecycleObserver(executionContext) |
52 , m_observerType(type) | 52 , m_observerType(type) |
53 { | 53 { |
54 } | 54 } |
55 | 55 |
56 private: | 56 private: |
57 Type m_observerType; | 57 Type m_observerType; |
58 }; | 58 }; |
59 | 59 |
60 } // namespace blink | 60 } // namespace blink |
61 | 61 |
62 #endif // ContextLifecycleObserver_h | 62 #endif // ContextLifecycleObserver_h |
OLD | NEW |