summaryrefslogtreecommitdiffstats
path: root/cc/nine_patch_layer_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/nine_patch_layer_impl.cc')
-rw-r--r--cc/nine_patch_layer_impl.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/cc/nine_patch_layer_impl.cc b/cc/nine_patch_layer_impl.cc
index e4d36eb..3185abd 100644
--- a/cc/nine_patch_layer_impl.cc
+++ b/cc/nine_patch_layer_impl.cc
@@ -5,6 +5,7 @@
#include "nine_patch_layer_impl.h"
#include "base/stringprintf.h"
+#include "base/values.h"
#include "cc/quad_sink.h"
#include "cc/texture_draw_quad.h"
#include "ui/gfx/rect_f.h"
@@ -163,4 +164,18 @@ void NinePatchLayerImpl::dumpLayerProperties(std::string* str, int indent) const
LayerImpl::dumpLayerProperties(str, indent);
}
+base::DictionaryValue* NinePatchLayerImpl::layerTreeAsJson() const
+{
+ base::DictionaryValue* result = LayerImpl::layerTreeAsJson();
+
+ base::ListValue* list = new base::ListValue;
+ list->AppendInteger(m_imageAperture.origin().x());
+ list->AppendInteger(m_imageAperture.origin().y());
+ list->AppendInteger(m_imageAperture.size().width());
+ list->AppendInteger(m_imageAperture.size().height());
+ result->Set("ImageAperture", list);
+
+ return result;
+}
+
}