1 // Copyright 2013 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 CC_DEBUG_TRACED_VALUE_H_
6 #define CC_DEBUG_TRACED_VALUE_H_
10 #include "base/debug/trace_event.h"
11 #include "base/memory/scoped_ptr.h"
14 class DictionaryValue
;
19 class TracedValue
: public base::debug::ConvertableToTraceFormat
{
21 static scoped_ptr
<base::Value
> CreateIDRef(const void* id
);
22 static void MakeDictIntoImplicitSnapshot(
23 base::DictionaryValue
* dict
, const char* object_name
, const void* id
);
24 static void MakeDictIntoImplicitSnapshotWithCategory(
26 base::DictionaryValue
* dict
,
27 const char* object_name
,
29 static void MakeDictIntoImplicitSnapshotWithCategory(
31 base::DictionaryValue
* dict
,
32 const char* object_base_type_name
,
33 const char* object_name
,
35 static scoped_refptr
<base::debug::ConvertableToTraceFormat
> FromValue(
38 virtual void AppendAsTraceFormat(std::string
* out
) const OVERRIDE
;
41 explicit TracedValue(base::Value
* value
);
42 virtual ~TracedValue();
44 scoped_ptr
<base::Value
> value_
;
46 DISALLOW_COPY_AND_ASSIGN(TracedValue
);
51 #endif // CC_DEBUG_TRACED_VALUE_H_