Make the DebugDevTools API more generic.

This commit is contained in:
Cheng Zhao 2014-03-04 14:35:35 +08:00
parent 1c07235121
commit d37bf06b5a
3 changed files with 18 additions and 16 deletions

View file

@ -417,7 +417,8 @@ void Window::InspectElement(const v8::FunctionCallbackInfo<v8::Value>& args) {
// static
void Window::DebugDevTools(const v8::FunctionCallbackInfo<v8::Value>& args) {
UNWRAP_WINDOW_AND_CHECK;
self->window_->DebugDevTools();
if (self->window_->IsDevToolsOpened())
NativeWindow::Debug(self->window_->GetDevToolsWebContents());
}
// static