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

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

Issue 1761633002: One accessibility tree per frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix is-richly-editable test Created 4 years, 9 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 "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/common/extensions/api/automation.h" 10 #include "chrome/common/extensions/api/automation.h"
11 #include "extensions/renderer/object_backed_native_handler.h" 11 #include "extensions/renderer/object_backed_native_handler.h"
12 #include "ipc/ipc_message.h" 12 #include "ipc/ipc_message.h"
13 #include "ui/accessibility/ax_tree.h" 13 #include "ui/accessibility/ax_tree.h"
14 #include "v8/include/v8.h" 14 #include "v8/include/v8.h"
15 15
16 struct ExtensionMsg_AccessibilityEventParams; 16 struct ExtensionMsg_AccessibilityEventParams;
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 class AutomationInternalCustomBindings;
20 class AutomationMessageFilter; 21 class AutomationMessageFilter;
21 22
22 struct TreeCache { 23 struct TreeCache {
23 TreeCache(); 24 TreeCache();
24 ~TreeCache(); 25 ~TreeCache();
25 26
26 int tab_id; 27 int tab_id;
27 int tree_id; 28 int tree_id;
29 int parent_node_id_from_parent_tree;
28 30
29 gfx::Vector2d location_offset; 31 gfx::Vector2d location_offset;
30 ui::AXTree tree; 32 ui::AXTree tree;
33 AutomationInternalCustomBindings* owner;
31 }; 34 };
32 35
33 struct TreeChangeObserver { 36 struct TreeChangeObserver {
34 int id; 37 int id;
35 api::automation::TreeChangeObserverFilter filter; 38 api::automation::TreeChangeObserverFilter filter;
36 }; 39 };
37 40
38 // The native component of custom bindings for the chrome.automationInternal 41 // The native component of custom bindings for the chrome.automationInternal
39 // API. 42 // API.
40 class AutomationInternalCustomBindings : public ObjectBackedNativeHandler, 43 class AutomationInternalCustomBindings : public ObjectBackedNativeHandler,
41 public ui::AXTreeDelegate { 44 public ui::AXTreeDelegate {
42 public: 45 public:
43 explicit AutomationInternalCustomBindings(ScriptContext* context); 46 explicit AutomationInternalCustomBindings(ScriptContext* context);
44 47
45 ~AutomationInternalCustomBindings() override; 48 ~AutomationInternalCustomBindings() override;
46 49
47 void OnMessageReceived(const IPC::Message& message); 50 void OnMessageReceived(const IPC::Message& message);
48 51
49 TreeCache* GetTreeCacheFromTreeID(int tree_id); 52 TreeCache* GetTreeCacheFromTreeID(int tree_id);
50 53
54 ui::AXNode* GetParent(ui::AXNode* node, TreeCache** in_out_cache);
55
51 ScriptContext* context() const { 56 ScriptContext* context() const {
52 return ObjectBackedNativeHandler::context(); 57 return ObjectBackedNativeHandler::context();
53 } 58 }
54 59
55 private: 60 private:
56 // ObjectBackedNativeHandler overrides: 61 // ObjectBackedNativeHandler overrides:
57 void Invalidate() override; 62 void Invalidate() override;
58 63
59 // Returns whether this extension has the "interact" permission set (either 64 // Returns whether this extension has the "interact" permission set (either
60 // explicitly or implicitly after manifest parsing). 65 // explicitly or implicitly after manifest parsing).
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 tree_change_observer_overall_filter_; 172 tree_change_observer_overall_filter_;
168 std::vector<int> deleted_node_ids_; 173 std::vector<int> deleted_node_ids_;
169 std::vector<int> text_changed_node_ids_; 174 std::vector<int> text_changed_node_ids_;
170 175
171 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); 176 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings);
172 }; 177 };
173 178
174 } // namespace extensions 179 } // namespace extensions
175 180
176 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ 181 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698