mirror of
https://github.com/electron/electron.git
synced 2026-02-12 08:05:07 -05:00
Add getter for devToolsWebContents.
This commit is contained in:
@@ -229,11 +229,6 @@ void NativeWindow::InspectElement(int x, int y) {
|
||||
agent->InspectElement(x, y);
|
||||
}
|
||||
|
||||
void NativeWindow::ExecuteJavaScriptInDevTools(const std::string& script) {
|
||||
GetDevToolsWebContents()->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
|
||||
string16(), base::UTF8ToUTF16(script));
|
||||
}
|
||||
|
||||
void NativeWindow::FocusOnWebView() {
|
||||
GetWebContents()->GetRenderViewHost()->Focus();
|
||||
}
|
||||
@@ -628,7 +623,8 @@ void NativeWindow::CallDevToolsFunction(const std::string& function_name,
|
||||
}
|
||||
}
|
||||
}
|
||||
ExecuteJavaScriptInDevTools(function_name + "(" + params + ");");
|
||||
GetDevToolsWebContents()->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
|
||||
string16(), base::UTF8ToUTF16(function_name + "(" + params + ");"));
|
||||
}
|
||||
|
||||
void NativeWindow::OnRendererMessage(const string16& channel,
|
||||
|
||||
Reference in New Issue
Block a user