notify devtools opened and closed once per lifetime

This commit is contained in:
deepak1556 2016-05-12 19:16:13 +05:30
parent 7e0918f95a
commit a01f8ba739
3 changed files with 6 additions and 8 deletions

View file

@ -368,6 +368,9 @@ void InspectableWebContentsImpl::LoadCompleted() {
// If the devtools can dock, "SetIsDocked" will be called by devtools itself.
if (!can_dock_)
SetIsDocked(DispatchCallback(), false);
if (view_->GetDelegate())
view_->GetDelegate()->DevToolsOpened();
}
void InspectableWebContentsImpl::SetInspectedPageBounds(const gfx::Rect& rect) {
@ -618,6 +621,9 @@ void InspectableWebContentsImpl::WebContentsDestroyed() {
for (const auto& pair : pending_requests_)
delete pair.first;
if (view_ && view_->GetDelegate())
view_->GetDelegate()->DevToolsClosed();
}
bool InspectableWebContentsImpl::AddMessageToConsole(