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

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

Issue 2863833003: Fix primary cause of flakiness of DumpAccessibilityEvents tests on Win (Closed)
Patch Set: Fix logic Created 3 years, 7 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 void NavigationFailed(); 176 void NavigationFailed();
177 177
178 // Pretend that the given node has focus, for testing only. Doesn't 178 // Pretend that the given node has focus, for testing only. Doesn't
179 // communicate with the renderer and doesn't fire any events. 179 // communicate with the renderer and doesn't fire any events.
180 void SetFocusLocallyForTesting(BrowserAccessibility* node); 180 void SetFocusLocallyForTesting(BrowserAccessibility* node);
181 181
182 // For testing only, register a function to be called when focus changes 182 // For testing only, register a function to be called when focus changes
183 // in any BrowserAccessibilityManager. 183 // in any BrowserAccessibilityManager.
184 static void SetFocusChangeCallbackForTesting(const base::Closure& callback); 184 static void SetFocusChangeCallbackForTesting(const base::Closure& callback);
185 185
186 // Normally we avoid firing accessibility focus events when the containing
187 // native window isn't focused. However, this can lead to test flakiness
188 // because we can't control when a window loses focus, so this provides a
189 // way to disable that check for tests.
190 static void NeverSuppressFocusEventsForTesting();
191
186 // Accessibility actions. All of these are implemented asynchronously 192 // Accessibility actions. All of these are implemented asynchronously
187 // by sending a message to the renderer to perform the respective action 193 // by sending a message to the renderer to perform the respective action
188 // on the given node. See the definition of |ui::AXActionData| for more 194 // on the given node. See the definition of |ui::AXActionData| for more
189 // information about each of these actions. 195 // information about each of these actions.
190 void Decrement(const BrowserAccessibility& node); 196 void Decrement(const BrowserAccessibility& node);
191 void DoDefaultAction(const BrowserAccessibility& node); 197 void DoDefaultAction(const BrowserAccessibility& node);
192 void GetImageData(const BrowserAccessibility& node, 198 void GetImageData(const BrowserAccessibility& node,
193 const gfx::Size& max_size); 199 const gfx::Size& max_size);
194 void HitTest(const gfx::Point& point); 200 void HitTest(const gfx::Point& point);
195 void Increment(const BrowserAccessibility& node); 201 void Increment(const BrowserAccessibility& node);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 // used and it won't be updated from the delegate. 488 // used and it won't be updated from the delegate.
483 bool use_custom_device_scale_factor_for_testing_; 489 bool use_custom_device_scale_factor_for_testing_;
484 490
485 private: 491 private:
486 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); 492 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
487 }; 493 };
488 494
489 } // namespace content 495 } // namespace content
490 496
491 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 497 #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