summaryrefslogtreecommitdiffstats
path: root/cc/debug/traced_value.h
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 23:52:22 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 23:52:22 +0000
commitf6742f53ed74f9e08f2dfaa11b0a8978d99e8ad0 (patch)
tree5bcabca9555dd3f3c4cbe55ed38d7e6b10f69c07 /cc/debug/traced_value.h
parent6bec38a3e9548f6ba73d300a3722581121da818a (diff)
downloadchromium_src-f6742f53ed74f9e08f2dfaa11b0a8978d99e8ad0.zip
chromium_src-f6742f53ed74f9e08f2dfaa11b0a8978d99e8ad0.tar.gz
chromium_src-f6742f53ed74f9e08f2dfaa11b0a8978d99e8ad0.tar.bz2
Update cc trace instrumentation to use tracing's object snapshot API
R=enne NOTRY=True The failures are flake. Review URL: https://chromiumcodereview.appspot.com/14756004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug/traced_value.h')
-rw-r--r--cc/debug/traced_value.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/cc/debug/traced_value.h b/cc/debug/traced_value.h
new file mode 100644
index 0000000..e5d63a1
--- /dev/null
+++ b/cc/debug/traced_value.h
@@ -0,0 +1,41 @@
+// 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 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_