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

Side by Side Diff: content/shell/renderer/test_runner/web_ax_object_proxy.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
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
625 v8::Handle<v8::Value> argv[] = { 628 v8::Handle<v8::Value> argv[] = {
629 #endif
626 v8::String::NewFromUtf8(isolate, notification_name.data(), 630 v8::String::NewFromUtf8(isolate, notification_name.data(),
627 v8::String::kNormalString, 631 v8::String::kNormalString,
628 notification_name.size()), 632 notification_name.size()),
629 }; 633 };
630 frame->callFunctionEvenIfScriptDisabled( 634 frame->callFunctionEvenIfScriptDisabled(
631 v8::Local<v8::Function>::New(isolate, notification_callback_), 635 v8::Local<v8::Function>::New(isolate, notification_callback_),
632 context->Global(), 636 context->Global(),
633 arraysize(argv), 637 arraysize(argv),
634 argv); 638 argv);
635 } 639 }
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 v8::Handle<v8::Value> value_handle = gin::CreateHandle( 1301 v8::Handle<v8::Value> value_handle = gin::CreateHandle(
1298 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); 1302 isolate, new RootWebAXObjectProxy(object, this)).ToV8();
1299 if (value_handle.IsEmpty()) 1303 if (value_handle.IsEmpty())
1300 return v8::Handle<v8::Object>(); 1304 return v8::Handle<v8::Object>();
1301 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); 1305 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate);
1302 elements_.Append(handle); 1306 elements_.Append(handle);
1303 return handle; 1307 return handle;
1304 } 1308 }
1305 1309
1306 } // namespace content 1310 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698