| 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/renderer/test_runner/web_ax_object_proxy.h" | 5 #include "content/shell/renderer/test_runner/web_ax_object_proxy.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "gin/handle.h" | 8 #include "gin/handle.h" |
| 9 #include "third_party/WebKit/public/platform/WebPoint.h" | 9 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 10 #include "third_party/WebKit/public/platform/WebRect.h" | 10 #include "third_party/WebKit/public/platform/WebRect.h" |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 DCHECK(result); | 1101 DCHECK(result); |
| 1102 DCHECK(unwrapped_object); | 1102 DCHECK(unwrapped_object); |
| 1103 if (unwrapped_object->IsEqualToObject(object)) | 1103 if (unwrapped_object->IsEqualToObject(object)) |
| 1104 return elements_.Get(i); | 1104 return elements_.Get(i); |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 v8::Handle<v8::Value> value_handle = gin::CreateHandle( | 1107 v8::Handle<v8::Value> value_handle = gin::CreateHandle( |
| 1108 isolate, new WebAXObjectProxy(object, this)).ToV8(); | 1108 isolate, new WebAXObjectProxy(object, this)).ToV8(); |
| 1109 if (value_handle.IsEmpty()) | 1109 if (value_handle.IsEmpty()) |
| 1110 return v8::Handle<v8::Object>(); | 1110 return v8::Handle<v8::Object>(); |
| 1111 v8::Handle<v8::Object> handle = value_handle->ToObject(); | 1111 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); |
| 1112 elements_.Append(handle); | 1112 elements_.Append(handle); |
| 1113 return handle; | 1113 return handle; |
| 1114 } | 1114 } |
| 1115 | 1115 |
| 1116 v8::Handle<v8::Object> WebAXObjectProxyList::CreateRoot( | 1116 v8::Handle<v8::Object> WebAXObjectProxyList::CreateRoot( |
| 1117 const blink::WebAXObject& object) { | 1117 const blink::WebAXObject& object) { |
| 1118 v8::Isolate* isolate = blink::mainThreadIsolate(); | 1118 v8::Isolate* isolate = blink::mainThreadIsolate(); |
| 1119 v8::Handle<v8::Value> value_handle = gin::CreateHandle( | 1119 v8::Handle<v8::Value> value_handle = gin::CreateHandle( |
| 1120 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); | 1120 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); |
| 1121 if (value_handle.IsEmpty()) | 1121 if (value_handle.IsEmpty()) |
| 1122 return v8::Handle<v8::Object>(); | 1122 return v8::Handle<v8::Object>(); |
| 1123 v8::Handle<v8::Object> handle = value_handle->ToObject(); | 1123 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); |
| 1124 elements_.Append(handle); | 1124 elements_.Append(handle); |
| 1125 return handle; | 1125 return handle; |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 } // namespace content | 1128 } // namespace content |
| OLD | NEW |