From db0c931d60b49ec6c71f31fbcd5fc98c5a65a69c Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 12 May 2016 07:15:49 +0530 Subject: [PATCH] notify delegate when devtools is loaded --- brightray/browser/inspectable_web_contents_impl.cc | 3 +++ brightray/browser/inspectable_web_contents_view_delegate.h | 1 + 2 files changed, 4 insertions(+) diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 8353a71eb7..1648bee704 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -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()->DevToolsLoaded(); } void InspectableWebContentsImpl::SetInspectedPageBounds(const gfx::Rect& rect) { diff --git a/brightray/browser/inspectable_web_contents_view_delegate.h b/brightray/browser/inspectable_web_contents_view_delegate.h index 900857c7a1..ce1b6e721b 100644 --- a/brightray/browser/inspectable_web_contents_view_delegate.h +++ b/brightray/browser/inspectable_web_contents_view_delegate.h @@ -12,6 +12,7 @@ class InspectableWebContentsViewDelegate { virtual void DevToolsFocused() {} virtual void DevToolsOpened() {} virtual void DevToolsClosed() {} + virtual void DevToolsLoaded() {} // Returns the icon of devtools window. virtual gfx::ImageSkia GetDevToolsWindowIcon();