1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef WebConvertableToTraceFormat_h 6#define WebConvertableToTraceFormat_h 7 8#include "WebPrivatePtr.h" 9#include "WebString.h" 10 11namespace blink { 12 13namespace TraceEvent { 14class ConvertableToTraceFormat; 15} 16 17class WebConvertableToTraceFormat { 18public: 19 WebConvertableToTraceFormat() { } 20#if INSIDE_BLINK 21 WebConvertableToTraceFormat(TraceEvent::ConvertableToTraceFormat*); 22#endif 23 ~WebConvertableToTraceFormat() { reset(); } 24 25 BLINK_PLATFORM_EXPORT WebString asTraceFormat() const; 26 BLINK_PLATFORM_EXPORT void assign(const WebConvertableToTraceFormat&); 27 BLINK_PLATFORM_EXPORT void reset(); 28 29 WebConvertableToTraceFormat(const WebConvertableToTraceFormat& r) { assign(r); } 30 WebConvertableToTraceFormat& operator=(const WebConvertableToTraceFormat& r) 31 { 32 assign(r); 33 return *this; 34 } 35 36private: 37 WebPrivatePtr<TraceEvent::ConvertableToTraceFormat> m_private; 38}; 39 40} // namespace blink 41 42#endif 43