Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2899)

Unified Diff: apps/app_window_registry.cc

Issue 442303002: DevTools: migrate DevTools APIs to use WebContents instead of RenderViewHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/native/aw_dev_tools_server.cc ('k') | chrome/browser/android/dev_tools_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « android_webview/native/aw_dev_tools_server.cc ('k') | chrome/browser/android/dev_tools_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698