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

Unified Diff: content/shell/test_runner/accessibility_controller.cc

Issue 2923053002: Move MainWorldScriptContext accessor/method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/web_ui_extension.cc ('k') | content/shell/test_runner/gamepad_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/test_runner/accessibility_controller.cc
diff --git a/content/shell/test_runner/accessibility_controller.cc b/content/shell/test_runner/accessibility_controller.cc
index e2e26c8bb777f80692d91f82ee8adbb016eeba8e..233f8f0ec0e4c7650fef7313cf5c0b1b59c87c7c 100644
--- a/content/shell/test_runner/accessibility_controller.cc
+++ b/content/shell/test_runner/accessibility_controller.cc
@@ -165,8 +165,9 @@ void AccessibilityController::NotificationReceived(
blink::WebFrame* frame = web_view()->MainFrame();
if (!frame || frame->IsWebRemoteFrame())
return;
+ blink::WebLocalFrame* local_frame = frame->ToWebLocalFrame();
- v8::Local<v8::Context> context = frame->MainWorldScriptContext();
+ v8::Local<v8::Context> context = local_frame->MainWorldScriptContext();
if (context.IsEmpty())
return;
@@ -180,7 +181,7 @@ void AccessibilityController::NotificationReceived(
WebAXObjectProxy* element;
bool result = gin::ConvertFromV8(isolate, element_handle, &element);
DCHECK(result);
- element->NotificationReceived(frame, notification_name);
+ element->NotificationReceived(local_frame, notification_name);
if (notification_callback_.IsEmpty())
return;
@@ -191,7 +192,7 @@ void AccessibilityController::NotificationReceived(
v8::String::kNormalString,
notification_name.size()),
};
- frame->CallFunctionEvenIfScriptDisabled(
+ local_frame->CallFunctionEvenIfScriptDisabled(
v8::Local<v8::Function>::New(isolate, notification_callback_),
context->Global(), arraysize(argv), argv);
}
« no previous file with comments | « content/renderer/web_ui_extension.cc ('k') | content/shell/test_runner/gamepad_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698