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

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: Fix win and android compile 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
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // True by default, but some platforms want to treat the root 226 // True by default, but some platforms want to treat the root
227 // scroll offsets separately. 227 // scroll offsets separately.
228 virtual bool UseRootScrollOffsetsWhenComputingBounds(); 228 virtual bool UseRootScrollOffsetsWhenComputingBounds();
229 229
230 // Walk the tree. 230 // Walk the tree.
231 BrowserAccessibility* NextInTreeOrder(BrowserAccessibility* node); 231 BrowserAccessibility* NextInTreeOrder(BrowserAccessibility* node);
232 BrowserAccessibility* PreviousInTreeOrder(BrowserAccessibility* node); 232 BrowserAccessibility* PreviousInTreeOrder(BrowserAccessibility* node);
233 233
234 // AXTreeDelegate implementation. 234 // AXTreeDelegate implementation.
235 void OnNodeWillBeDeleted(ui::AXNode* node) override; 235 void OnNodeWillBeDeleted(ui::AXNode* node) override;
236 void OnSubtreeWillBeDeleted(ui::AXNode* node) override;
236 void OnNodeCreated(ui::AXNode* node) override; 237 void OnNodeCreated(ui::AXNode* node) override;
237 void OnNodeChanged(ui::AXNode* node) override; 238 void OnNodeChanged(ui::AXNode* node) override;
238 void OnNodeCreationFinished(ui::AXNode* node) override; 239 void OnAtomicUpdateFinished(
239 void OnNodeChangeFinished(ui::AXNode* node) override; 240 bool root_changed,
240 void OnRootChanged(ui::AXNode* new_root) override {} 241 const std::vector<ui::AXTreeDelegate::Change>& changes) override;
241 242
242 BrowserAccessibilityDelegate* delegate() const { return delegate_; } 243 BrowserAccessibilityDelegate* delegate() const { return delegate_; }
243 void set_delegate(BrowserAccessibilityDelegate* delegate) { 244 void set_delegate(BrowserAccessibilityDelegate* delegate) {
244 delegate_ = delegate; 245 delegate_ = delegate;
245 } 246 }
246 247
247 // Get a snapshot of the current tree as an AXTreeUpdate. 248 // Get a snapshot of the current tree as an AXTreeUpdate.
248 ui::AXTreeUpdate SnapshotAXTreeForTesting(); 249 ui::AXTreeUpdate SnapshotAXTreeForTesting();
249 250
250 protected: 251 protected:
251 BrowserAccessibilityManager( 252 BrowserAccessibilityManager(
252 BrowserAccessibilityDelegate* delegate, 253 BrowserAccessibilityDelegate* delegate,
253 BrowserAccessibilityFactory* factory); 254 BrowserAccessibilityFactory* factory);
254 255
255 BrowserAccessibilityManager( 256 BrowserAccessibilityManager(
256 const ui::AXTreeUpdate& initial_tree, 257 const ui::AXTreeUpdate& initial_tree,
257 BrowserAccessibilityDelegate* delegate, 258 BrowserAccessibilityDelegate* delegate,
258 BrowserAccessibilityFactory* factory); 259 BrowserAccessibilityFactory* factory);
259 260
260 // Called at the end of updating the tree.
261 virtual void OnTreeUpdateFinished() {}
262
263 private: 261 private:
264 // The following states keep track of whether or not the 262 // The following states keep track of whether or not the
265 // on-screen keyboard is allowed to be shown. 263 // on-screen keyboard is allowed to be shown.
266 enum OnScreenKeyboardState { 264 enum OnScreenKeyboardState {
267 // Never show the on-screen keyboard because this tab is hidden. 265 // Never show the on-screen keyboard because this tab is hidden.
268 OSK_DISALLOWED_BECAUSE_TAB_HIDDEN, 266 OSK_DISALLOWED_BECAUSE_TAB_HIDDEN,
269 267
270 // This tab was just shown, so don't pop-up the on-screen keyboard if a 268 // This tab was just shown, so don't pop-up the on-screen keyboard if a
271 // text field gets focus that wasn't the result of an explicit touch. 269 // text field gets focus that wasn't the result of an explicit touch.
272 OSK_DISALLOWED_BECAUSE_TAB_JUST_APPEARED, 270 OSK_DISALLOWED_BECAUSE_TAB_JUST_APPEARED,
(...skipping 30 matching lines...) Expand all
303 OnScreenKeyboardState osk_state_; 301 OnScreenKeyboardState osk_state_;
304 302
305 BrowserAccessibilityFindInPageInfo find_in_page_info_; 303 BrowserAccessibilityFindInPageInfo find_in_page_info_;
306 304
307 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); 305 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
308 }; 306 };
309 307
310 } // namespace content 308 } // namespace content
311 309
312 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 310 #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') | ui/accessibility/ax_tree.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698