Index: apps/app_window_registry.cc |
diff --git a/apps/app_window_registry.cc b/apps/app_window_registry.cc |
index c6482470e3cba6860bbde35d6ac77fa8b9555a91..67c836ab35a07625069f2af28b595ebe0a5fd02c 100644 |
--- a/apps/app_window_registry.cc |
+++ b/apps/app_window_registry.cc |
@@ -280,13 +280,13 @@ void AppWindowRegistry::CloseAllAppWindows() { |
void AppWindowRegistry::OnDevToolsStateChanged( |
content::DevToolsAgentHost* agent_host, |
bool attached) { |
- content::RenderViewHost* rvh = agent_host->GetRenderViewHost(); |
+ content::WebContents* web_contents = agent_host->GetWebContents(); |
// Ignore unrelated notifications. |
- if (!rvh || |
- rvh->GetSiteInstance()->GetProcess()->GetBrowserContext() != context_) |
+ if (!web_contents || web_contents->GetBrowserContext() != context_) |
return; |
- std::string key = GetWindowKeyForRenderViewHost(this, rvh); |
+ std::string key = |
+ GetWindowKeyForRenderViewHost(this, web_contents->GetRenderViewHost()); |
if (key.empty()) |
return; |