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

Side by Side Diff: cc/debug/traced_value.h

Issue 270703004: Making BeginFrameArgs work with TRACE_EVENT system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing another include. Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/output/begin_frame_args.h » ('j') | cc/output/begin_frame_args.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 28 matching lines...) Expand all
39 39
40 private: 40 private:
41 explicit TracedValue(base::Value* value); 41 explicit TracedValue(base::Value* value);
42 virtual ~TracedValue(); 42 virtual ~TracedValue();
43 43
44 scoped_ptr<base::Value> value_; 44 scoped_ptr<base::Value> value_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(TracedValue); 46 DISALLOW_COPY_AND_ASSIGN(TracedValue);
47 }; 47 };
48 48
49 template <class T>
50 static scoped_refptr<base::debug::ConvertableToTraceFormat> ToTrace(T* t) {
brianderson 2014/05/08 21:25:49 Nice!
51 return TracedValue::FromValue(t->StateAsValue().release());
52 }
53
54 template <class T>
55 static scoped_refptr<base::debug::ConvertableToTraceFormat> ToTrace(
56 const T& t) {
57 return ToTrace(&t);
58 }
59
49 } // namespace cc 60 } // namespace cc
50 61
51 #endif // CC_DEBUG_TRACED_VALUE_H_ 62 #endif // CC_DEBUG_TRACED_VALUE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/begin_frame_args.h » ('j') | cc/output/begin_frame_args.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698