providing option to undock devtools from browser-window
This commit is contained in:
parent
ae5586408f
commit
69d958b94e
7 changed files with 16 additions and 10 deletions
|
@ -284,7 +284,9 @@ bool NativeWindow::HasModalDialog() {
|
|||
return has_dialog_attached_;
|
||||
}
|
||||
|
||||
void NativeWindow::OpenDevTools() {
|
||||
void NativeWindow::OpenDevTools(bool dock) {
|
||||
if (!dock)
|
||||
inspectable_web_contents()->SetCanDock(false);
|
||||
inspectable_web_contents()->ShowDevTools();
|
||||
}
|
||||
|
||||
|
@ -297,7 +299,7 @@ bool NativeWindow::IsDevToolsOpened() {
|
|||
}
|
||||
|
||||
void NativeWindow::InspectElement(int x, int y) {
|
||||
OpenDevTools();
|
||||
OpenDevTools(true);
|
||||
scoped_refptr<content::DevToolsAgentHost> agent(
|
||||
content::DevToolsAgentHost::GetOrCreateFor(GetWebContents()));
|
||||
agent->InspectElement(x, y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue