| 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 #ifndef CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/common/extensions/api/automation.h" | 9 #include "chrome/common/extensions/api/automation.h" |
| 10 #include "extensions/renderer/object_backed_native_handler.h" | 10 #include "extensions/renderer/object_backed_native_handler.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // events forwarded to this process. | 67 // events forwarded to this process. |
| 68 void StartCachingAccessibilityTrees( | 68 void StartCachingAccessibilityTrees( |
| 69 const v8::FunctionCallbackInfo<v8::Value>& args); | 69 const v8::FunctionCallbackInfo<v8::Value>& args); |
| 70 | 70 |
| 71 // Called when an accessibility tree is destroyed and needs to be | 71 // Called when an accessibility tree is destroyed and needs to be |
| 72 // removed from our cache. | 72 // removed from our cache. |
| 73 // Args: int ax_tree_id | 73 // Args: int ax_tree_id |
| 74 void DestroyAccessibilityTree( | 74 void DestroyAccessibilityTree( |
| 75 const v8::FunctionCallbackInfo<v8::Value>& args); | 75 const v8::FunctionCallbackInfo<v8::Value>& args); |
| 76 | 76 |
| 77 // Set what types of tree change events should be sent to the client. |
| 78 void SetTreeChangeObserverMask( |
| 79 const v8::FunctionCallbackInfo<v8::Value>& args); |
| 80 |
| 77 void RouteTreeIDFunction(const std::string& name, | 81 void RouteTreeIDFunction(const std::string& name, |
| 78 void (*callback)(v8::Isolate* isolate, | 82 void (*callback)(v8::Isolate* isolate, |
| 79 v8::ReturnValue<v8::Value> result, | 83 v8::ReturnValue<v8::Value> result, |
| 80 TreeCache* cache)); | 84 TreeCache* cache)); |
| 81 | 85 |
| 82 void RouteNodeIDFunction(const std::string& name, | 86 void RouteNodeIDFunction(const std::string& name, |
| 83 void (*callback)(v8::Isolate* isolate, | 87 void (*callback)(v8::Isolate* isolate, |
| 84 v8::ReturnValue<v8::Value> result, | 88 v8::ReturnValue<v8::Value> result, |
| 85 TreeCache* cache, | 89 TreeCache* cache, |
| 86 ui::AXNode* node)); | 90 ui::AXNode* node)); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 const std::vector<Change>& changes) override; | 174 const std::vector<Change>& changes) override; |
| 171 | 175 |
| 172 void SendTreeChangeEvent(api::automation::TreeChangeType change_type, | 176 void SendTreeChangeEvent(api::automation::TreeChangeType change_type, |
| 173 ui::AXTree* tree, | 177 ui::AXTree* tree, |
| 174 ui::AXNode* node); | 178 ui::AXNode* node); |
| 175 | 179 |
| 176 base::hash_map<int, TreeCache*> tree_id_to_tree_cache_map_; | 180 base::hash_map<int, TreeCache*> tree_id_to_tree_cache_map_; |
| 177 base::hash_map<ui::AXTree*, TreeCache*> axtree_to_tree_cache_map_; | 181 base::hash_map<ui::AXTree*, TreeCache*> axtree_to_tree_cache_map_; |
| 178 scoped_refptr<AutomationMessageFilter> message_filter_; | 182 scoped_refptr<AutomationMessageFilter> message_filter_; |
| 179 bool is_active_profile_; | 183 bool is_active_profile_; |
| 184 api::automation::TreeChangeObserverMask tree_change_observer_mask_; |
| 180 | 185 |
| 181 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); | 186 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); |
| 182 }; | 187 }; |
| 183 | 188 |
| 184 } // namespace extensions | 189 } // namespace extensions |
| 185 | 190 |
| 186 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 191 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
| OLD | NEW |