Improve #1307
This commit is contained in:
parent
b52771e729
commit
32cd068427
5 changed files with 7 additions and 8 deletions
|
@ -322,8 +322,8 @@ bool Window::IsKiosk() {
|
||||||
return window_->IsKiosk();
|
return window_->IsKiosk();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::OpenDevTools(bool dock) {
|
void Window::OpenDevTools(bool can_dock) {
|
||||||
window_->OpenDevTools(!dock);
|
window_->OpenDevTools(can_dock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::CloseDevTools() {
|
void Window::CloseDevTools() {
|
||||||
|
|
|
@ -105,7 +105,7 @@ class Window : public mate::EventEmitter,
|
||||||
void SetSkipTaskbar(bool skip);
|
void SetSkipTaskbar(bool skip);
|
||||||
void SetKiosk(bool kiosk);
|
void SetKiosk(bool kiosk);
|
||||||
bool IsKiosk();
|
bool IsKiosk();
|
||||||
void OpenDevTools(bool dock);
|
void OpenDevTools(bool can_dock);
|
||||||
void CloseDevTools();
|
void CloseDevTools();
|
||||||
bool IsDevToolsOpened();
|
bool IsDevToolsOpened();
|
||||||
void InspectElement(int x, int y);
|
void InspectElement(int x, int y);
|
||||||
|
|
|
@ -42,7 +42,7 @@ BrowserWindow::_init = ->
|
||||||
|
|
||||||
BrowserWindow::openDevTools = (options={}) ->
|
BrowserWindow::openDevTools = (options={}) ->
|
||||||
options.detach ?= false
|
options.detach ?= false
|
||||||
@_openDevTools(options.detach)
|
@_openDevTools !options.detach
|
||||||
|
|
||||||
# Force devToolsWebContents to be created.
|
# Force devToolsWebContents to be created.
|
||||||
@devToolsWebContents = @getDevToolsWebContents()
|
@devToolsWebContents = @getDevToolsWebContents()
|
||||||
|
|
|
@ -284,9 +284,8 @@ bool NativeWindow::HasModalDialog() {
|
||||||
return has_dialog_attached_;
|
return has_dialog_attached_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::OpenDevTools(bool dock) {
|
void NativeWindow::OpenDevTools(bool can_dock) {
|
||||||
if (!dock)
|
inspectable_web_contents()->SetCanDock(can_dock);
|
||||||
inspectable_web_contents()->SetCanDock(false);
|
|
||||||
inspectable_web_contents()->ShowDevTools();
|
inspectable_web_contents()->ShowDevTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
||||||
const std::string& description) = 0;
|
const std::string& description) = 0;
|
||||||
|
|
||||||
virtual bool IsClosed() const { return is_closed_; }
|
virtual bool IsClosed() const { return is_closed_; }
|
||||||
virtual void OpenDevTools(bool dock);
|
virtual void OpenDevTools(bool can_dock);
|
||||||
virtual void CloseDevTools();
|
virtual void CloseDevTools();
|
||||||
virtual bool IsDevToolsOpened();
|
virtual bool IsDevToolsOpened();
|
||||||
virtual void InspectElement(int x, int y);
|
virtual void InspectElement(int x, int y);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue