cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / cc / debug / traced_value.h
blob148aca8ebb67f05e63c8a6267a58ccedd2dc8a49
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_
8 #include <string>
10 #include "base/debug/trace_event.h"
11 #include "base/memory/scoped_ptr.h"
13 namespace base {
14 class DictionaryValue;
15 class Value;
17 namespace cc {
19 class TracedValue : public base::debug::ConvertableToTraceFormat {
20 public:
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(
25 const char* category,
26 base::DictionaryValue* dict,
27 const char* object_name,
28 const void* id);
29 static scoped_ptr<ConvertableToTraceFormat> FromValue(
30 base::Value* value);
32 virtual ~TracedValue();
34 virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE;
36 private:
37 explicit TracedValue(base::Value* value);
39 scoped_ptr<base::Value> value_;
41 DISALLOW_COPY_AND_ASSIGN(TracedValue);
44 } // namespace cc
46 #endif // CC_DEBUG_TRACED_VALUE_H_