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

Side by Side Diff: content/test/accessibility_browser_test_utils.h

Issue 273423004: Migrate accessibility from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more compile errors Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_ 5 #ifndef CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_
6 #define CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_ 6 #define CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "content/common/view_message_enums.h" 9 #include "content/common/accessibility_mode_enums.h"
10 #include "ui/accessibility/ax_node_data.h" 10 #include "ui/accessibility/ax_node_data.h"
11 #include "ui/accessibility/ax_tree.h" 11 #include "ui/accessibility/ax_tree.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class MessageLoopRunner; 15 class MessageLoopRunner;
16 class RenderViewHostImpl; 16 class RenderFrameHostImpl;
17 class Shell; 17 class Shell;
18 18
19 // Create an instance of this class *before* doing any operation that 19 // Create an instance of this class *before* doing any operation that
20 // might generate an accessibility event (like a page navigation or 20 // might generate an accessibility event (like a page navigation or
21 // clicking on a button). Then call WaitForNotification 21 // clicking on a button). Then call WaitForNotification
22 // afterwards to block until the specified accessibility notification has been 22 // afterwards to block until the specified accessibility notification has been
23 // received. 23 // received.
24 class AccessibilityNotificationWaiter { 24 class AccessibilityNotificationWaiter {
25 public: 25 public:
26 explicit AccessibilityNotificationWaiter(Shell* shell); 26 explicit AccessibilityNotificationWaiter(Shell* shell);
(...skipping 15 matching lines...) Expand all
42 42
43 private: 43 private:
44 // Callback from RenderViewHostImpl. 44 // Callback from RenderViewHostImpl.
45 void OnAccessibilityEvent(ui::AXEvent event); 45 void OnAccessibilityEvent(ui::AXEvent event);
46 46
47 // Helper function to determine if the accessibility tree in 47 // Helper function to determine if the accessibility tree in
48 // GetAXTree() is about the page with the url "about:blank". 48 // GetAXTree() is about the page with the url "about:blank".
49 bool IsAboutBlank(); 49 bool IsAboutBlank();
50 50
51 Shell* shell_; 51 Shell* shell_;
52 RenderViewHostImpl* view_host_; 52 RenderFrameHostImpl* frame_host_;
53 ui::AXEvent event_to_wait_for_; 53 ui::AXEvent event_to_wait_for_;
54 scoped_refptr<MessageLoopRunner> loop_runner_; 54 scoped_refptr<MessageLoopRunner> loop_runner_;
55 base::WeakPtrFactory<AccessibilityNotificationWaiter> weak_factory_; 55 base::WeakPtrFactory<AccessibilityNotificationWaiter> weak_factory_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(AccessibilityNotificationWaiter); 57 DISALLOW_COPY_AND_ASSIGN(AccessibilityNotificationWaiter);
58 }; 58 };
59 59
60 } // namespace content 60 } // namespace content
61 61
62 #endif // CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_ 62 #endif // CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698