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 #include "components/test_runner/accessibility_controller.h" | 5 #include "components/test_runner/accessibility_controller.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "components/test_runner/web_test_proxy.h" | 8 #include "components/test_runner/web_view_test_proxy.h" |
9 #include "gin/handle.h" | 9 #include "gin/handle.h" |
10 #include "gin/object_template_builder.h" | 10 #include "gin/object_template_builder.h" |
11 #include "gin/wrappable.h" | 11 #include "gin/wrappable.h" |
12 #include "third_party/WebKit/public/web/WebDocument.h" | 12 #include "third_party/WebKit/public/web/WebDocument.h" |
13 #include "third_party/WebKit/public/web/WebElement.h" | 13 #include "third_party/WebKit/public/web/WebElement.h" |
14 #include "third_party/WebKit/public/web/WebFrame.h" | 14 #include "third_party/WebKit/public/web/WebFrame.h" |
15 #include "third_party/WebKit/public/web/WebKit.h" | 15 #include "third_party/WebKit/public/web/WebKit.h" |
16 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 16 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
17 #include "third_party/WebKit/public/web/WebSettings.h" | 17 #include "third_party/WebKit/public/web/WebSettings.h" |
18 #include "third_party/WebKit/public/web/WebView.h" | 18 #include "third_party/WebKit/public/web/WebView.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 return controller_ ? controller_->RootElement() : v8::Local<v8::Object>(); | 129 return controller_ ? controller_->RootElement() : v8::Local<v8::Object>(); |
130 } | 130 } |
131 | 131 |
132 v8::Local<v8::Object> AccessibilityControllerBindings::AccessibleElementById( | 132 v8::Local<v8::Object> AccessibilityControllerBindings::AccessibleElementById( |
133 const std::string& id) { | 133 const std::string& id) { |
134 return controller_ ? controller_->AccessibleElementById(id) | 134 return controller_ ? controller_->AccessibleElementById(id) |
135 : v8::Local<v8::Object>(); | 135 : v8::Local<v8::Object>(); |
136 } | 136 } |
137 | 137 |
138 AccessibilityController::AccessibilityController( | 138 AccessibilityController::AccessibilityController( |
139 WebTestProxyBase* web_test_proxy_base) | 139 WebViewTestProxyBase* web_view_test_proxy_base) |
140 : log_accessibility_events_(false), | 140 : log_accessibility_events_(false), |
141 web_test_proxy_base_(web_test_proxy_base), | 141 web_view_test_proxy_base_(web_view_test_proxy_base), |
142 weak_factory_(this) {} | 142 weak_factory_(this) {} |
143 | 143 |
144 AccessibilityController::~AccessibilityController() {} | 144 AccessibilityController::~AccessibilityController() {} |
145 | 145 |
146 void AccessibilityController::Reset() { | 146 void AccessibilityController::Reset() { |
147 elements_.Clear(); | 147 elements_.Clear(); |
148 notification_callback_.Reset(); | 148 notification_callback_.Reset(); |
149 log_accessibility_events_ = false; | 149 log_accessibility_events_ = false; |
150 } | 150 } |
151 | 151 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 v8::Local<v8::Object> result = | 263 v8::Local<v8::Object> result = |
264 FindAccessibleElementByIdRecursive(obj.childAt(i), id); | 264 FindAccessibleElementByIdRecursive(obj.childAt(i), id); |
265 if (*result) | 265 if (*result) |
266 return result; | 266 return result; |
267 } | 267 } |
268 | 268 |
269 return v8::Local<v8::Object>(); | 269 return v8::Local<v8::Object>(); |
270 } | 270 } |
271 | 271 |
272 blink::WebView* AccessibilityController::web_view() { | 272 blink::WebView* AccessibilityController::web_view() { |
273 return web_test_proxy_base_->web_view(); | 273 return web_view_test_proxy_base_->web_view(); |
274 } | 274 } |
275 | 275 |
276 } // namespace test_runner | 276 } // namespace test_runner |
OLD | NEW |