Index: chrome/browser/devtools/devtools_targets_ui.cc |
diff --git a/chrome/browser/devtools/devtools_targets_ui.cc b/chrome/browser/devtools/devtools_targets_ui.cc |
index 3b6ab212a6b724ef81c830ba6edcb68965fa8dfb..868d8da867c5b80d16d9429d9243820dc4473459 100644 |
--- a/chrome/browser/devtools/devtools_targets_ui.cc |
+++ b/chrome/browser/devtools/devtools_targets_ui.cc |
@@ -11,6 +11,7 @@ |
#include "base/version.h" |
#include "chrome/browser/devtools/device/devtools_android_bridge.h" |
#include "chrome/browser/devtools/devtools_target_impl.h" |
+#include "chrome/browser/guest_view/guest_view_base.h" |
#include "chrome/common/chrome_version_info.h" |
#include "content/public/browser/browser_child_process_observer.h" |
#include "content/public/browser/browser_thread.h" |
@@ -175,9 +176,10 @@ void RenderViewHostTargetsUIHandler::UpdateTargets() { |
RenderFrameHost* rfh = (*it); |
RenderFrameHost* parent_rfh = NULL; |
content::RenderViewHost* rvh = rfh->GetRenderViewHost(); |
- if (rvh->GetProcess()->IsGuest()) { |
- WebContents* nested_web_contents = WebContents::FromRenderViewHost(rvh); |
- WebContents* embedder = nested_web_contents->GetEmbedderWebContents(); |
+ WebContents* nested_web_contents = WebContents::FromRenderViewHost(rvh); |
+ GuestViewBase* guest = GuestViewBase::FromWebContents(nested_web_contents); |
+ if (guest) { |
+ WebContents* embedder = guest->embedder_web_contents(); |
parent_rfh = embedder->GetRenderViewHost()->GetMainFrame(); |
} else { |
parent_rfh = rfh->GetParent(); |