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

Side by Side Diff: cc/test/layer_tree_json_parser.cc

Issue 1639363002: Move have_wheel_event_handlers to WebLayerTreeView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove blank line Created 4 years, 10 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
« no previous file with comments | « cc/proto/layer_tree_host.proto ('k') | cc/test/layer_tree_json_parser_unittest.cc » ('j') | no next file with comments »
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 #include "cc/test/layer_tree_json_parser.h" 5 #include "cc/test/layer_tree_json_parser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/test/values_test_util.h" 9 #include "base/test/values_test_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // 118 //
119 // For now, we can safely indicate a layer is scrollable by giving it a 119 // For now, we can safely indicate a layer is scrollable by giving it a
120 // pointer to itself, something not normally allowed in a working tree. 120 // pointer to itself, something not normally allowed in a working tree.
121 // 121 //
122 // https://code.google.com/p/chromium/issues/detail?id=330622 122 // https://code.google.com/p/chromium/issues/detail?id=330622
123 // 123 //
124 if (dict->GetBoolean("Scrollable", &scrollable)) 124 if (dict->GetBoolean("Scrollable", &scrollable))
125 new_layer->SetScrollClipLayerId(scrollable ? new_layer->id() 125 new_layer->SetScrollClipLayerId(scrollable ? new_layer->id()
126 : Layer::INVALID_ID); 126 : Layer::INVALID_ID);
127 127
128 bool wheel_handler;
129 if (dict->GetBoolean("WheelHandler", &wheel_handler))
130 new_layer->SetHaveWheelEventHandlers(wheel_handler);
131
132 bool scroll_handler; 128 bool scroll_handler;
133 if (dict->GetBoolean("ScrollHandler", &scroll_handler)) 129 if (dict->GetBoolean("ScrollHandler", &scroll_handler))
134 new_layer->SetHaveScrollEventHandlers(scroll_handler); 130 new_layer->SetHaveScrollEventHandlers(scroll_handler);
135 131
136 bool is_3d_sorted; 132 bool is_3d_sorted;
137 if (dict->GetBoolean("Is3DSorted", &is_3d_sorted)) { 133 if (dict->GetBoolean("Is3DSorted", &is_3d_sorted)) {
138 // A non-zero context ID will put the layer into a 3D sorting context 134 // A non-zero context ID will put the layer into a 3D sorting context
139 new_layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0); 135 new_layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0);
140 } 136 }
141 137
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 172
177 } // namespace 173 } // namespace
178 174
179 scoped_refptr<Layer> ParseTreeFromJson(std::string json, 175 scoped_refptr<Layer> ParseTreeFromJson(std::string json,
180 ContentLayerClient* content_client) { 176 ContentLayerClient* content_client) {
181 scoped_ptr<base::Value> val = base::test::ParseJson(json); 177 scoped_ptr<base::Value> val = base::test::ParseJson(json);
182 return ParseTreeFromValue(val.get(), content_client); 178 return ParseTreeFromValue(val.get(), content_client);
183 } 179 }
184 180
185 } // namespace cc 181 } // namespace cc
OLDNEW
« no previous file with comments | « cc/proto/layer_tree_host.proto ('k') | cc/test/layer_tree_json_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698