Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: cc/debug/traced_value.h

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/debug/traced_value.h
diff --git a/cc/debug/traced_value.h b/cc/debug/traced_value.h
index 560eaf8307b434fca87e668f4d0164f3d4867fd8..ccada4ac59bebadb3653513ab2829e81be955347 100644
--- a/cc/debug/traced_value.h
+++ b/cc/debug/traced_value.h
@@ -13,6 +13,9 @@
namespace base {
class DictionaryValue;
class Value;
+namespace debug {
+class TracedValue;
+}
}
namespace cc {
@@ -32,6 +35,24 @@ class TracedValue : public base::debug::ConvertableToTraceFormat {
const char* object_base_type_name,
const char* object_name,
const void* id);
+ static void AppendIDRef(const void* id, base::debug::TracedValue* array);
+ static void SetIDRef(const void* id,
+ base::debug::TracedValue* dict,
+ const char* name);
+ static void MakeDictIntoImplicitSnapshot(base::debug::TracedValue* dict,
+ const char* object_name,
+ const void* id);
+ static void MakeDictIntoImplicitSnapshotWithCategory(
+ const char* category,
+ base::debug::TracedValue* dict,
+ const char* object_name,
+ const void* id);
+ static void MakeDictIntoImplicitSnapshotWithCategory(
+ const char* category,
+ base::debug::TracedValue* dict,
+ const char* object_base_type_name,
+ const char* object_name,
+ const void* id);
static scoped_refptr<base::debug::ConvertableToTraceFormat> FromValue(
base::Value* value);
@@ -46,17 +67,6 @@ class TracedValue : public base::debug::ConvertableToTraceFormat {
DISALLOW_COPY_AND_ASSIGN(TracedValue);
};
-template <class T>
-static scoped_refptr<base::debug::ConvertableToTraceFormat> ToTrace(T* t) {
- return TracedValue::FromValue(t->AsValue().release());
-}
-
-template <class T>
-static scoped_refptr<base::debug::ConvertableToTraceFormat> ToTrace(
- const T& t) {
- return ToTrace(&t);
-}
-
} // namespace cc
#endif // CC_DEBUG_TRACED_VALUE_H_
« cc/base/math_util.h ('K') | « cc/debug/traced_picture.cc ('k') | cc/debug/traced_value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698