devtools-opened should be emitted after devtools is opened
This commit is contained in:
parent
3bf73bc455
commit
238d4add99
1 changed files with 4 additions and 4 deletions
|
@ -183,21 +183,21 @@ void Window::OnDevToolsFocus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::OnDevToolsOpened() {
|
void Window::OnDevToolsOpened() {
|
||||||
Emit("devtools-opened");
|
|
||||||
|
|
||||||
v8::Locker locker(isolate());
|
v8::Locker locker(isolate());
|
||||||
v8::HandleScope handle_scope(isolate());
|
v8::HandleScope handle_scope(isolate());
|
||||||
auto handle = WebContents::CreateFrom(
|
auto handle = WebContents::CreateFrom(
|
||||||
isolate(), api_web_contents_->GetDevToolsWebContents());
|
isolate(), api_web_contents_->GetDevToolsWebContents());
|
||||||
devtools_web_contents_.Reset(isolate(), handle.ToV8());
|
devtools_web_contents_.Reset(isolate(), handle.ToV8());
|
||||||
|
|
||||||
|
Emit("devtools-opened");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::OnDevToolsClosed() {
|
void Window::OnDevToolsClosed() {
|
||||||
Emit("devtools-closed");
|
|
||||||
|
|
||||||
v8::Locker locker(isolate());
|
v8::Locker locker(isolate());
|
||||||
v8::HandleScope handle_scope(isolate());
|
v8::HandleScope handle_scope(isolate());
|
||||||
devtools_web_contents_.Reset();
|
devtools_web_contents_.Reset();
|
||||||
|
|
||||||
|
Emit("devtools-closed");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::OnExecuteWindowsCommand(const std::string& command_name) {
|
void Window::OnExecuteWindowsCommand(const std::string& command_name) {
|
||||||
|
|
Loading…
Reference in a new issue