OLD | NEW |
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 #include "cc/test/layer_tree_json_parser.h" | 5 #include "cc/test/layer_tree_json_parser.h" |
6 | 6 |
7 #include "base/test/values_test_util.h" | 7 #include "base/test/values_test_util.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "cc/content_layer.h" | 9 #include "cc/layers/content_layer.h" |
10 #include "cc/layer.h" | 10 #include "cc/layers/layer.h" |
11 #include "cc/nine_patch_layer.h" | 11 #include "cc/layers/nine_patch_layer.h" |
12 #include "cc/solid_color_layer.h" | 12 #include "cc/layers/solid_color_layer.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 scoped_refptr<Layer> ParseTreeFromValue(base::Value* val, | 18 scoped_refptr<Layer> ParseTreeFromValue(base::Value* val, |
19 ContentLayerClient* content_client) { | 19 ContentLayerClient* content_client) { |
20 DictionaryValue* dict; | 20 DictionaryValue* dict; |
21 bool success = true; | 21 bool success = true; |
22 success &= val->GetAsDictionary(&dict); | 22 success &= val->GetAsDictionary(&dict); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 } // namespace | 98 } // namespace |
99 | 99 |
100 scoped_refptr<Layer> ParseTreeFromJson(std::string json, | 100 scoped_refptr<Layer> ParseTreeFromJson(std::string json, |
101 ContentLayerClient* content_client) { | 101 ContentLayerClient* content_client) { |
102 scoped_ptr<base::Value> val = base::test::ParseJson(json); | 102 scoped_ptr<base::Value> val = base::test::ParseJson(json); |
103 return ParseTreeFromValue(val.get(), content_client); | 103 return ParseTreeFromValue(val.get(), content_client); |
104 } | 104 } |
105 | 105 |
106 } // namespace cc | 106 } // namespace cc |
OLD | NEW |