Enable delegate to change the dock side.

This commit is contained in:
Cheng Zhao 2014-03-04 19:47:33 +08:00
parent e3aaaf2643
commit 5768ff6981
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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_);