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