OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SHELL_RENDERER_TEST_RUNNER_ACCESSIBILITY_CONTROLLER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_ACCESSIBILITY_CONTROLLER_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_ACCESSIBILITY_CONTROLLER_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_ACCESSIBILITY_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 const std::string& notification_name); | 36 const std::string& notification_name); |
37 | 37 |
38 void SetDelegate(WebTestDelegate* delegate); | 38 void SetDelegate(WebTestDelegate* delegate); |
39 void SetWebView(blink::WebView* web_view); | 39 void SetWebView(blink::WebView* web_view); |
40 | 40 |
41 private: | 41 private: |
42 friend class AccessibilityControllerBindings; | 42 friend class AccessibilityControllerBindings; |
43 | 43 |
44 // Bound methods and properties | 44 // Bound methods and properties |
45 void LogAccessibilityEvents(); | 45 void LogAccessibilityEvents(); |
46 void SetNotificationListener(v8::Handle<v8::Function> callback); | 46 void SetNotificationListener(v8::Local<v8::Function> callback); |
47 void UnsetNotificationListener(); | 47 void UnsetNotificationListener(); |
48 v8::Handle<v8::Object> FocusedElement(); | 48 v8::Local<v8::Object> FocusedElement(); |
49 v8::Handle<v8::Object> RootElement(); | 49 v8::Local<v8::Object> RootElement(); |
50 v8::Handle<v8::Object> AccessibleElementById(const std::string& id); | 50 v8::Local<v8::Object> AccessibleElementById(const std::string& id); |
51 | 51 |
52 v8::Handle<v8::Object> FindAccessibleElementByIdRecursive( | 52 v8::Local<v8::Object> FindAccessibleElementByIdRecursive( |
53 const blink::WebAXObject&, const blink::WebString& id); | 53 const blink::WebAXObject&, const blink::WebString& id); |
54 | 54 |
55 // If true, will log all accessibility notifications. | 55 // If true, will log all accessibility notifications. |
56 bool log_accessibility_events_; | 56 bool log_accessibility_events_; |
57 | 57 |
58 blink::WebAXObject focused_element_; | 58 blink::WebAXObject focused_element_; |
59 blink::WebAXObject root_element_; | 59 blink::WebAXObject root_element_; |
60 | 60 |
61 WebAXObjectProxyList elements_; | 61 WebAXObjectProxyList elements_; |
62 | 62 |
63 v8::Persistent<v8::Function> notification_callback_; | 63 v8::Persistent<v8::Function> notification_callback_; |
64 | 64 |
65 WebTestDelegate* delegate_; | 65 WebTestDelegate* delegate_; |
66 blink::WebView* web_view_; | 66 blink::WebView* web_view_; |
67 | 67 |
68 base::WeakPtrFactory<AccessibilityController> weak_factory_; | 68 base::WeakPtrFactory<AccessibilityController> weak_factory_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(AccessibilityController); | 70 DISALLOW_COPY_AND_ASSIGN(AccessibilityController); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace content | 73 } // namespace content |
74 | 74 |
75 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_ACCESSIBILITY_CONTROLLER_H_ | 75 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_ACCESSIBILITY_CONTROLLER_H_ |
OLD | NEW |