Chromium Code Reviews| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 const std::vector<Change>& changes) override; | 166 const std::vector<Change>& changes) override; |
| 163 | 167 |
| 164 void SendTreeChangeEvent(api::automation::TreeChangeType change_type, | 168 void SendTreeChangeEvent(api::automation::TreeChangeType change_type, |
| 165 ui::AXTree* tree, | 169 ui::AXTree* tree, |
| 166 ui::AXNode* node); | 170 ui::AXNode* node); |
| 167 | 171 |
| 168 base::hash_map<int, TreeCache*> tree_id_to_tree_cache_map_; | 172 base::hash_map<int, TreeCache*> tree_id_to_tree_cache_map_; |
| 169 base::hash_map<ui::AXTree*, TreeCache*> axtree_to_tree_cache_map_; | 173 base::hash_map<ui::AXTree*, TreeCache*> axtree_to_tree_cache_map_; |
| 170 scoped_refptr<AutomationMessageFilter> message_filter_; | 174 scoped_refptr<AutomationMessageFilter> message_filter_; |
| 171 bool is_active_profile_; | 175 bool is_active_profile_; |
| 176 api::automation::TreeChangeObserverMask tree_change_observer_mask_; | |
|
Peter Lundblad
2015/11/20 13:42:59
Just to make sure, thee's one of these per extensi
dmazzoni
2015/11/23 20:16:50
Yes.
| |
| 172 | 177 |
| 173 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); | 178 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); |
| 174 }; | 179 }; |
| 175 | 180 |
| 176 } // namespace extensions | 181 } // namespace extensions |
| 177 | 182 |
| 178 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 183 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
| OLD | NEW |