Chromium Code Reviews| Index: cc/base/math_util.cc |
| diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc |
| index 7873d931913b4ce0835f6e5a44cd50813b4c55b4..bc1c78c3c668343e4b90756ae7b1fb357ee63809 100644 |
| --- a/cc/base/math_util.cc |
| +++ b/cc/base/math_util.cc |
| @@ -526,6 +526,15 @@ scoped_ptr<base::Value> MathUtil::AsValue(gfx::Size s) { |
| return res.PassAs<base::Value>(); |
| } |
| +scoped_ptr<base::Value> MathUtil::AsValue(gfx::Rect r) { |
| + scoped_ptr<base::ListValue> res(new base::ListValue()); |
| + res->AppendDouble(r.x()); |
|
enne (OOO)
2013/05/14 15:55:18
AppendInteger?
|
| + res->AppendDouble(r.y()); |
| + res->AppendDouble(r.width()); |
| + res->AppendDouble(r.height()); |
| + return res.PassAs<base::Value>(); |
| +} |
| + |
| scoped_ptr<base::Value> MathUtil::AsValue(gfx::PointF pt) { |
| scoped_ptr<base::ListValue> res(new base::ListValue()); |
| res->AppendDouble(pt.x()); |