return window_->IsWebViewFocused();
}
-bool Window::IsDevToolsFocused() {
- return window_->IsDevToolsFocused();
-}
-
void Window::SetRepresentedFilename(const std::string& filename) {
window_->SetRepresentedFilename(filename);
}
.SetMethod("focusOnWebView", &Window::FocusOnWebView)
.SetMethod("blurWebView", &Window::BlurWebView)
.SetMethod("isWebViewFocused", &Window::IsWebViewFocused)
- .SetMethod("isDevToolsFocused", &Window::IsDevToolsFocused)
.SetMethod("capturePage", &Window::CapturePage)
.SetMethod("setProgressBar", &Window::SetProgressBar)
.SetMethod("setOverlayIcon", &Window::SetOverlayIcon)
void FocusOnWebView();
void BlurWebView();
bool IsWebViewFocused();
- bool IsDevToolsFocused();
void SetRepresentedFilename(const std::string& filename);
std::string GetRepresentedFilename();
void SetDocumentEdited(bool edited);
return host_view && host_view->HasFocus();
}
-bool NativeWindow::IsDevToolsFocused() {
- return inspectable_web_contents_->GetView()->IsDevToolsViewFocused();
-}
-
void NativeWindow::CapturePage(const gfx::Rect& rect,
const CapturePageCallback& callback) {
const auto view = web_contents()->GetRenderWidgetHostView();
virtual void FocusOnWebView();
virtual void BlurWebView();
virtual bool IsWebViewFocused();
- virtual bool IsDevToolsFocused();
// Captures the page with |rect|, |callback| would be called when capturing is
// done.
'openDevTools'
'closeDevTools'
'isDevToolsOpened'
+ 'isDevToolsFocused'
'inspectElement'
'setAudioMuted'
'isAudioMuted'
* `options` Object (optional). Properties:
* `detach` Boolean - opens DevTools in a new window
-Opens the developer tools.
+Opens the devtools.
### `webContents.closeDevTools()`
-Closes the developer tools.
+Closes the devtools.
### `webContents.isDevToolsOpened()`
-Returns whether the developer tools are opened.
+Returns whether the devtools is opened.
+
+### `webContents.isDevToolsFocused()`
+
+Returns whether the devtools view is focused .
### `webContents.toggleDevTools()`
Returns a boolean whether guest page has a DevTools window attached.
+### `<webview>.isDevToolsFocused()`
+
+Returns a boolean whether DevTools window of guest page is focused.
+
### `<webview>.inspectElement(x, y)`
* `x` Integer