Enable delegate to change the dock side.
This commit is contained in:
parent
e3aaaf2643
commit
5768ff6981
2 changed files with 3 additions and 2 deletions
|
@ -18,7 +18,8 @@ class InspectableWebContentsDelegate {
|
||||||
|
|
||||||
// Called when the devtools is going to be showed, returning true to override
|
// Called when the devtools is going to be showed, returning true to override
|
||||||
// the default behavior.
|
// the default behavior.
|
||||||
virtual bool DevToolsShow(const std::string& side) { return false; }
|
// Receiver is given the chance to change the |dock_side|.
|
||||||
|
virtual bool DevToolsShow(std::string* dock_side) { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace brightray
|
} // namespace brightray
|
||||||
|
|
|
@ -94,7 +94,7 @@ void InspectableWebContentsImpl::ShowDevTools() {
|
||||||
std::string());
|
std::string());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (delegate_ && delegate_->DevToolsShow(dock_side_))
|
if (delegate_ && delegate_->DevToolsShow(&dock_side_))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
view_->SetDockSide(dock_side_);
|
view_->SetDockSide(dock_side_);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue