mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Enable delegate to change the dock side.
This commit is contained in:
@@ -18,7 +18,8 @@ class InspectableWebContentsDelegate {
|
||||
|
||||
// Called when the devtools is going to be showed, returning true to override
|
||||
// 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
|
||||
|
||||
@@ -94,7 +94,7 @@ void InspectableWebContentsImpl::ShowDevTools() {
|
||||
std::string());
|
||||
}
|
||||
|
||||
if (delegate_ && delegate_->DevToolsShow(dock_side_))
|
||||
if (delegate_ && delegate_->DevToolsShow(&dock_side_))
|
||||
return;
|
||||
|
||||
view_->SetDockSide(dock_side_);
|
||||
|
||||
Reference in New Issue
Block a user