summaryrefslogtreecommitdiff
path: root/chromium/cc/debug/traced_value.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/cc/debug/traced_value.h')
-rw-r--r--chromium/cc/debug/traced_value.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/chromium/cc/debug/traced_value.h b/chromium/cc/debug/traced_value.h
new file mode 100644
index 00000000000..148aca8ebb6
--- /dev/null
+++ b/chromium/cc/debug/traced_value.h
@@ -0,0 +1,46 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_DEBUG_TRACED_VALUE_H_
+#define CC_DEBUG_TRACED_VALUE_H_
+
+#include <string>
+
+#include "base/debug/trace_event.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace base {
+class DictionaryValue;
+class Value;
+}
+namespace cc {
+
+class TracedValue : public base::debug::ConvertableToTraceFormat {
+ public:
+ static scoped_ptr<base::Value> CreateIDRef(const void* id);
+ static void MakeDictIntoImplicitSnapshot(
+ base::DictionaryValue* dict, const char* object_name, const void* id);
+ static void MakeDictIntoImplicitSnapshotWithCategory(
+ const char* category,
+ base::DictionaryValue* dict,
+ const char* object_name,
+ const void* id);
+ static scoped_ptr<ConvertableToTraceFormat> FromValue(
+ base::Value* value);
+
+ virtual ~TracedValue();
+
+ virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE;
+
+ private:
+ explicit TracedValue(base::Value* value);
+
+ scoped_ptr<base::Value> value_;
+
+ DISALLOW_COPY_AND_ASSIGN(TracedValue);
+};
+
+} // namespace cc
+
+#endif // CC_DEBUG_TRACED_VALUE_H_