Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 CC_DEBUG_TRACED_VALUE_H_ | 5 #ifndef CC_DEBUG_TRACED_VALUE_H_ |
| 6 #define CC_DEBUG_TRACED_VALUE_H_ | 6 #define CC_DEBUG_TRACED_VALUE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class DictionaryValue; | 14 class DictionaryValue; |
| 15 class Value; | 15 class Value; |
| 16 } | 16 } |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 class TracedValue : public base::debug::ConvertableToTraceFormat { | 19 class TracedValue : public base::debug::ConvertableToTraceFormat { |
| 20 public: | 20 public: |
| 21 static scoped_ptr<base::Value> CreateIDRef(const void* id); | 21 static scoped_ptr<base::Value> CreateIDRef(const void* id); |
| 22 static void MakeDictIntoImplicitSnapshot( | 22 static void MakeDictIntoImplicitSnapshot(const char* category, |
|
nduca
2013/08/09 04:27:45
lets make this optional with overloading?
otherwi
piman
2013/08/09 20:26:07
Done.
I'd argue that at the callsite you can't kn
| |
| 23 base::DictionaryValue* dict, const char* object_name, const void* id); | 23 base::DictionaryValue* dict, |
| 24 const char* object_name, | |
| 25 const void* id); | |
| 24 static scoped_ptr<ConvertableToTraceFormat> FromValue( | 26 static scoped_ptr<ConvertableToTraceFormat> FromValue( |
| 25 base::Value* value); | 27 base::Value* value); |
| 26 | 28 |
| 27 virtual ~TracedValue(); | 29 virtual ~TracedValue(); |
| 28 | 30 |
| 29 virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE; | 31 virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE; |
| 30 | 32 |
| 31 private: | 33 private: |
| 32 explicit TracedValue(base::Value* value); | 34 explicit TracedValue(base::Value* value); |
| 33 | 35 |
| 34 scoped_ptr<base::Value> value_; | 36 scoped_ptr<base::Value> value_; |
| 35 | 37 |
| 36 DISALLOW_COPY_AND_ASSIGN(TracedValue); | 38 DISALLOW_COPY_AND_ASSIGN(TracedValue); |
| 37 }; | 39 }; |
| 38 | 40 |
| 39 } // namespace cc | 41 } // namespace cc |
| 40 | 42 |
| 41 #endif // CC_DEBUG_TRACED_VALUE_H_ | 43 #endif // CC_DEBUG_TRACED_VALUE_H_ |
| OLD | NEW |