| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2012 Google, 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 static Supplement<T>* from(Supplementable<T>& host, const char* key) | 101 static Supplement<T>* from(Supplementable<T>& host, const char* key) |
| 102 { | 102 { |
| 103 return host.requireSupplement(key); | 103 return host.requireSupplement(key); |
| 104 } | 104 } |
| 105 | 105 |
| 106 static Supplement<T>* from(Supplementable<T>* host, const char* key) | 106 static Supplement<T>* from(Supplementable<T>* host, const char* key) |
| 107 { | 107 { |
| 108 return host ? host->requireSupplement(key) : 0; | 108 return host ? host->requireSupplement(key) : 0; |
| 109 } | 109 } |
| 110 |
| 111 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 110 }; | 112 }; |
| 111 | 113 |
| 112 // Supplementable<T> inherits from GarbageCollectedMixin virtually | 114 // Supplementable<T> inherits from GarbageCollectedMixin virtually |
| 113 // to allow ExecutionContext to derive from two GC mixin classes. | 115 // to allow ExecutionContext to derive from two GC mixin classes. |
| 114 template<typename T> | 116 template<typename T> |
| 115 class Supplementable : public virtual GarbageCollectedMixin { | 117 class Supplementable : public virtual GarbageCollectedMixin { |
| 116 WTF_MAKE_NONCOPYABLE(Supplementable); | 118 WTF_MAKE_NONCOPYABLE(Supplementable); |
| 117 public: | 119 public: |
| 118 void provideSupplement(const char* key, Supplement<T>* supplement) | 120 void provideSupplement(const char* key, Supplement<T>* supplement) |
| 119 { | 121 { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 }; | 171 }; |
| 170 | 172 |
| 171 template<typename T> | 173 template<typename T> |
| 172 struct ThreadingTrait<Supplementable<T>> { | 174 struct ThreadingTrait<Supplementable<T>> { |
| 173 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; | 175 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; |
| 174 }; | 176 }; |
| 175 | 177 |
| 176 } // namespace blink | 178 } // namespace blink |
| 177 | 179 |
| 178 #endif // Supplementable_h | 180 #endif // Supplementable_h |
| OLD | NEW |