| 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 18 matching lines...) Expand all Loading... |
| 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 blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class Visitor; | |
| 40 | |
| 41 template <typename T> | 39 template <typename T> |
| 42 class LifecycleContext { | 40 class LifecycleContext { |
| 43 public: | 41 public: |
| 44 typedef LifecycleNotifier<T> Notifier; | 42 typedef LifecycleNotifier<T> Notifier; |
| 45 typedef LifecycleObserver<T> Observer; | 43 typedef LifecycleObserver<T> Observer; |
| 46 | 44 |
| 47 LifecycleContext() { } | 45 LifecycleContext() { } |
| 48 virtual ~LifecycleContext() { } | 46 virtual ~LifecycleContext() { } |
| 49 | 47 |
| 50 virtual bool isContextThread() const { return true; } | 48 virtual bool isContextThread() const { return true; } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 86 |
| 89 template<typename T> | 87 template<typename T> |
| 90 inline PassOwnPtr<typename LifecycleContext<T>::Notifier> LifecycleContext<T>::c
reateLifecycleNotifier() | 88 inline PassOwnPtr<typename LifecycleContext<T>::Notifier> LifecycleContext<T>::c
reateLifecycleNotifier() |
| 91 { | 89 { |
| 92 return LifecycleContext<T>::Notifier::create(static_cast<T*>(this)); | 90 return LifecycleContext<T>::Notifier::create(static_cast<T*>(this)); |
| 93 } | 91 } |
| 94 | 92 |
| 95 } // namespace blink | 93 } // namespace blink |
| 96 | 94 |
| 97 #endif // LifecycleContext_h | 95 #endif // LifecycleContext_h |
| OLD | NEW |