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

Unified Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm

Issue 1102173002: Move GuestView layer in browser to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test change to build Created 5 years, 8 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/ui/cocoa/constrained_window/constrained_window_mac.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
index 0cc3fa0e98e399e9f8c684496af2539e5f18a943..702ac96ab18e0e8e6046e0c56c9abf18c3e075f5 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
@@ -8,9 +8,9 @@
#include "base/logging.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h"
#import "chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.h"
+#include "components/guest_view/browser/guest_view_base.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_thread.h"
-#include "extensions/browser/guest_view/guest_view_base.h"
using web_modal::WebContentsModalDialogManager;
@@ -23,12 +23,7 @@ ConstrainedWindowMac::ConstrainedWindowMac(
// |web_contents| may be embedded within a chain of nested GuestViews. If it
// is, follow the chain of embedders to the outermost WebContents and use it.
- while (extensions::GuestViewBase* guest_view =
- extensions::GuestViewBase::FromWebContents(web_contents)) {
- if (!guest_view->embedder_web_contents())
- break;
- web_contents = guest_view->embedder_web_contents();
- }
+ web_contents = guestview::GuestViewBase::GetTopLevelWebContents(web_contents);
auto manager = WebContentsModalDialogManager::FromWebContents(web_contents);
scoped_ptr<SingleWebContentsDialogManagerCocoa> native_manager(

Powered by Google App Engine
This is Rietveld 408576698