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

Unified Diff: content/renderer/web_ui_extension.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.h ('k') | content/shell/test_runner/accessibility_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/web_ui_extension.cc
diff --git a/content/renderer/web_ui_extension.cc b/content/renderer/web_ui_extension.cc
index 2a98fa010366ccd746d8209865e9d8020fb62116..19593e1769f801bfccc37d46a4e0fcb4553766aa 100644
--- a/content/renderer/web_ui_extension.cc
+++ b/content/renderer/web_ui_extension.cc
@@ -32,10 +32,9 @@ namespace content {
namespace {
-bool ShouldRespondToRequest(
- blink::WebFrame** frame_ptr,
- RenderView** render_view_ptr) {
- blink::WebFrame* frame = blink::WebLocalFrame::FrameForCurrentContext();
+bool ShouldRespondToRequest(blink::WebLocalFrame** frame_ptr,
+ RenderView** render_view_ptr) {
+ blink::WebLocalFrame* frame = blink::WebLocalFrame::FrameForCurrentContext();
if (!frame || !frame->View())
return false;
@@ -70,7 +69,7 @@ bool ShouldRespondToRequest(
// should be an array.
// - chrome.getVariableValue: Returns value for the input variable name if such
// a value was set by the browser. Else will return an empty string.
-void WebUIExtension::Install(blink::WebFrame* frame) {
+void WebUIExtension::Install(blink::WebLocalFrame* frame) {
v8::Isolate* isolate = blink::MainThreadIsolate();
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = frame->MainWorldScriptContext();
@@ -92,7 +91,7 @@ void WebUIExtension::Install(blink::WebFrame* frame) {
// static
void WebUIExtension::Send(gin::Arguments* args) {
- blink::WebFrame* frame;
+ blink::WebLocalFrame* frame;
RenderView* render_view;
if (!ShouldRespondToRequest(&frame, &render_view))
return;
@@ -136,7 +135,7 @@ void WebUIExtension::Send(gin::Arguments* args) {
// static
std::string WebUIExtension::GetVariableValue(const std::string& name) {
- blink::WebFrame* frame;
+ blink::WebLocalFrame* frame;
RenderView* render_view;
if (!ShouldRespondToRequest(&frame, &render_view))
return std::string();
« no previous file with comments | « content/renderer/web_ui_extension.h ('k') | content/shell/test_runner/accessibility_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698