| 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 #ifndef LifecycleContext_h | 28 #ifndef LifecycleContext_h |
| 29 #define LifecycleContext_h | 29 #define LifecycleContext_h |
| 30 | 30 |
| 31 #include "platform/LifecycleNotifier.h" | 31 #include "platform/LifecycleNotifier.h" |
| 32 #include "platform/LifecycleObserver.h" | 32 #include "platform/LifecycleObserver.h" |
| 33 #include "wtf/HashSet.h" | 33 #include "wtf/HashSet.h" |
| 34 #include "wtf/OwnPtr.h" | 34 #include "wtf/OwnPtr.h" |
| 35 #include "wtf/PassOwnPtr.h" | 35 #include "wtf/PassOwnPtr.h" |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace blink { |
| 38 | 38 |
| 39 template <typename T> | 39 template <typename T> |
| 40 class LifecycleContext { | 40 class LifecycleContext { |
| 41 public: | 41 public: |
| 42 typedef LifecycleNotifier<T> Notifier; | 42 typedef LifecycleNotifier<T> Notifier; |
| 43 typedef LifecycleObserver<T> Observer; | 43 typedef LifecycleObserver<T> Observer; |
| 44 | 44 |
| 45 LifecycleContext() { } | 45 LifecycleContext() { } |
| 46 virtual ~LifecycleContext() { } | 46 virtual ~LifecycleContext() { } |
| 47 | 47 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 m_lifecycleNotifier = static_cast<T*>(this)->createLifecycleNotifier(); | 83 m_lifecycleNotifier = static_cast<T*>(this)->createLifecycleNotifier(); |
| 84 return *m_lifecycleNotifier; | 84 return *m_lifecycleNotifier; |
| 85 } | 85 } |
| 86 | 86 |
| 87 template<typename T> | 87 template<typename T> |
| 88 inline PassOwnPtr<typename LifecycleContext<T>::Notifier> LifecycleContext<T>::c
reateLifecycleNotifier() | 88 inline PassOwnPtr<typename LifecycleContext<T>::Notifier> LifecycleContext<T>::c
reateLifecycleNotifier() |
| 89 { | 89 { |
| 90 return LifecycleContext<T>::Notifier::create(static_cast<T*>(this)); | 90 return LifecycleContext<T>::Notifier::create(static_cast<T*>(this)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace WebCore | 93 } // namespace blink |
| 94 | 94 |
| 95 #endif // LifecycleContext_h | 95 #endif // LifecycleContext_h |
| OLD | NEW |