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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager.h

Issue 830943004: Improve the notifications sent from AXTree updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback, add missing call to parent class Created 5 years, 11 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
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // True by default, but some platforms want to treat the root 228 // True by default, but some platforms want to treat the root
229 // scroll offsets separately. 229 // scroll offsets separately.
230 virtual bool UseRootScrollOffsetsWhenComputingBounds(); 230 virtual bool UseRootScrollOffsetsWhenComputingBounds();
231 231
232 // Walk the tree. 232 // Walk the tree.
233 BrowserAccessibility* NextInTreeOrder(BrowserAccessibility* node); 233 BrowserAccessibility* NextInTreeOrder(BrowserAccessibility* node);
234 BrowserAccessibility* PreviousInTreeOrder(BrowserAccessibility* node); 234 BrowserAccessibility* PreviousInTreeOrder(BrowserAccessibility* node);
235 235
236 // AXTreeDelegate implementation. 236 // AXTreeDelegate implementation.
237 void OnNodeWillBeDeleted(ui::AXNode* node) override; 237 void OnNodeWillBeDeleted(ui::AXNode* node) override;
238 void OnSubtreeWillBeDeleted(ui::AXNode* node) override;
238 void OnNodeCreated(ui::AXNode* node) override; 239 void OnNodeCreated(ui::AXNode* node) override;
239 void OnNodeChanged(ui::AXNode* node) override; 240 void OnNodeChanged(ui::AXNode* node) override;
240 void OnNodeCreationFinished(ui::AXNode* node) override; 241 void OnAtomicUpdateFinished(
241 void OnNodeChangeFinished(ui::AXNode* node) override; 242 bool root_changed,
242 void OnRootChanged(ui::AXNode* new_root) override {} 243 const std::vector<ui::AXTreeDelegate::Change>& changes) override;
243 244
244 BrowserAccessibilityDelegate* delegate() const { return delegate_; } 245 BrowserAccessibilityDelegate* delegate() const { return delegate_; }
245 void set_delegate(BrowserAccessibilityDelegate* delegate) { 246 void set_delegate(BrowserAccessibilityDelegate* delegate) {
246 delegate_ = delegate; 247 delegate_ = delegate;
247 } 248 }
248 249
249 // If this BrowserAccessibilityManager is a child frame or guest frame, 250 // If this BrowserAccessibilityManager is a child frame or guest frame,
250 // return the BrowserAccessibilityDelegate from the highest ancestor frame 251 // return the BrowserAccessibilityDelegate from the highest ancestor frame
251 // in the frame tree. 252 // in the frame tree.
252 BrowserAccessibilityDelegate* GetDelegateFromRootManager(); 253 BrowserAccessibilityDelegate* GetDelegateFromRootManager();
253 254
254 // Get a snapshot of the current tree as an AXTreeUpdate. 255 // Get a snapshot of the current tree as an AXTreeUpdate.
255 ui::AXTreeUpdate SnapshotAXTreeForTesting(); 256 ui::AXTreeUpdate SnapshotAXTreeForTesting();
256 257
257 protected: 258 protected:
258 BrowserAccessibilityManager( 259 BrowserAccessibilityManager(
259 BrowserAccessibilityDelegate* delegate, 260 BrowserAccessibilityDelegate* delegate,
260 BrowserAccessibilityFactory* factory); 261 BrowserAccessibilityFactory* factory);
261 262
262 BrowserAccessibilityManager( 263 BrowserAccessibilityManager(
263 const ui::AXTreeUpdate& initial_tree, 264 const ui::AXTreeUpdate& initial_tree,
264 BrowserAccessibilityDelegate* delegate, 265 BrowserAccessibilityDelegate* delegate,
265 BrowserAccessibilityFactory* factory); 266 BrowserAccessibilityFactory* factory);
266 267
267 // Called at the end of updating the tree.
268 virtual void OnTreeUpdateFinished() {}
269
270 private: 268 private:
271 // The following states keep track of whether or not the 269 // The following states keep track of whether or not the
272 // on-screen keyboard is allowed to be shown. 270 // on-screen keyboard is allowed to be shown.
273 enum OnScreenKeyboardState { 271 enum OnScreenKeyboardState {
274 // Never show the on-screen keyboard because this tab is hidden. 272 // Never show the on-screen keyboard because this tab is hidden.
275 OSK_DISALLOWED_BECAUSE_TAB_HIDDEN, 273 OSK_DISALLOWED_BECAUSE_TAB_HIDDEN,
276 274
277 // This tab was just shown, so don't pop-up the on-screen keyboard if a 275 // This tab was just shown, so don't pop-up the on-screen keyboard if a
278 // text field gets focus that wasn't the result of an explicit touch. 276 // text field gets focus that wasn't the result of an explicit touch.
279 OSK_DISALLOWED_BECAUSE_TAB_JUST_APPEARED, 277 OSK_DISALLOWED_BECAUSE_TAB_JUST_APPEARED,
(...skipping 30 matching lines...) Expand all
310 OnScreenKeyboardState osk_state_; 308 OnScreenKeyboardState osk_state_;
311 309
312 BrowserAccessibilityFindInPageInfo find_in_page_info_; 310 BrowserAccessibilityFindInPageInfo find_in_page_info_;
313 311
314 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); 312 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
315 }; 313 };
316 314
317 } // namespace content 315 } // namespace content
318 316
319 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 317 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698