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

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: Fix crash Created 5 years, 4 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698