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

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

Issue 1836113002: Fix accessible touch exploration inside of iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test startup on Android Created 4 years, 8 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 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/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/common/accessibility_mode_enums.h" 10 #include "content/common/accessibility_mode_enums.h"
(...skipping 29 matching lines...) Expand all
40 // AccessibilityNotificationWaiter is received. Ignores notifications for 40 // AccessibilityNotificationWaiter is received. Ignores notifications for
41 // "about:blank". 41 // "about:blank".
42 void WaitForNotification(); 42 void WaitForNotification();
43 43
44 // After WaitForNotification has returned, this will retrieve 44 // After WaitForNotification has returned, this will retrieve
45 // the tree of accessibility nodes received from the renderer process. 45 // the tree of accessibility nodes received from the renderer process.
46 const ui::AXTree& GetAXTree() const; 46 const ui::AXTree& GetAXTree() const;
47 47
48 // After WaitForNotification returns, use this to retrieve the id of the 48 // After WaitForNotification returns, use this to retrieve the id of the
49 // node that was the target of the event. 49 // node that was the target of the event.
50 int event_target_id() { return event_target_id_; } 50 int event_target_id() const { return event_target_id_; }
51
52 // After WaitForNotification returns, use this to retrieve the
53 // RenderFrameHostImpl that was the target of the event.
54 RenderFrameHostImpl* event_render_frame_host() const {
55 return event_render_frame_host_;
56 }
51 57
52 private: 58 private:
53 // Callback from RenderViewHostImpl. 59 // Callback from RenderViewHostImpl.
54 void OnAccessibilityEvent(ui::AXEvent event, int event_target_id); 60 void OnAccessibilityEvent(content::RenderFrameHostImpl* rfhi,
61 ui::AXEvent event,
62 int event_target_id);
55 63
56 // Helper function to determine if the accessibility tree in 64 // Helper function to determine if the accessibility tree in
57 // GetAXTree() is about the page with the url "about:blank". 65 // GetAXTree() is about the page with the url "about:blank".
58 bool IsAboutBlank(); 66 bool IsAboutBlank();
59 67
60 RenderFrameHostImpl* frame_host_; 68 RenderFrameHostImpl* frame_host_;
61 ui::AXEvent event_to_wait_for_; 69 ui::AXEvent event_to_wait_for_;
62 scoped_refptr<MessageLoopRunner> loop_runner_; 70 scoped_refptr<MessageLoopRunner> loop_runner_;
63 int event_target_id_; 71 int event_target_id_;
72 RenderFrameHostImpl* event_render_frame_host_;
64 73
65 base::WeakPtrFactory<AccessibilityNotificationWaiter> weak_factory_; 74 base::WeakPtrFactory<AccessibilityNotificationWaiter> weak_factory_;
66 75
67 DISALLOW_COPY_AND_ASSIGN(AccessibilityNotificationWaiter); 76 DISALLOW_COPY_AND_ASSIGN(AccessibilityNotificationWaiter);
68 }; 77 };
69 78
70 } // namespace content 79 } // namespace content
71 80
72 #endif // CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_ 81 #endif // CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility.cc ('k') | content/test/accessibility_browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698