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

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

Issue 1094393003: Revert of 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
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/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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 const std::string& notification_name) { 615 const std::string& notification_name) {
616 if (notification_callback_.IsEmpty()) 616 if (notification_callback_.IsEmpty())
617 return; 617 return;
618 618
619 v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); 619 v8::Handle<v8::Context> context = frame->mainWorldScriptContext();
620 if (context.IsEmpty()) 620 if (context.IsEmpty())
621 return; 621 return;
622 622
623 v8::Isolate* isolate = blink::mainThreadIsolate(); 623 v8::Isolate* isolate = blink::mainThreadIsolate();
624 624
625 #ifdef WEB_FRAME_USES_V8_LOCAL
626 v8::Local<v8::Value> argv[] = {
627 #else
628 v8::Handle<v8::Value> argv[] = { 625 v8::Handle<v8::Value> argv[] = {
629 #endif
630 v8::String::NewFromUtf8(isolate, notification_name.data(), 626 v8::String::NewFromUtf8(isolate, notification_name.data(),
631 v8::String::kNormalString, 627 v8::String::kNormalString,
632 notification_name.size()), 628 notification_name.size()),
633 }; 629 };
634 frame->callFunctionEvenIfScriptDisabled( 630 frame->callFunctionEvenIfScriptDisabled(
635 v8::Local<v8::Function>::New(isolate, notification_callback_), 631 v8::Local<v8::Function>::New(isolate, notification_callback_),
636 context->Global(), 632 context->Global(),
637 arraysize(argv), 633 arraysize(argv),
638 argv); 634 argv);
639 } 635 }
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 v8::Handle<v8::Value> value_handle = gin::CreateHandle( 1297 v8::Handle<v8::Value> value_handle = gin::CreateHandle(
1302 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); 1298 isolate, new RootWebAXObjectProxy(object, this)).ToV8();
1303 if (value_handle.IsEmpty()) 1299 if (value_handle.IsEmpty())
1304 return v8::Handle<v8::Object>(); 1300 return v8::Handle<v8::Object>();
1305 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); 1301 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate);
1306 elements_.Append(handle); 1302 elements_.Append(handle);
1307 return handle; 1303 return handle;
1308 } 1304 }
1309 1305
1310 } // namespace content 1306 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698