diff options
author | deepak.s <deepak.s@samsung.com> | 2015-04-30 00:32:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-30 07:33:57 +0000 |
commit | 750d68f445f70f32932962397a4dee96888934bf (patch) | |
tree | 6ced114fd2e802fbb1d2ed8e587a707fa48b1aa7 /content/shell | |
parent | 6d9098d6f2222c7214d8f3319cd5d5cd53b508c1 (diff) | |
download | chromium_src-750d68f445f70f32932962397a4dee96888934bf.zip chromium_src-750d68f445f70f32932962397a4dee96888934bf.tar.gz chromium_src-750d68f445f70f32932962397a4dee96888934bf.tar.bz2 |
Use Local instead of Handle in src/content/*
Handle is just an alias of Local
BUG=424445
Review URL: https://codereview.chromium.org/1113783002
Cr-Commit-Position: refs/heads/master@{#327674}
Diffstat (limited to 'content/shell')
11 files changed, 143 insertions, 143 deletions
diff --git a/content/shell/renderer/binding_helpers.h b/content/shell/renderer/binding_helpers.h index e2fffa7..7387021 100644 --- a/content/shell/renderer/binding_helpers.h +++ b/content/shell/renderer/binding_helpers.h @@ -22,7 +22,7 @@ void InstallAsWindowProperties(WrappedClass* wrapped, const std::vector<std::string>& names) { v8::Isolate* isolate = blink::mainThreadIsolate(); v8::HandleScope handle_scope(isolate); - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; @@ -31,8 +31,8 @@ void InstallAsWindowProperties(WrappedClass* wrapped, gin::Handle<WrappedClass> bindings = gin::CreateHandle(isolate, wrapped); if (bindings.IsEmpty()) return; - v8::Handle<v8::Object> global = context->Global(); - v8::Handle<v8::Value> v8_bindings = bindings.ToV8(); + v8::Local<v8::Object> global = context->Global(); + v8::Local<v8::Value> v8_bindings = bindings.ToV8(); for (size_t i = 0; i < names.size(); ++i) global->Set(gin::StringToV8(isolate, names[i].c_str()), v8_bindings); } diff --git a/content/shell/renderer/layout_test/gc_controller.cc b/content/shell/renderer/layout_test/gc_controller.cc index 2bd45a8..9741e2b 100644 --- a/content/shell/renderer/layout_test/gc_controller.cc +++ b/content/shell/renderer/layout_test/gc_controller.cc @@ -19,7 +19,7 @@ gin::WrapperInfo GCController::kWrapperInfo = {gin::kEmbedderNativeGin}; void GCController::Install(blink::WebFrame* frame) { v8::Isolate* isolate = blink::mainThreadIsolate(); v8::HandleScope handle_scope(isolate); - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; @@ -29,7 +29,7 @@ void GCController::Install(blink::WebFrame* frame) { gin::CreateHandle(isolate, new GCController()); if (controller.IsEmpty()) return; - v8::Handle<v8::Object> global = context->Global(); + v8::Local<v8::Object> global = context->Global(); global->Set(gin::StringToV8(isolate, "GCController"), controller.ToV8()); } diff --git a/content/shell/renderer/test_runner/accessibility_controller.cc b/content/shell/renderer/test_runner/accessibility_controller.cc index 678f56d..547e694 100644 --- a/content/shell/renderer/test_runner/accessibility_controller.cc +++ b/content/shell/renderer/test_runner/accessibility_controller.cc @@ -33,11 +33,11 @@ class AccessibilityControllerBindings v8::Isolate* isolate) override; void LogAccessibilityEvents(); - void SetNotificationListener(v8::Handle<v8::Function> callback); + void SetNotificationListener(v8::Local<v8::Function> callback); void UnsetNotificationListener(); - v8::Handle<v8::Object> FocusedElement(); - v8::Handle<v8::Object> RootElement(); - v8::Handle<v8::Object> AccessibleElementById(const std::string& id); + v8::Local<v8::Object> FocusedElement(); + v8::Local<v8::Object> RootElement(); + v8::Local<v8::Object> AccessibleElementById(const std::string& id); base::WeakPtr<AccessibilityController> controller_; @@ -53,7 +53,7 @@ void AccessibilityControllerBindings::Install( blink::WebFrame* frame) { v8::Isolate* isolate = blink::mainThreadIsolate(); v8::HandleScope handle_scope(isolate); - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; @@ -64,7 +64,7 @@ void AccessibilityControllerBindings::Install( new AccessibilityControllerBindings(controller)); if (bindings.IsEmpty()) return; - v8::Handle<v8::Object> global = context->Global(); + v8::Local<v8::Object> global = context->Global(); global->Set(gin::StringToV8(isolate, "accessibilityController"), bindings.ToV8()); } @@ -107,7 +107,7 @@ void AccessibilityControllerBindings::LogAccessibilityEvents() { } void AccessibilityControllerBindings::SetNotificationListener( - v8::Handle<v8::Function> callback) { + v8::Local<v8::Function> callback) { if (controller_) controller_->SetNotificationListener(callback); } @@ -117,18 +117,18 @@ void AccessibilityControllerBindings::UnsetNotificationListener() { controller_->UnsetNotificationListener(); } -v8::Handle<v8::Object> AccessibilityControllerBindings::FocusedElement() { - return controller_ ? controller_->FocusedElement() : v8::Handle<v8::Object>(); +v8::Local<v8::Object> AccessibilityControllerBindings::FocusedElement() { + return controller_ ? controller_->FocusedElement() : v8::Local<v8::Object>(); } -v8::Handle<v8::Object> AccessibilityControllerBindings::RootElement() { - return controller_ ? controller_->RootElement() : v8::Handle<v8::Object>(); +v8::Local<v8::Object> AccessibilityControllerBindings::RootElement() { + return controller_ ? controller_->RootElement() : v8::Local<v8::Object>(); } -v8::Handle<v8::Object> AccessibilityControllerBindings::AccessibleElementById( +v8::Local<v8::Object> AccessibilityControllerBindings::AccessibleElementById( const std::string& id) { return controller_ ? controller_->AccessibleElementById(id) - : v8::Handle<v8::Object>(); + : v8::Local<v8::Object>(); } AccessibilityController::AccessibilityController() @@ -171,14 +171,14 @@ void AccessibilityController::NotificationReceived( if (!frame || frame->isWebRemoteFrame()) return; - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; v8::Context::Scope context_scope(context); // Call notification listeners on the element. - v8::Handle<v8::Object> element_handle = elements_.GetOrCreate(target); + v8::Local<v8::Object> element_handle = elements_.GetOrCreate(target); if (element_handle.IsEmpty()) return; @@ -191,7 +191,7 @@ void AccessibilityController::NotificationReceived( return; // Call global notification listeners. - v8::Handle<v8::Value> argv[] = { + v8::Local<v8::Value> argv[] = { element_handle, v8::String::NewFromUtf8(isolate, notification_name.data(), v8::String::kNormalString, @@ -217,7 +217,7 @@ void AccessibilityController::LogAccessibilityEvents() { } void AccessibilityController::SetNotificationListener( - v8::Handle<v8::Function> callback) { + v8::Local<v8::Function> callback) { v8::Isolate* isolate = blink::mainThreadIsolate(); notification_callback_.Reset(isolate, callback); } @@ -226,35 +226,35 @@ void AccessibilityController::UnsetNotificationListener() { notification_callback_.Reset(); } -v8::Handle<v8::Object> AccessibilityController::FocusedElement() { +v8::Local<v8::Object> AccessibilityController::FocusedElement() { if (focused_element_.isNull()) focused_element_ = web_view_->accessibilityObject(); return elements_.GetOrCreate(focused_element_); } -v8::Handle<v8::Object> AccessibilityController::RootElement() { +v8::Local<v8::Object> AccessibilityController::RootElement() { if (root_element_.isNull()) root_element_ = web_view_->accessibilityObject(); return elements_.GetOrCreate(root_element_); } -v8::Handle<v8::Object> +v8::Local<v8::Object> AccessibilityController::AccessibleElementById(const std::string& id) { if (root_element_.isNull()) root_element_ = web_view_->accessibilityObject(); if (!root_element_.updateLayoutAndCheckValidity()) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return FindAccessibleElementByIdRecursive( root_element_, blink::WebString::fromUTF8(id.c_str())); } -v8::Handle<v8::Object> +v8::Local<v8::Object> AccessibilityController::FindAccessibleElementByIdRecursive( const blink::WebAXObject& obj, const blink::WebString& id) { if (obj.isNull() || obj.isDetached()) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); blink::WebNode node = obj.node(); if (!node.isNull() && node.isElementNode()) { @@ -266,13 +266,13 @@ AccessibilityController::FindAccessibleElementByIdRecursive( unsigned childCount = obj.childCount(); for (unsigned i = 0; i < childCount; i++) { - v8::Handle<v8::Object> result = + v8::Local<v8::Object> result = FindAccessibleElementByIdRecursive(obj.childAt(i), id); if (*result) return result; } - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); } } // namespace content diff --git a/content/shell/renderer/test_runner/accessibility_controller.h b/content/shell/renderer/test_runner/accessibility_controller.h index 5ea475f..e76cd68 100644 --- a/content/shell/renderer/test_runner/accessibility_controller.h +++ b/content/shell/renderer/test_runner/accessibility_controller.h @@ -43,13 +43,13 @@ class AccessibilityController : // Bound methods and properties void LogAccessibilityEvents(); - void SetNotificationListener(v8::Handle<v8::Function> callback); + void SetNotificationListener(v8::Local<v8::Function> callback); void UnsetNotificationListener(); - v8::Handle<v8::Object> FocusedElement(); - v8::Handle<v8::Object> RootElement(); - v8::Handle<v8::Object> AccessibleElementById(const std::string& id); + v8::Local<v8::Object> FocusedElement(); + v8::Local<v8::Object> RootElement(); + v8::Local<v8::Object> AccessibleElementById(const std::string& id); - v8::Handle<v8::Object> FindAccessibleElementByIdRecursive( + v8::Local<v8::Object> FindAccessibleElementByIdRecursive( const blink::WebAXObject&, const blink::WebString& id); // If true, will log all accessibility notifications. diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc index e54a958..ab9af23 100644 --- a/content/shell/renderer/test_runner/event_sender.cc +++ b/content/shell/renderer/test_runner/event_sender.cc @@ -117,7 +117,7 @@ int GetKeyModifiers(const std::vector<std::string>& modifier_names) { return modifiers; } -int GetKeyModifiersFromV8(v8::Handle<v8::Value> value) { +int GetKeyModifiersFromV8(v8::Local<v8::Value> value) { std::vector<std::string> modifier_names; if (value->IsString()) { modifier_names.push_back(gin::V8ToString(value)); @@ -483,7 +483,7 @@ void EventSenderBindings::Install(base::WeakPtr<EventSender> sender, WebFrame* frame) { v8::Isolate* isolate = blink::mainThreadIsolate(); v8::HandleScope handle_scope(isolate); - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; @@ -493,7 +493,7 @@ void EventSenderBindings::Install(base::WeakPtr<EventSender> sender, gin::CreateHandle(isolate, new EventSenderBindings(sender)); if (bindings.IsEmpty()) return; - v8::Handle<v8::Object> global = context->Global(); + v8::Local<v8::Object> global = context->Global(); global->Set(gin::StringToV8(isolate, "eventSender"), bindings.ToV8()); } @@ -931,7 +931,7 @@ void EventSenderBindings::ScheduleAsynchronousKeyDown(gin::Arguments* args) { int location = DOMKeyLocationStandard; args->GetNext(&code_str); if (!args->PeekNext().IsEmpty()) { - v8::Handle<v8::Value> value; + v8::Local<v8::Value> value; args->GetNext(&value); modifiers = GetKeyModifiersFromV8(value); if (!args->PeekNext().IsEmpty()) @@ -978,7 +978,7 @@ void EventSenderBindings::KeyDown(gin::Arguments* args) { int location = DOMKeyLocationStandard; args->GetNext(&code_str); if (!args->PeekNext().IsEmpty()) { - v8::Handle<v8::Value> value; + v8::Local<v8::Value> value; args->GetNext(&value); modifiers = GetKeyModifiersFromV8(value); if (!args->PeekNext().IsEmpty()) @@ -2381,7 +2381,7 @@ void EventSender::InitMouseWheelEvent(gin::Arguments* args, if (!args->PeekNext().IsEmpty()) { args->GetNext(&has_precise_scrolling_deltas); if (!args->PeekNext().IsEmpty()) { - v8::Handle<v8::Value> value; + v8::Local<v8::Value> value; args->GetNext(&value); modifiers = GetKeyModifiersFromV8(value); if (!args->PeekNext().IsEmpty()) diff --git a/content/shell/renderer/test_runner/gamepad_controller.cc b/content/shell/renderer/test_runner/gamepad_controller.cc index 3293726..1c5174b 100644 --- a/content/shell/renderer/test_runner/gamepad_controller.cc +++ b/content/shell/renderer/test_runner/gamepad_controller.cc @@ -60,7 +60,7 @@ void GamepadControllerBindings::Install( WebFrame* frame) { v8::Isolate* isolate = blink::mainThreadIsolate(); v8::HandleScope handle_scope(isolate); - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; @@ -70,7 +70,7 @@ void GamepadControllerBindings::Install( gin::CreateHandle(isolate, new GamepadControllerBindings(controller)); if (bindings.IsEmpty()) return; - v8::Handle<v8::Object> global = context->Global(); + v8::Local<v8::Object> global = context->Global(); global->Set(gin::StringToV8(isolate, "gamepadController"), bindings.ToV8()); } diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc index 049d3cb..b3455ab 100644 --- a/content/shell/renderer/test_runner/test_runner.cc +++ b/content/shell/renderer/test_runner/test_runner.cc @@ -65,7 +65,7 @@ namespace content { namespace { -WebString V8StringToWebString(v8::Handle<v8::String> v8_str) { +WebString V8StringToWebString(v8::Local<v8::String> v8_str) { int length = v8_str->Utf8Length() + 1; scoped_ptr<char[]> chars(new char[length]); v8_str->WriteUtf8(chars.get(), length); @@ -88,7 +88,7 @@ class HostMethodTask : public WebMethodTask<TestRunner> { class InvokeCallbackTask : public WebMethodTask<TestRunner> { public: - InvokeCallbackTask(TestRunner* object, v8::Handle<v8::Function> callback) + InvokeCallbackTask(TestRunner* object, v8::Local<v8::Function> callback) : WebMethodTask<TestRunner>(object), callback_(blink::mainThreadIsolate(), callback), argc_(0) {} @@ -98,15 +98,15 @@ class InvokeCallbackTask : public WebMethodTask<TestRunner> { v8::HandleScope handle_scope(isolate); WebFrame* frame = object_->web_view_->mainFrame(); - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; v8::Context::Scope context_scope(context); - scoped_ptr<v8::Handle<v8::Value>[]> local_argv; + scoped_ptr<v8::Local<v8::Value>[]> local_argv; if (argc_) { - local_argv.reset(new v8::Handle<v8::Value>[argc_]); + local_argv.reset(new v8::Local<v8::Value>[argc_]); for (int i = 0; i < argc_; ++i) local_argv[i] = v8::Local<v8::Value>::New(isolate, argv_[i]); } @@ -118,7 +118,7 @@ class InvokeCallbackTask : public WebMethodTask<TestRunner> { local_argv.get()); } - void SetArguments(int argc, v8::Handle<v8::Value> argv[]) { + void SetArguments(int argc, v8::Local<v8::Value> argv[]) { v8::Isolate* isolate = blink::mainThreadIsolate(); argc_ = argc; argv_.reset(new v8::UniquePersistent<v8::Value>[argc]); @@ -169,11 +169,11 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> { bool CallShouldCloseOnWebView(); void SetDomainRelaxationForbiddenForURLScheme(bool forbidden, const std::string& scheme); - v8::Handle<v8::Value> EvaluateScriptInIsolatedWorldAndReturnValue( + v8::Local<v8::Value> EvaluateScriptInIsolatedWorldAndReturnValue( int world_id, const std::string& script); void EvaluateScriptInIsolatedWorld(int world_id, const std::string& script); void SetIsolatedWorldSecurityOrigin(int world_id, - v8::Handle<v8::Value> origin); + v8::Local<v8::Value> origin); void SetIsolatedWorldContentSecurityPolicy(int world_id, const std::string& policy); void AddOriginAccessWhitelistEntry(const std::string& source_origin, @@ -219,7 +219,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> { void SetXSSAuditorEnabled(bool enabled); void SetAllowUniversalAccessFromFileURLs(bool allow); void SetAllowFileAccessFromFileURLs(bool allow); - void OverridePreference(const std::string key, v8::Handle<v8::Value> value); + void OverridePreference(const std::string key, v8::Local<v8::Value> value); void SetAcceptLanguages(const std::string& accept_languages); void SetPluginsEnabled(bool enabled); void DumpEditingCallbacks(); @@ -271,9 +271,9 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> { void SetAlwaysAcceptCookies(bool accept); void SetWindowIsKey(bool value); std::string PathToLocalResource(const std::string& path); - void SetBackingScaleFactor(double value, v8::Handle<v8::Function> callback); + void SetBackingScaleFactor(double value, v8::Local<v8::Function> callback); void SetColorProfile(const std::string& name, - v8::Handle<v8::Function> callback); + v8::Local<v8::Function> callback); void SetPOSIXLocale(const std::string& locale); void SetMIDIAccessorResult(bool result); void SimulateWebNotificationClick(const std::string& title); @@ -289,12 +289,12 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> { void AddWebPageOverlay(); void RemoveWebPageOverlay(); void DisplayAsync(); - void DisplayAsyncThen(v8::Handle<v8::Function> callback); - void GetManifestThen(v8::Handle<v8::Function> callback); - void CapturePixelsAsyncThen(v8::Handle<v8::Function> callback); + void DisplayAsyncThen(v8::Local<v8::Function> callback); + void GetManifestThen(v8::Local<v8::Function> callback); + void CapturePixelsAsyncThen(v8::Local<v8::Function> callback); void CopyImageAtAndCapturePixelsAsyncThen(int x, int y, - v8::Handle<v8::Function> callback); + v8::Local<v8::Function> callback); void SetCustomTextOutput(std::string output); void SetViewSourceForFrame(const std::string& name, bool enabled); void SetBluetoothMockDataSet(const std::string& dataset_name); @@ -720,11 +720,11 @@ void TestRunnerBindings::SetDomainRelaxationForbiddenForURLScheme( runner_->SetDomainRelaxationForbiddenForURLScheme(forbidden, scheme); } -v8::Handle<v8::Value> +v8::Local<v8::Value> TestRunnerBindings::EvaluateScriptInIsolatedWorldAndReturnValue( int world_id, const std::string& script) { if (!runner_) - return v8::Handle<v8::Value>(); + return v8::Local<v8::Value>(); return runner_->EvaluateScriptInIsolatedWorldAndReturnValue(world_id, script); } @@ -736,7 +736,7 @@ void TestRunnerBindings::EvaluateScriptInIsolatedWorld( } void TestRunnerBindings::SetIsolatedWorldSecurityOrigin( - int world_id, v8::Handle<v8::Value> origin) { + int world_id, v8::Local<v8::Value> origin) { if (runner_) runner_->SetIsolatedWorldSecurityOrigin(world_id, origin); } @@ -1014,7 +1014,7 @@ void TestRunnerBindings::SetAllowFileAccessFromFileURLs(bool allow) { } void TestRunnerBindings::OverridePreference(const std::string key, - v8::Handle<v8::Value> value) { + v8::Local<v8::Value> value) { if (runner_) runner_->OverridePreference(key, value); } @@ -1288,13 +1288,13 @@ std::string TestRunnerBindings::PathToLocalResource(const std::string& path) { } void TestRunnerBindings::SetBackingScaleFactor( - double value, v8::Handle<v8::Function> callback) { + double value, v8::Local<v8::Function> callback) { if (runner_) runner_->SetBackingScaleFactor(value, callback); } void TestRunnerBindings::SetColorProfile( - const std::string& name, v8::Handle<v8::Function> callback) { + const std::string& name, v8::Local<v8::Function> callback) { if (runner_) runner_->SetColorProfile(name, callback); } @@ -1362,24 +1362,24 @@ void TestRunnerBindings::DisplayAsync() { runner_->DisplayAsync(); } -void TestRunnerBindings::DisplayAsyncThen(v8::Handle<v8::Function> callback) { +void TestRunnerBindings::DisplayAsyncThen(v8::Local<v8::Function> callback) { if (runner_) runner_->DisplayAsyncThen(callback); } -void TestRunnerBindings::GetManifestThen(v8::Handle<v8::Function> callback) { +void TestRunnerBindings::GetManifestThen(v8::Local<v8::Function> callback) { if (runner_) runner_->GetManifestThen(callback); } void TestRunnerBindings::CapturePixelsAsyncThen( - v8::Handle<v8::Function> callback) { + v8::Local<v8::Function> callback) { if (runner_) runner_->CapturePixelsAsyncThen(callback); } void TestRunnerBindings::CopyImageAtAndCapturePixelsAsyncThen( - int x, int y, v8::Handle<v8::Function> callback) { + int x, int y, v8::Local<v8::Function> callback) { if (runner_) runner_->CopyImageAtAndCapturePixelsAsyncThen(x, y, callback); } @@ -2147,7 +2147,7 @@ void TestRunner::SetDomainRelaxationForbiddenForURLScheme( WebString::fromUTF8(scheme)); } -v8::Handle<v8::Value> TestRunner::EvaluateScriptInIsolatedWorldAndReturnValue( +v8::Local<v8::Value> TestRunner::EvaluateScriptInIsolatedWorldAndReturnValue( int world_id, const std::string& script) { WebVector<v8::Local<v8::Value>> values; @@ -2159,7 +2159,7 @@ v8::Handle<v8::Value> TestRunner::EvaluateScriptInIsolatedWorldAndReturnValue( // Since only one script was added, only one result is expected if (values.size() == 1 && !values[0].IsEmpty()) return values[0]; - return v8::Handle<v8::Value>(); + return v8::Local<v8::Value>(); } void TestRunner::EvaluateScriptInIsolatedWorld(int world_id, @@ -2170,7 +2170,7 @@ void TestRunner::EvaluateScriptInIsolatedWorld(int world_id, } void TestRunner::SetIsolatedWorldSecurityOrigin(int world_id, - v8::Handle<v8::Value> origin) { + v8::Local<v8::Value> origin) { if (!(origin->IsString() || !origin->IsNull())) return; @@ -2485,7 +2485,7 @@ void TestRunner::SetAllowFileAccessFromFileURLs(bool allow) { } void TestRunner::OverridePreference(const std::string key, - v8::Handle<v8::Value> value) { + v8::Local<v8::Value> value) { TestPreferences* prefs = delegate_->Preferences(); if (key == "WebKitDefaultFontSize") { prefs->default_font_size = value->Int32Value(); @@ -2759,13 +2759,13 @@ std::string TestRunner::PathToLocalResource(const std::string& path) { } void TestRunner::SetBackingScaleFactor(double value, - v8::Handle<v8::Function> callback) { + v8::Local<v8::Function> callback) { delegate_->SetDeviceScaleFactor(value); delegate_->PostTask(new InvokeCallbackTask(this, callback)); } void TestRunner::SetColorProfile(const std::string& name, - v8::Handle<v8::Function> callback) { + v8::Local<v8::Function> callback) { delegate_->SetDeviceColorProfile(name); delegate_->PostTask(new InvokeCallbackTask(this, callback)); } @@ -2851,7 +2851,7 @@ void TestRunner::DisplayAsync() { proxy_->DisplayAsyncThen(base::Closure()); } -void TestRunner::DisplayAsyncThen(v8::Handle<v8::Function> callback) { +void TestRunner::DisplayAsyncThen(v8::Local<v8::Function> callback) { scoped_ptr<InvokeCallbackTask> task( new InvokeCallbackTask(this, callback)); proxy_->DisplayAsyncThen(base::Bind(&TestRunner::InvokeCallback, @@ -2859,7 +2859,7 @@ void TestRunner::DisplayAsyncThen(v8::Handle<v8::Function> callback) { base::Passed(&task))); } -void TestRunner::GetManifestThen(v8::Handle<v8::Function> callback) { +void TestRunner::GetManifestThen(v8::Local<v8::Function> callback) { scoped_ptr<InvokeCallbackTask> task( new InvokeCallbackTask(this, callback)); @@ -2869,7 +2869,7 @@ void TestRunner::GetManifestThen(v8::Handle<v8::Function> callback) { base::Passed(&task))); } -void TestRunner::CapturePixelsAsyncThen(v8::Handle<v8::Function> callback) { +void TestRunner::CapturePixelsAsyncThen(v8::Local<v8::Function> callback) { scoped_ptr<InvokeCallbackTask> task( new InvokeCallbackTask(this, callback)); proxy_->CapturePixelsAsync(base::Bind(&TestRunner::CapturePixelsCallback, @@ -2883,7 +2883,7 @@ void TestRunner::ForceNextWebGLContextCreationToFail() { } void TestRunner::CopyImageAtAndCapturePixelsAsyncThen( - int x, int y, v8::Handle<v8::Function> callback) { + int x, int y, v8::Local<v8::Function> callback) { scoped_ptr<InvokeCallbackTask> task( new InvokeCallbackTask(this, callback)); proxy_->CopyImageAtAndCapturePixels( @@ -2903,13 +2903,13 @@ void TestRunner::CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task, v8::Isolate* isolate = blink::mainThreadIsolate(); v8::HandleScope handle_scope(isolate); - v8::Handle<v8::Context> context = + v8::Local<v8::Context> context = web_view_->mainFrame()->mainWorldScriptContext(); if (context.IsEmpty()) return; v8::Context::Scope context_scope(context); - v8::Handle<v8::Value> argv[3]; + v8::Local<v8::Value> argv[3]; SkAutoLockPixels snapshot_lock(snapshot); // Size can be 0 for cases where copyImageAt was called on position diff --git a/content/shell/renderer/test_runner/test_runner.h b/content/shell/renderer/test_runner/test_runner.h index 493471f..44e471e 100644 --- a/content/shell/renderer/test_runner/test_runner.h +++ b/content/shell/renderer/test_runner/test_runner.h @@ -218,11 +218,11 @@ class TestRunner : public WebTestRunner, bool CallShouldCloseOnWebView(); void SetDomainRelaxationForbiddenForURLScheme(bool forbidden, const std::string& scheme); - v8::Handle<v8::Value> EvaluateScriptInIsolatedWorldAndReturnValue( + v8::Local<v8::Value> EvaluateScriptInIsolatedWorldAndReturnValue( int world_id, const std::string& script); void EvaluateScriptInIsolatedWorld(int world_id, const std::string& script); void SetIsolatedWorldSecurityOrigin(int world_id, - v8::Handle<v8::Value> origin); + v8::Local<v8::Value> origin); void SetIsolatedWorldContentSecurityPolicy(int world_id, const std::string& policy); @@ -328,7 +328,7 @@ class TestRunner : public WebTestRunner, void SetXSSAuditorEnabled(bool enabled); void SetAllowUniversalAccessFromFileURLs(bool allow); void SetAllowFileAccessFromFileURLs(bool allow); - void OverridePreference(const std::string key, v8::Handle<v8::Value> value); + void OverridePreference(const std::string key, v8::Local<v8::Value> value); // Modify accept_languages in RendererPreferences. void SetAcceptLanguages(const std::string& accept_languages); @@ -514,11 +514,11 @@ class TestRunner : public WebTestRunner, std::string PathToLocalResource(const std::string& path); // Used to set the device scale factor. - void SetBackingScaleFactor(double value, v8::Handle<v8::Function> callback); + void SetBackingScaleFactor(double value, v8::Local<v8::Function> callback); // Change the device color profile while running a layout test. void SetColorProfile(const std::string& name, - v8::Handle<v8::Function> callback); + v8::Local<v8::Function> callback); // Change the bluetooth test data while running a layout test. void SetBluetoothMockDataSet(const std::string& name); @@ -571,20 +571,20 @@ class TestRunner : public WebTestRunner, void RemoveWebPageOverlay(); void DisplayAsync(); - void DisplayAsyncThen(v8::Handle<v8::Function> callback); + void DisplayAsyncThen(v8::Local<v8::Function> callback); // Similar to DisplayAsyncThen(), but pass parameters of the captured // snapshot (width, height, snapshot) to the callback. The snapshot is in // uint8 RGBA format. - void CapturePixelsAsyncThen(v8::Handle<v8::Function> callback); + void CapturePixelsAsyncThen(v8::Local<v8::Function> callback); // Similar to CapturePixelsAsyncThen(). Copies to the clipboard the image // located at a particular point in the WebView (if there is such an image), // reads back its pixels, and provides the snapshot to the callback. If there // is no image at that point, calls the callback with (0, 0, empty_snapshot). void CopyImageAtAndCapturePixelsAsyncThen( - int x, int y, const v8::Handle<v8::Function> callback); + int x, int y, const v8::Local<v8::Function> callback); - void GetManifestThen(v8::Handle<v8::Function> callback); + void GetManifestThen(v8::Local<v8::Function> callback); /////////////////////////////////////////////////////////////////////////// // Internal helpers diff --git a/content/shell/renderer/test_runner/text_input_controller.cc b/content/shell/renderer/test_runner/text_input_controller.cc index b2a1e7d..7eed9a2 100644 --- a/content/shell/renderer/test_runner/text_input_controller.cc +++ b/content/shell/renderer/test_runner/text_input_controller.cc @@ -60,7 +60,7 @@ void TextInputControllerBindings::Install( blink::WebFrame* frame) { v8::Isolate* isolate = blink::mainThreadIsolate(); v8::HandleScope handle_scope(isolate); - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; @@ -70,7 +70,7 @@ void TextInputControllerBindings::Install( gin::CreateHandle(isolate, new TextInputControllerBindings(controller)); if (bindings.IsEmpty()) return; - v8::Handle<v8::Object> global = context->Global(); + v8::Local<v8::Object> global = context->Global(); global->Set(gin::StringToV8(isolate, "textInputController"), bindings.ToV8()); } diff --git a/content/shell/renderer/test_runner/web_ax_object_proxy.cc b/content/shell/renderer/test_runner/web_ax_object_proxy.cc index cdff16e..764d0f6 100644 --- a/content/shell/renderer/test_runner/web_ax_object_proxy.cc +++ b/content/shell/renderer/test_runner/web_ax_object_proxy.cc @@ -597,7 +597,7 @@ WebAXObjectProxy::GetObjectTemplateBuilder(v8::Isolate* isolate) { } -v8::Handle<v8::Object> WebAXObjectProxy::GetChildAtIndex(unsigned index) { +v8::Local<v8::Object> WebAXObjectProxy::GetChildAtIndex(unsigned index) { return factory_->GetOrCreate(accessibility_object_.childAt(index)); } @@ -615,13 +615,13 @@ void WebAXObjectProxy::NotificationReceived( if (notification_callback_.IsEmpty()) return; - v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); + v8::Local<v8::Context> context = frame->mainWorldScriptContext(); if (context.IsEmpty()) return; v8::Isolate* isolate = blink::mainThreadIsolate(); - v8::Handle<v8::Value> argv[] = { + v8::Local<v8::Value> argv[] = { v8::String::NewFromUtf8(isolate, notification_name.data(), v8::String::kNormalString, notification_name.size()), @@ -886,7 +886,7 @@ bool WebAXObjectProxy::IsButtonStateMixed() { return accessibility_object_.isButtonStateMixed(); } -v8::Handle<v8::Object> WebAXObjectProxy::AriaControlsElementAtIndex( +v8::Local<v8::Object> WebAXObjectProxy::AriaControlsElementAtIndex( unsigned index) { accessibility_object_.updateLayoutAndCheckValidity(); @@ -894,12 +894,12 @@ v8::Handle<v8::Object> WebAXObjectProxy::AriaControlsElementAtIndex( accessibility_object_.ariaControls(elements); size_t elementCount = elements.size(); if (index >= elementCount) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(elements[index]); } -v8::Handle<v8::Object> WebAXObjectProxy::AriaFlowToElementAtIndex( +v8::Local<v8::Object> WebAXObjectProxy::AriaFlowToElementAtIndex( unsigned index) { accessibility_object_.updateLayoutAndCheckValidity(); @@ -907,19 +907,19 @@ v8::Handle<v8::Object> WebAXObjectProxy::AriaFlowToElementAtIndex( accessibility_object_.ariaFlowTo(elements); size_t elementCount = elements.size(); if (index >= elementCount) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(elements[index]); } -v8::Handle<v8::Object> WebAXObjectProxy::AriaOwnsElementAtIndex(unsigned index) +v8::Local<v8::Object> WebAXObjectProxy::AriaOwnsElementAtIndex(unsigned index) { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebVector<blink::WebAXObject> elements; accessibility_object_.ariaOwns(elements); size_t elementCount = elements.size(); if (index >= elementCount) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(elements[index]); } @@ -976,48 +976,48 @@ std::string WebAXObjectProxy::BoundsForRange(int start, int end) { bounds.x, bounds.y, bounds.width, bounds.height); } -v8::Handle<v8::Object> WebAXObjectProxy::ChildAtIndex(int index) { +v8::Local<v8::Object> WebAXObjectProxy::ChildAtIndex(int index) { accessibility_object_.updateLayoutAndCheckValidity(); return GetChildAtIndex(index); } -v8::Handle<v8::Object> WebAXObjectProxy::ElementAtPoint(int x, int y) { +v8::Local<v8::Object> WebAXObjectProxy::ElementAtPoint(int x, int y) { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebPoint point(x, y); blink::WebAXObject obj = accessibility_object_.hitTest(point); if (obj.isNull()) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(obj); } -v8::Handle<v8::Object> WebAXObjectProxy::TableHeader() { +v8::Local<v8::Object> WebAXObjectProxy::TableHeader() { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebAXObject obj = accessibility_object_.headerContainerObject(); if (obj.isNull()) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(obj); } -v8::Handle<v8::Object> WebAXObjectProxy::RowHeaderAtIndex(unsigned index) { +v8::Local<v8::Object> WebAXObjectProxy::RowHeaderAtIndex(unsigned index) { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebVector<blink::WebAXObject> headers; accessibility_object_.rowHeaders(headers); size_t headerCount = headers.size(); if (index >= headerCount) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(headers[index]); } -v8::Handle<v8::Object> WebAXObjectProxy::ColumnHeaderAtIndex(unsigned index) { +v8::Local<v8::Object> WebAXObjectProxy::ColumnHeaderAtIndex(unsigned index) { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebVector<blink::WebAXObject> headers; accessibility_object_.columnHeaders(headers); size_t headerCount = headers.size(); if (index >= headerCount) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(headers[index]); } @@ -1036,22 +1036,22 @@ std::string WebAXObjectProxy::ColumnIndexRange() { return base::StringPrintf("{%d, %d}", column_index, column_span); } -v8::Handle<v8::Object> WebAXObjectProxy::CellForColumnAndRow( +v8::Local<v8::Object> WebAXObjectProxy::CellForColumnAndRow( int column, int row) { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebAXObject obj = accessibility_object_.cellForColumnAndRow(column, row); if (obj.isNull()) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(obj); } -v8::Handle<v8::Object> WebAXObjectProxy::DeprecatedTitleUIElement() { +v8::Local<v8::Object> WebAXObjectProxy::DeprecatedTitleUIElement() { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebAXObject obj = accessibility_object_.deprecatedTitleUIElement(); if (obj.isNull()) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(obj); } @@ -1086,7 +1086,7 @@ bool WebAXObjectProxy::IsDecrementActionSupported() { return accessibility_object_.canDecrement(); } -v8::Handle<v8::Object> WebAXObjectProxy::ParentElement() { +v8::Local<v8::Object> WebAXObjectProxy::ParentElement() { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebAXObject parent_object = accessibility_object_.parentObject(); while (parent_object.accessibilityIsIgnored()) @@ -1112,7 +1112,7 @@ void WebAXObjectProxy::Press() { accessibility_object_.press(); } -bool WebAXObjectProxy::IsEqual(v8::Handle<v8::Object> proxy) { +bool WebAXObjectProxy::IsEqual(v8::Local<v8::Object> proxy) { WebAXObjectProxy* unwrapped_proxy = NULL; if (!gin::ConvertFromV8(blink::mainThreadIsolate(), proxy, &unwrapped_proxy)) return false; @@ -1120,7 +1120,7 @@ bool WebAXObjectProxy::IsEqual(v8::Handle<v8::Object> proxy) { } void WebAXObjectProxy::SetNotificationListener( - v8::Handle<v8::Function> callback) { + v8::Local<v8::Function> callback) { v8::Isolate* isolate = blink::mainThreadIsolate(); notification_callback_.Reset(isolate, callback); } @@ -1207,13 +1207,13 @@ int WebAXObjectProxy::NameElementCount() { return static_cast<int>(nameObjects.size()); } -v8::Handle<v8::Object> WebAXObjectProxy::NameElementAtIndex(unsigned index) { +v8::Local<v8::Object> WebAXObjectProxy::NameElementAtIndex(unsigned index) { accessibility_object_.updateLayoutAndCheckValidity(); blink::WebAXNameFrom nameFrom; blink::WebVector<blink::WebAXObject> nameObjects; accessibility_object_.name(nameFrom, nameObjects); if (index >= nameObjects.size()) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory_->GetOrCreate(nameObjects[index]); } @@ -1222,9 +1222,9 @@ RootWebAXObjectProxy::RootWebAXObjectProxy( : WebAXObjectProxy(object, factory) { } -v8::Handle<v8::Object> RootWebAXObjectProxy::GetChildAtIndex(unsigned index) { +v8::Local<v8::Object> RootWebAXObjectProxy::GetChildAtIndex(unsigned index) { if (index) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); return factory()->GetOrCreate(accessibility_object()); } @@ -1256,10 +1256,10 @@ void WebAXObjectProxyList::Clear() { elements_.Clear(); } -v8::Handle<v8::Object> WebAXObjectProxyList::GetOrCreate( +v8::Local<v8::Object> WebAXObjectProxyList::GetOrCreate( const blink::WebAXObject& object) { if (object.isNull()) - return v8::Handle<v8::Object>(); + return v8::Local<v8::Object>(); v8::Isolate* isolate = blink::mainThreadIsolate(); @@ -1274,11 +1274,11 @@ v8::Handle<v8::Object> WebAXObjectProxyList::GetOrCreate( return elements_.Get(i); } - v8::Handle<v8::Value> value_handle = gin::CreateHandle( + v8::Local<v8::Value> value_handle = gin::CreateHandle( isolate, new WebAXObjectProxy(object, this)).ToV8(); if (value_handle.IsEmpty()) - return v8::Handle<v8::Object>(); - v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); + return v8::Local<v8::Object>(); + v8::Local<v8::Object> handle = value_handle->ToObject(isolate); elements_.Append(handle); return handle; } diff --git a/content/shell/renderer/test_runner/web_ax_object_proxy.h b/content/shell/renderer/test_runner/web_ax_object_proxy.h index 7e86e62..7935ef1 100644 --- a/content/shell/renderer/test_runner/web_ax_object_proxy.h +++ b/content/shell/renderer/test_runner/web_ax_object_proxy.h @@ -25,7 +25,7 @@ class WebAXObjectProxy : public gin::Wrappable<WebAXObjectProxy> { class Factory { public: virtual ~Factory() { } - virtual v8::Handle<v8::Object> GetOrCreate( + virtual v8::Local<v8::Object> GetOrCreate( const blink::WebAXObject& object) = 0; }; @@ -38,7 +38,7 @@ class WebAXObjectProxy : public gin::Wrappable<WebAXObjectProxy> { gin::ObjectTemplateBuilder GetObjectTemplateBuilder( v8::Isolate* isolate) override; - virtual v8::Handle<v8::Object> GetChildAtIndex(unsigned index); + virtual v8::Local<v8::Object> GetChildAtIndex(unsigned index); virtual bool IsRoot() const; bool IsEqualToObject(const blink::WebAXObject& object); @@ -102,33 +102,33 @@ class WebAXObjectProxy : public gin::Wrappable<WebAXObjectProxy> { bool IsButtonStateMixed(); // Bound methods. - v8::Handle<v8::Object> AriaControlsElementAtIndex(unsigned index); - v8::Handle<v8::Object> AriaFlowToElementAtIndex(unsigned index); - v8::Handle<v8::Object> AriaOwnsElementAtIndex(unsigned index); + v8::Local<v8::Object> AriaControlsElementAtIndex(unsigned index); + v8::Local<v8::Object> AriaFlowToElementAtIndex(unsigned index); + v8::Local<v8::Object> AriaOwnsElementAtIndex(unsigned index); std::string AllAttributes(); std::string AttributesOfChildren(); int LineForIndex(int index); std::string BoundsForRange(int start, int end); - v8::Handle<v8::Object> ChildAtIndex(int index); - v8::Handle<v8::Object> ElementAtPoint(int x, int y); - v8::Handle<v8::Object> TableHeader(); - v8::Handle<v8::Object> RowHeaderAtIndex(unsigned index); - v8::Handle<v8::Object> ColumnHeaderAtIndex(unsigned index); + v8::Local<v8::Object> ChildAtIndex(int index); + v8::Local<v8::Object> ElementAtPoint(int x, int y); + v8::Local<v8::Object> TableHeader(); + v8::Local<v8::Object> RowHeaderAtIndex(unsigned index); + v8::Local<v8::Object> ColumnHeaderAtIndex(unsigned index); std::string RowIndexRange(); std::string ColumnIndexRange(); - v8::Handle<v8::Object> CellForColumnAndRow(int column, int row); + v8::Local<v8::Object> CellForColumnAndRow(int column, int row); void SetSelectedTextRange(int selection_start, int length); bool IsAttributeSettable(const std::string& attribute); bool IsPressActionSupported(); bool IsIncrementActionSupported(); bool IsDecrementActionSupported(); - v8::Handle<v8::Object> ParentElement(); + v8::Local<v8::Object> ParentElement(); void Increment(); void Decrement(); void ShowMenu(); void Press(); - bool IsEqual(v8::Handle<v8::Object> proxy); - void SetNotificationListener(v8::Handle<v8::Function> callback); + bool IsEqual(v8::Local<v8::Object> proxy); + void SetNotificationListener(v8::Local<v8::Function> callback); void UnsetNotificationListener(); void TakeFocus(); void ScrollToMakeVisible(); @@ -141,13 +141,13 @@ class WebAXObjectProxy : public gin::Wrappable<WebAXObjectProxy> { std::string DeprecatedTitle(); std::string DeprecatedDescription(); std::string DeprecatedHelpText(); - v8::Handle<v8::Object> DeprecatedTitleUIElement(); + v8::Local<v8::Object> DeprecatedTitleUIElement(); // NEW accessible name and description accessors std::string Name(); std::string NameFrom(); int NameElementCount(); - v8::Handle<v8::Object> NameElementAtIndex(unsigned index); + v8::Local<v8::Object> NameElementAtIndex(unsigned index); blink::WebAXObject accessibility_object_; Factory* factory_; @@ -161,7 +161,7 @@ class RootWebAXObjectProxy : public WebAXObjectProxy { public: RootWebAXObjectProxy(const blink::WebAXObject&, Factory*); - v8::Handle<v8::Object> GetChildAtIndex(unsigned index) override; + v8::Local<v8::Object> GetChildAtIndex(unsigned index) override; bool IsRoot() const override; }; @@ -175,7 +175,7 @@ class WebAXObjectProxyList : public WebAXObjectProxy::Factory { ~WebAXObjectProxyList() override; void Clear(); - v8::Handle<v8::Object> GetOrCreate(const blink::WebAXObject&) override; + v8::Local<v8::Object> GetOrCreate(const blink::WebAXObject&) override; private: typedef v8::PersistentValueVector<v8::Object> ElementList; |