Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / public / platform / WebConvertableToTraceFormat.h
blobaaffa05a046b5fb5fd33cf89fd89584ed96aba65
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.
5 #ifndef WebConvertableToTraceFormat_h
6 #define WebConvertableToTraceFormat_h
8 #include "WebPrivatePtr.h"
9 #include "WebString.h"
11 namespace blink {
13 namespace TraceEvent {
14 class ConvertableToTraceFormat;
17 class WebConvertableToTraceFormat {
18 public:
19 WebConvertableToTraceFormat() { }
20 #if INSIDE_BLINK
21 WebConvertableToTraceFormat(PassRefPtr<TraceEvent::ConvertableToTraceFormat>);
22 #endif
23 ~WebConvertableToTraceFormat() { reset(); }
25 BLINK_PLATFORM_EXPORT WebString asTraceFormat() const;
26 BLINK_PLATFORM_EXPORT void assign(const WebConvertableToTraceFormat&);
27 BLINK_PLATFORM_EXPORT void moveFrom(WebConvertableToTraceFormat&);
28 BLINK_PLATFORM_EXPORT void reset();
30 WebConvertableToTraceFormat(const WebConvertableToTraceFormat& r) { assign(r); }
31 WebConvertableToTraceFormat& operator=(const WebConvertableToTraceFormat& r)
33 assign(r);
34 return *this;
37 private:
38 WebPrivatePtr<TraceEvent::ConvertableToTraceFormat> m_private;
41 } // namespace blink
43 #endif