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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( |
152 const ExtensionMsg_AccessibilityEventParams& params); | 152 const ExtensionMsg_AccessibilityEventParams& params, |
| 153 bool is_active_profile); |
153 | 154 |
154 // AXTreeDelegate implementation. | 155 // AXTreeDelegate implementation. |
155 void OnNodeWillBeDeleted(ui::AXTree* tree, ui::AXNode* node) override; | 156 void OnNodeWillBeDeleted(ui::AXTree* tree, ui::AXNode* node) override; |
156 void OnSubtreeWillBeDeleted(ui::AXTree* tree, ui::AXNode* node) override; | 157 void OnSubtreeWillBeDeleted(ui::AXTree* tree, ui::AXNode* node) override; |
157 void OnNodeCreated(ui::AXTree* tree, ui::AXNode* node) override; | 158 void OnNodeCreated(ui::AXTree* tree, ui::AXNode* node) override; |
158 void OnNodeChanged(ui::AXTree* tree, ui::AXNode* node) override; | 159 void OnNodeChanged(ui::AXTree* tree, ui::AXNode* node) override; |
159 void OnAtomicUpdateFinished(ui::AXTree* tree, | 160 void OnAtomicUpdateFinished(ui::AXTree* tree, |
160 bool root_changed, | 161 bool root_changed, |
161 const std::vector<Change>& changes) override; | 162 const std::vector<Change>& changes) override; |
162 | 163 |
163 void SendTreeChangeEvent(api::automation::TreeChangeType change_type, | 164 void SendTreeChangeEvent(api::automation::TreeChangeType change_type, |
164 ui::AXTree* tree, | 165 ui::AXTree* tree, |
165 ui::AXNode* node); | 166 ui::AXNode* node); |
166 | 167 |
167 base::hash_map<int, TreeCache*> tree_id_to_tree_cache_map_; | 168 base::hash_map<int, TreeCache*> tree_id_to_tree_cache_map_; |
168 base::hash_map<ui::AXTree*, TreeCache*> axtree_to_tree_cache_map_; | 169 base::hash_map<ui::AXTree*, TreeCache*> axtree_to_tree_cache_map_; |
169 scoped_refptr<AutomationMessageFilter> message_filter_; | 170 scoped_refptr<AutomationMessageFilter> message_filter_; |
| 171 bool is_active_profile_; |
170 | 172 |
171 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); | 173 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); |
172 }; | 174 }; |
173 | 175 |
174 } // namespace extensions | 176 } // namespace extensions |
175 | 177 |
176 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 178 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
OLD | NEW |