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

Unified Diff: chrome/browser/devtools/devtools_targets_ui.cc

Issue 272573005: <webview>: Move NewWindow API to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_rename
Patch Set: Merge with ToT Created 6 years, 7 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
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();
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/extensions/api/identity/identity_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698