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 "content/shell/test_runner/web_ax_object_proxy.h" | 5 #include "content/shell/test_runner/web_ax_object_proxy.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "gin/handle.h" | 11 #include "gin/handle.h" |
12 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 12 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
13 #include "third_party/WebKit/public/platform/WebPoint.h" | 13 #include "third_party/WebKit/public/platform/WebPoint.h" |
14 #include "third_party/WebKit/public/platform/WebRect.h" | 14 #include "third_party/WebKit/public/platform/WebRect.h" |
15 #include "third_party/WebKit/public/platform/WebString.h" | 15 #include "third_party/WebKit/public/platform/WebString.h" |
16 #include "third_party/WebKit/public/web/WebFrame.h" | |
17 #include "third_party/WebKit/public/web/WebKit.h" | 16 #include "third_party/WebKit/public/web/WebKit.h" |
| 17 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
18 #include "third_party/skia/include/core/SkMatrix44.h" | 18 #include "third_party/skia/include/core/SkMatrix44.h" |
19 #include "ui/gfx/geometry/rect_f.h" | 19 #include "ui/gfx/geometry/rect_f.h" |
20 #include "ui/gfx/transform.h" | 20 #include "ui/gfx/transform.h" |
21 | 21 |
22 namespace test_runner { | 22 namespace test_runner { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Map role value to string, matching Safari/Mac platform implementation to | 26 // Map role value to string, matching Safari/Mac platform implementation to |
27 // avoid rebaselining layout tests. | 27 // avoid rebaselining layout tests. |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 | 735 |
736 bool WebAXObjectProxy::IsRoot() const { | 736 bool WebAXObjectProxy::IsRoot() const { |
737 return false; | 737 return false; |
738 } | 738 } |
739 | 739 |
740 bool WebAXObjectProxy::IsEqualToObject(const blink::WebAXObject& other) { | 740 bool WebAXObjectProxy::IsEqualToObject(const blink::WebAXObject& other) { |
741 return accessibility_object_.Equals(other); | 741 return accessibility_object_.Equals(other); |
742 } | 742 } |
743 | 743 |
744 void WebAXObjectProxy::NotificationReceived( | 744 void WebAXObjectProxy::NotificationReceived( |
745 blink::WebFrame* frame, | 745 blink::WebLocalFrame* frame, |
746 const std::string& notification_name) { | 746 const std::string& notification_name) { |
747 if (notification_callback_.IsEmpty()) | 747 if (notification_callback_.IsEmpty()) |
748 return; | 748 return; |
749 | 749 |
750 v8::Local<v8::Context> context = frame->MainWorldScriptContext(); | 750 v8::Local<v8::Context> context = frame->MainWorldScriptContext(); |
751 if (context.IsEmpty()) | 751 if (context.IsEmpty()) |
752 return; | 752 return; |
753 | 753 |
754 v8::Isolate* isolate = blink::MainThreadIsolate(); | 754 v8::Isolate* isolate = blink::MainThreadIsolate(); |
755 | 755 |
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 v8::Local<v8::Value> value_handle = | 1883 v8::Local<v8::Value> value_handle = |
1884 gin::CreateHandle(isolate, new WebAXObjectProxy(object, this)).ToV8(); | 1884 gin::CreateHandle(isolate, new WebAXObjectProxy(object, this)).ToV8(); |
1885 if (value_handle.IsEmpty()) | 1885 if (value_handle.IsEmpty()) |
1886 return v8::Local<v8::Object>(); | 1886 return v8::Local<v8::Object>(); |
1887 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); | 1887 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); |
1888 elements_.Append(handle); | 1888 elements_.Append(handle); |
1889 return handle; | 1889 return handle; |
1890 } | 1890 } |
1891 | 1891 |
1892 } // namespace test_runner | 1892 } // namespace test_runner |
OLD | NEW |