Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / cc / output / begin_frame_args.cc
index 065cadd..b45eee8 100644 (file)
@@ -2,8 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/json/json_writer.h"
 #include "cc/output/begin_frame_args.h"
+
+#include "base/debug/trace_event_argument.h"
 #include "ui/gfx/frame_time.h"
 
 namespace cc {
@@ -28,13 +29,19 @@ BeginFrameArgs BeginFrameArgs::Create(base::TimeTicks frame_time,
   return BeginFrameArgs(frame_time, deadline, interval);
 }
 
-scoped_ptr<base::Value> BeginFrameArgs::AsValue() const {
-  scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue);
+scoped_refptr<base::debug::ConvertableToTraceFormat> BeginFrameArgs::AsValue()
+    const {
+  scoped_refptr<base::debug::TracedValue> state =
+      new base::debug::TracedValue();
+  AsValueInto(state.get());
+  return state;
+}
+
+void BeginFrameArgs::AsValueInto(base::debug::TracedValue* state) const {
   state->SetString("type", "BeginFrameArgs");
   state->SetDouble("frame_time_us", frame_time.ToInternalValue());
   state->SetDouble("deadline_us", deadline.ToInternalValue());
   state->SetDouble("interval_us", interval.InMicroseconds());
-  return state.PassAs<base::Value>();
 }
 
 BeginFrameArgs BeginFrameArgs::CreateForSynchronousCompositor(