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

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: Addressed John's comments 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
« no previous file with comments | « chrome/browser/task_manager/guest_information.cc ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c40a3469095f2664e45256f2e1dbc3a54b1bd5f8 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,8 @@ 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 =
+ guest_view::GuestViewBase::GetTopLevelWebContents(web_contents);
auto manager = WebContentsModalDialogManager::FromWebContents(web_contents);
scoped_ptr<SingleWebContentsDialogManagerCocoa> native_manager(
« no previous file with comments | « chrome/browser/task_manager/guest_information.cc ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698