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

Side by Side Diff: content/shell/renderer/test_runner/accessibility_controller.cc

Issue 1095463003: update chrome to handle temporary WEB_FRAME_USES_V8_LOCAL condition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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
« no previous file with comments | « content/renderer/web_ui_runner.cc ('k') | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/accessibility_controller.h" 5 #include "content/shell/renderer/test_runner/accessibility_controller.h"
6 6
7 #include "gin/handle.h" 7 #include "gin/handle.h"
8 #include "gin/object_template_builder.h" 8 #include "gin/object_template_builder.h"
9 #include "gin/wrappable.h" 9 #include "gin/wrappable.h"
10 #include "third_party/WebKit/public/web/WebElement.h" 10 #include "third_party/WebKit/public/web/WebElement.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 WebAXObjectProxy* element; 185 WebAXObjectProxy* element;
186 bool result = gin::ConvertFromV8(isolate, element_handle, &element); 186 bool result = gin::ConvertFromV8(isolate, element_handle, &element);
187 DCHECK(result); 187 DCHECK(result);
188 element->NotificationReceived(frame, notification_name); 188 element->NotificationReceived(frame, notification_name);
189 189
190 if (notification_callback_.IsEmpty()) 190 if (notification_callback_.IsEmpty())
191 return; 191 return;
192 192
193 // Call global notification listeners. 193 // Call global notification listeners.
194 #ifdef WEB_FRAME_USES_V8_LOCAL
195 v8::Local<v8::Value> argv[] = {
196 #else
194 v8::Handle<v8::Value> argv[] = { 197 v8::Handle<v8::Value> argv[] = {
198 #endif
195 element_handle, 199 element_handle,
196 v8::String::NewFromUtf8(isolate, notification_name.data(), 200 v8::String::NewFromUtf8(isolate, notification_name.data(),
197 v8::String::kNormalString, 201 v8::String::kNormalString,
198 notification_name.size()), 202 notification_name.size()),
199 }; 203 };
200 frame->callFunctionEvenIfScriptDisabled( 204 frame->callFunctionEvenIfScriptDisabled(
201 v8::Local<v8::Function>::New(isolate, notification_callback_), 205 v8::Local<v8::Function>::New(isolate, notification_callback_),
202 context->Global(), 206 context->Global(),
203 arraysize(argv), 207 arraysize(argv),
204 argv); 208 argv);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 v8::Handle<v8::Object> result = 273 v8::Handle<v8::Object> result =
270 FindAccessibleElementByIdRecursive(obj.childAt(i), id); 274 FindAccessibleElementByIdRecursive(obj.childAt(i), id);
271 if (*result) 275 if (*result)
272 return result; 276 return result;
273 } 277 }
274 278
275 return v8::Handle<v8::Object>(); 279 return v8::Handle<v8::Object>();
276 } 280 }
277 281
278 } // namespace content 282 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/web_ui_runner.cc ('k') | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698