Chromium Code Reviews| Index: cc/debug/traced_value.h |
| diff --git a/cc/debug/traced_value.h b/cc/debug/traced_value.h |
| index e96c09a58963eb69cbcff4c51d6df61fe572c4c1..560eaf8307b434fca87e668f4d0164f3d4867fd8 100644 |
| --- a/cc/debug/traced_value.h |
| +++ b/cc/debug/traced_value.h |
| @@ -46,6 +46,17 @@ class TracedValue : public base::debug::ConvertableToTraceFormat { |
| DISALLOW_COPY_AND_ASSIGN(TracedValue); |
| }; |
| +template <class T> |
| +static scoped_refptr<base::debug::ConvertableToTraceFormat> ToTrace(T* t) { |
|
brianderson
2014/05/08 21:43:24
lgtm if Nat's happy with this file.
|
| + return TracedValue::FromValue(t->AsValue().release()); |
| +} |
| + |
| +template <class T> |
| +static scoped_refptr<base::debug::ConvertableToTraceFormat> ToTrace( |
| + const T& t) { |
| + return ToTrace(&t); |
| +} |
| + |
| } // namespace cc |
| #endif // CC_DEBUG_TRACED_VALUE_H_ |