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

Side by Side Diff: content/shell/renderer/test_runner/AccessibilityController.h

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef AccessibilityController_h
6 #define AccessibilityController_h
7
8 #include "content/shell/renderer/test_runner/CppBoundClass.h"
9 #include "content/shell/renderer/test_runner/WebAXObjectProxy.h"
10
11 namespace blink {
12 class WebAXObject;
13 class WebFrame;
14 class WebView;
15 }
16
17 namespace WebTestRunner {
18
19 class WebTestDelegate;
20
21 class AccessibilityController : public CppBoundClass {
22 public:
23 AccessibilityController();
24
25 // Shadow to include accessibility initialization.
26 void bindToJavascript(blink::WebFrame*, const blink::WebString& classname);
27 void reset();
28
29 void setFocusedElement(const blink::WebAXObject&);
30 WebAXObjectProxy* getFocusedElement();
31 WebAXObjectProxy* getRootElement();
32 WebAXObjectProxy* getAccessibleElementById(const std::string& id);
33
34 bool shouldLogAccessibilityEvents();
35
36 void notificationReceived(const blink::WebAXObject& target, const char* noti ficationName);
37
38 void setDelegate(WebTestDelegate* delegate) { m_delegate = delegate; }
39 void setWebView(blink::WebView* webView) { m_webView = webView; }
40
41 private:
42 // If true, will log all accessibility notifications.
43 bool m_logAccessibilityEvents;
44
45 // Bound methods and properties
46 void logAccessibilityEventsCallback(const CppArgumentList&, CppVariant*);
47 void fallbackCallback(const CppArgumentList&, CppVariant*);
48 void addNotificationListenerCallback(const CppArgumentList&, CppVariant*);
49 void removeNotificationListenerCallback(const CppArgumentList&, CppVariant*) ;
50
51 void focusedElementGetterCallback(CppVariant*);
52 void rootElementGetterCallback(CppVariant*);
53 void accessibleElementByIdGetterCallback(const CppArgumentList&, CppVariant* );
54
55 WebAXObjectProxy* findAccessibleElementByIdRecursive(const blink::WebAXObjec t&, const blink::WebString& id);
56
57 blink::WebAXObject m_focusedElement;
58 blink::WebAXObject m_rootElement;
59
60 WebAXObjectProxyList m_elements;
61
62 std::vector<CppVariant> m_notificationCallbacks;
63
64 WebTestDelegate* m_delegate;
65 blink::WebView* m_webView;
66 };
67
68 }
69
70 #endif // AccessibilityController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698