| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 virtual ~LifecycleContext() { } | 48 virtual ~LifecycleContext() { } |
| 49 | 49 |
| 50 virtual bool isContextThread() const { return true; } | 50 virtual bool isContextThread() const { return true; } |
| 51 | 51 |
| 52 // Called from the constructor of observers. | 52 // Called from the constructor of observers. |
| 53 void wasObservedBy(Observer*); | 53 void wasObservedBy(Observer*); |
| 54 | 54 |
| 55 // Called from the destructor of observers. | 55 // Called from the destructor of observers. |
| 56 void wasUnobservedBy(Observer*); | 56 void wasUnobservedBy(Observer*); |
| 57 | 57 |
| 58 virtual void trace(Visitor*) { } | |
| 59 | |
| 60 protected: | 58 protected: |
| 61 Notifier& lifecycleNotifier(); | 59 Notifier& lifecycleNotifier(); |
| 62 | 60 |
| 63 private: | 61 private: |
| 64 PassOwnPtr<Notifier> createLifecycleNotifier(); | 62 PassOwnPtr<Notifier> createLifecycleNotifier(); |
| 65 | 63 |
| 66 OwnPtr<Notifier> m_lifecycleNotifier; | 64 OwnPtr<Notifier> m_lifecycleNotifier; |
| 67 }; | 65 }; |
| 68 | 66 |
| 69 template<typename T> | 67 template<typename T> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 90 | 88 |
| 91 template<typename T> | 89 template<typename T> |
| 92 inline PassOwnPtr<typename LifecycleContext<T>::Notifier> LifecycleContext<T>::c
reateLifecycleNotifier() | 90 inline PassOwnPtr<typename LifecycleContext<T>::Notifier> LifecycleContext<T>::c
reateLifecycleNotifier() |
| 93 { | 91 { |
| 94 return LifecycleContext<T>::Notifier::create(static_cast<T*>(this)); | 92 return LifecycleContext<T>::Notifier::create(static_cast<T*>(this)); |
| 95 } | 93 } |
| 96 | 94 |
| 97 } // namespace blink | 95 } // namespace blink |
| 98 | 96 |
| 99 #endif // LifecycleContext_h | 97 #endif // LifecycleContext_h |
| OLD | NEW |