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 "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 case SUBTREE_CREATED: | 949 case SUBTREE_CREATED: |
950 SendTreeChangeEvent( | 950 SendTreeChangeEvent( |
951 api::automation::TREE_CHANGE_TYPE_SUBTREECREATED, | 951 api::automation::TREE_CHANGE_TYPE_SUBTREECREATED, |
952 tree, node); | 952 tree, node); |
953 break; | 953 break; |
954 case NODE_CHANGED: | 954 case NODE_CHANGED: |
955 SendTreeChangeEvent( | 955 SendTreeChangeEvent( |
956 api::automation::TREE_CHANGE_TYPE_NODECHANGED, | 956 api::automation::TREE_CHANGE_TYPE_NODECHANGED, |
957 tree, node); | 957 tree, node); |
958 break; | 958 break; |
| 959 case TEXT_CHANGED: |
| 960 SendTreeChangeEvent(api::automation::TREE_CHANGE_TYPE_TEXTCHANGED, tree, |
| 961 node); |
| 962 break; |
959 } | 963 } |
960 } | 964 } |
961 } | 965 } |
962 | 966 |
963 void AutomationInternalCustomBindings::SendTreeChangeEvent( | 967 void AutomationInternalCustomBindings::SendTreeChangeEvent( |
964 api::automation::TreeChangeType change_type, | 968 api::automation::TreeChangeType change_type, |
965 ui::AXTree* tree, | 969 ui::AXTree* tree, |
966 ui::AXNode* node) { | 970 ui::AXNode* node) { |
967 // Don't send tree change events when it's not the active profile. | 971 // Don't send tree change events when it's not the active profile. |
968 if (!is_active_profile_) | 972 if (!is_active_profile_) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 v8::Local<v8::Array> args(v8::Array::New(GetIsolate(), 2U)); | 1058 v8::Local<v8::Array> args(v8::Array::New(GetIsolate(), 2U)); |
1055 args->Set(0U, v8::Integer::New(GetIsolate(), tree_id)); | 1059 args->Set(0U, v8::Integer::New(GetIsolate(), tree_id)); |
1056 v8::Local<v8::Array> nodes(v8::Array::New(GetIsolate(), ids.size())); | 1060 v8::Local<v8::Array> nodes(v8::Array::New(GetIsolate(), ids.size())); |
1057 args->Set(1U, nodes); | 1061 args->Set(1U, nodes); |
1058 for (size_t i = 0; i < ids.size(); ++i) | 1062 for (size_t i = 0; i < ids.size(); ++i) |
1059 nodes->Set(i, v8::Integer::New(GetIsolate(), ids[i])); | 1063 nodes->Set(i, v8::Integer::New(GetIsolate(), ids[i])); |
1060 context()->DispatchEvent("automationInternal.onNodesRemoved", args); | 1064 context()->DispatchEvent("automationInternal.onNodesRemoved", args); |
1061 } | 1065 } |
1062 | 1066 |
1063 } // namespace extensions | 1067 } // namespace extensions |
OLD | NEW |