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

Unified Diff: chrome/browser/extensions/api/identity/web_auth_flow.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/extensions/api/identity/web_auth_flow.cc
diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.cc b/chrome/browser/extensions/api/identity/web_auth_flow.cc
index 2a88e4843ab0d1b0db134f8da2c4376904c91d30..90b81bb938de8dbcbcf1bb586801ea48f1246ff8 100644
--- a/chrome/browser/extensions/api/identity/web_auth_flow.cc
+++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc
@@ -12,6 +12,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/guest_view/guest_view_base.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/identity_private.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -156,10 +157,10 @@ void WebAuthFlow::Observe(int type,
RenderViewHost* render_view(
content::Details<RenderViewHost>(details).ptr());
WebContents* web_contents = WebContents::FromRenderViewHost(render_view);
-
+ GuestViewBase* guest = GuestViewBase::FromWebContents(web_contents);
+ WebContents* embedder = guest ? guest->embedder_web_contents() : NULL;
if (web_contents &&
- (web_contents->GetEmbedderWebContents() ==
- WebContentsObserver::web_contents())) {
+ (embedder == WebContentsObserver::web_contents())) {
// Switch from watching the app window to the guest inside it.
embedded_window_created_ = true;
WebContentsObserver::Observe(web_contents);
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_apitest.cc ('k') | chrome/browser/guest_view/ad_view/ad_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698