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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 bool GetAttributeHelper( | 141 bool GetAttributeHelper( |
142 const v8::FunctionCallbackInfo<v8::Value>& args, | 142 const v8::FunctionCallbackInfo<v8::Value>& args, |
143 ui::AXNode** out_node, | 143 ui::AXNode** out_node, |
144 std::string* out_attribute_name); | 144 std::string* out_attribute_name); |
145 | 145 |
146 // Create a V8 string from a string. | 146 // Create a V8 string from a string. |
147 v8::Local<v8::Value> CreateV8String(const char* str); | 147 v8::Local<v8::Value> CreateV8String(const char* str); |
148 v8::Local<v8::Value> CreateV8String(const std::string& str); | 148 v8::Local<v8::Value> CreateV8String(const std::string& str); |
149 | 149 |
150 // Handle accessibility events from the browser process. | 150 // Handle accessibility events from the browser process. |
151 void OnAccessibilityEvent( | 151 void OnAccessibilityEvent(const ExtensionMsg_AccessibilityEventParams& params, |
152 const ExtensionMsg_AccessibilityEventParams& params); | 152 bool is_active_profile); |
153 | 153 |
154 // AXTreeDelegate implementation. | 154 // AXTreeDelegate implementation. |
155 void OnNodeWillBeDeleted(ui::AXTree* tree, ui::AXNode* node) override; | 155 void OnNodeWillBeDeleted(ui::AXTree* tree, ui::AXNode* node) override; |
156 void OnSubtreeWillBeDeleted(ui::AXTree* tree, ui::AXNode* node) override; | 156 void OnSubtreeWillBeDeleted(ui::AXTree* tree, ui::AXNode* node) override; |
157 void OnNodeCreated(ui::AXTree* tree, ui::AXNode* node) override; | 157 void OnNodeCreated(ui::AXTree* tree, ui::AXNode* node) override; |
158 void OnNodeChanged(ui::AXTree* tree, ui::AXNode* node) override; | 158 void OnNodeChanged(ui::AXTree* tree, ui::AXNode* node) override; |
159 void OnAtomicUpdateFinished(ui::AXTree* tree, | 159 void OnAtomicUpdateFinished(ui::AXTree* tree, |
160 bool root_changed, | 160 bool root_changed, |
161 const std::vector<Change>& changes) override; | 161 const std::vector<Change>& changes) override; |
162 | 162 |
163 void SendTreeChangeEvent(api::automation::TreeChangeType change_type, | 163 void SendTreeChangeEvent(api::automation::TreeChangeType change_type, |
164 ui::AXTree* tree, | 164 ui::AXTree* tree, |
165 ui::AXNode* node); | 165 ui::AXNode* node); |
166 | 166 |
167 base::hash_map<int, TreeCache*> tree_id_to_tree_cache_map_; | 167 base::hash_map<int, TreeCache*> tree_id_to_tree_cache_map_; |
168 base::hash_map<ui::AXTree*, TreeCache*> axtree_to_tree_cache_map_; | 168 base::hash_map<ui::AXTree*, TreeCache*> axtree_to_tree_cache_map_; |
169 scoped_refptr<AutomationMessageFilter> message_filter_; | 169 scoped_refptr<AutomationMessageFilter> message_filter_; |
| 170 bool is_active_profile_; |
170 | 171 |
171 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); | 172 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); |
172 }; | 173 }; |
173 | 174 |
174 } // namespace extensions | 175 } // namespace extensions |
175 | 176 |
176 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 177 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
OLD | NEW |