| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/renderer/extensions/automation_internal_custom_bindings.h" | 5 #include "chrome/renderer/extensions/automation_internal_custom_bindings.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 case SUBTREE_CREATED: | 1142 case SUBTREE_CREATED: |
| 1143 SendTreeChangeEvent( | 1143 SendTreeChangeEvent( |
| 1144 api::automation::TREE_CHANGE_TYPE_SUBTREECREATED, | 1144 api::automation::TREE_CHANGE_TYPE_SUBTREECREATED, |
| 1145 tree, node); | 1145 tree, node); |
| 1146 break; | 1146 break; |
| 1147 case NODE_CHANGED: | 1147 case NODE_CHANGED: |
| 1148 SendTreeChangeEvent( | 1148 SendTreeChangeEvent( |
| 1149 api::automation::TREE_CHANGE_TYPE_NODECHANGED, | 1149 api::automation::TREE_CHANGE_TYPE_NODECHANGED, |
| 1150 tree, node); | 1150 tree, node); |
| 1151 break; | 1151 break; |
| 1152 // Unhandled. |
| 1153 case NODE_REPARENTED: |
| 1154 case SUBTREE_REPARENTED: |
| 1155 break; |
| 1152 } | 1156 } |
| 1153 } | 1157 } |
| 1154 | 1158 |
| 1155 for (int id : text_changed_node_ids_) { | 1159 for (int id : text_changed_node_ids_) { |
| 1156 SendTreeChangeEvent(api::automation::TREE_CHANGE_TYPE_TEXTCHANGED, tree, | 1160 SendTreeChangeEvent(api::automation::TREE_CHANGE_TYPE_TEXTCHANGED, tree, |
| 1157 tree->GetFromId(id)); | 1161 tree->GetFromId(id)); |
| 1158 } | 1162 } |
| 1159 text_changed_node_ids_.clear(); | 1163 text_changed_node_ids_.clear(); |
| 1160 } | 1164 } |
| 1161 | 1165 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 v8::Local<v8::Array> args(v8::Array::New(GetIsolate(), 2U)); | 1257 v8::Local<v8::Array> args(v8::Array::New(GetIsolate(), 2U)); |
| 1254 args->Set(0U, v8::Integer::New(GetIsolate(), tree_id)); | 1258 args->Set(0U, v8::Integer::New(GetIsolate(), tree_id)); |
| 1255 v8::Local<v8::Array> nodes(v8::Array::New(GetIsolate(), ids.size())); | 1259 v8::Local<v8::Array> nodes(v8::Array::New(GetIsolate(), ids.size())); |
| 1256 args->Set(1U, nodes); | 1260 args->Set(1U, nodes); |
| 1257 for (size_t i = 0; i < ids.size(); ++i) | 1261 for (size_t i = 0; i < ids.size(); ++i) |
| 1258 nodes->Set(i, v8::Integer::New(GetIsolate(), ids[i])); | 1262 nodes->Set(i, v8::Integer::New(GetIsolate(), ids[i])); |
| 1259 context()->DispatchEvent("automationInternal.onNodesRemoved", args); | 1263 context()->DispatchEvent("automationInternal.onNodesRemoved", args); |
| 1260 } | 1264 } |
| 1261 | 1265 |
| 1262 } // namespace extensions | 1266 } // namespace extensions |
| OLD | NEW |