Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: chrome/renderer/extensions/automation_internal_custom_bindings.h

Issue 1268163002: Dispatch automation events to the last used profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698