| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * | 7 * |
| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 383 |
| 384 template<typename T> struct ConvertableToTraceFormatTraits { | 384 template<typename T> struct ConvertableToTraceFormatTraits { |
| 385 static const bool isConvertable = false; | 385 static const bool isConvertable = false; |
| 386 static PassRefPtr<ConvertableToTraceFormat> moveFromIfConvertable(const T&) | 386 static PassRefPtr<ConvertableToTraceFormat> moveFromIfConvertable(const T&) |
| 387 { | 387 { |
| 388 return nullptr; | 388 return nullptr; |
| 389 } | 389 } |
| 390 }; | 390 }; |
| 391 | 391 |
| 392 template<typename T> struct ConvertableToTraceFormatTraits<PassRefPtr<T>> { | 392 template<typename T> struct ConvertableToTraceFormatTraits<PassRefPtr<T>> { |
| 393 static const bool isConvertable = WTF::IsSubclass<T, TraceEvent::Convertable
ToTraceFormat>::value; | 393 static const bool isConvertable = std::is_convertible<T*, TraceEvent::Conver
tableToTraceFormat*>::value; |
| 394 static PassRefPtr<ConvertableToTraceFormat> moveFromIfConvertable(const Pass
RefPtr<T>& convertableToTraceFormat) | 394 static PassRefPtr<ConvertableToTraceFormat> moveFromIfConvertable(const Pass
RefPtr<T>& convertableToTraceFormat) |
| 395 { | 395 { |
| 396 return convertableToTraceFormat; | 396 return convertableToTraceFormat; |
| 397 } | 397 } |
| 398 }; | 398 }; |
| 399 | 399 |
| 400 template<typename T> bool isConvertableToTraceFormat(const T&) | 400 template<typename T> bool isConvertableToTraceFormat(const T&) |
| 401 { | 401 { |
| 402 return ConvertableToTraceFormatTraits<T>::isConvertable; | 402 return ConvertableToTraceFormatTraits<T>::isConvertable; |
| 403 } | 403 } |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 const char* m_categoryGroup; | 622 const char* m_categoryGroup; |
| 623 const char* m_name; | 623 const char* m_name; |
| 624 IDType m_id; | 624 IDType m_id; |
| 625 }; | 625 }; |
| 626 | 626 |
| 627 } // namespace TraceEvent | 627 } // namespace TraceEvent |
| 628 | 628 |
| 629 } // namespace blink | 629 } // namespace blink |
| 630 | 630 |
| 631 #endif | 631 #endif |
| OLD | NEW |