diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-09 01:55:33 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-09 01:55:33 +0000 |
commit | 0cfacd8a460b6898c5d2a8474075dfacb96d5bd6 (patch) | |
tree | 792a3a2123987ef6caf3db3ba623f29a009c3a2d /content/browser/debugger | |
parent | b871f8db03df4f3a5ff2136d7a7da283bcb07617 (diff) | |
download | chromium_src-0cfacd8a460b6898c5d2a8474075dfacb96d5bd6.zip chromium_src-0cfacd8a460b6898c5d2a8474075dfacb96d5bd6.tar.gz chromium_src-0cfacd8a460b6898c5d2a8474075dfacb96d5bd6.tar.bz2 |
Enable devtools via context menu in platform apps and popup extensions.
This is useful to allow developers of apps and extensions to easily use
the devtools in platform apps and popup extensions.
To enable devtools to work on popup extensions a new notification
NOTIFICATION_DEVTOOLS_WINDOW_OPENING has been added. This lets the popup
become aware it is being debugged, which allows it to stay up when it
loses focus (e.g. when the devtools are clicked).
BUG=53518,111017
TEST=Manual testing on Windows that dev tools are usable via the context
menu in these situations, and they are still disabled when they should
be.
Review URL: http://codereview.chromium.org/9235002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/debugger')
-rw-r--r-- | content/browser/debugger/render_view_devtools_agent_host.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/content/browser/debugger/render_view_devtools_agent_host.cc b/content/browser/debugger/render_view_devtools_agent_host.cc index 54e4c79..cf64e27 100644 --- a/content/browser/debugger/render_view_devtools_agent_host.cc +++ b/content/browser/debugger/render_view_devtools_agent_host.cc @@ -75,6 +75,15 @@ RenderViewDevToolsAgentHost::RenderViewDevToolsAgentHost(RenderViewHost* rvh) : content::RenderViewHostObserver(rvh), render_view_host_(rvh) { g_instances.Get()[rvh] = this; + + // Notify that the view is being opened. This allows any views being debugged + // to do anything special they need to do to support debugging. + content::NotificationService::current()->Notify( + content::NOTIFICATION_DEVTOOLS_WINDOW_OPENING, + content::Source<content::BrowserContext>( + render_view_host_->site_instance()->GetProcess()-> + GetBrowserContext()), + content::Details<RenderViewHost>(render_view_host_)); } void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) { |