| 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 3c9dc5916e63b0fd7e4038649bdb239a165140a3..c397cdfa6f72f48936e5ead4cd8307acd90aff20 100644
|
| --- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
|
| @@ -10,7 +10,6 @@
|
| #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h"
|
| #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h"
|
| #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
|
| -#include "components/web_modal/popup_manager.h"
|
| #include "components/web_modal/web_contents_modal_dialog_manager.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/web_contents.h"
|
| @@ -35,10 +34,8 @@ ConstrainedWindowMac::ConstrainedWindowMac(
|
| web_contents_ = guest_view && guest_view->embedder_web_contents() ?
|
| guest_view->embedder_web_contents() : web_contents;
|
| DCHECK(sheet_.get());
|
| - web_modal::PopupManager* popup_manager =
|
| - web_modal::PopupManager::FromWebContents(web_contents_);
|
| - if (popup_manager)
|
| - popup_manager->ShowModalDialog(this, web_contents_);
|
| +
|
| + ShowWebContentsModalDialog();
|
| }
|
|
|
| ConstrainedWindowMac::~ConstrainedWindowMac() {
|
| @@ -64,16 +61,10 @@ void ConstrainedWindowMac::ShowWebContentsModalDialog() {
|
| void ConstrainedWindowMac::CloseWebContentsModalDialog() {
|
| [[ConstrainedWindowSheetController controllerForSheet:sheet_]
|
| closeSheet:sheet_];
|
| - // TODO(gbillock): get this object in config, not from a global.
|
| - WebContentsModalDialogManager* web_contents_modal_dialog_manager =
|
| - WebContentsModalDialogManager::FromWebContents(web_contents_);
|
|
|
| // Will result in the delegate being deleted.
|
| if (delegate_)
|
| delegate_->OnConstrainedWindowClosed(this);
|
| -
|
| - // Will cause this object to be deleted.
|
| - web_contents_modal_dialog_manager->WillClose(this);
|
| }
|
|
|
| void ConstrainedWindowMac::FocusWebContentsModalDialog() {
|
| @@ -83,10 +74,3 @@ void ConstrainedWindowMac::PulseWebContentsModalDialog() {
|
| [[ConstrainedWindowSheetController controllerForSheet:sheet_]
|
| pulseSheet:sheet_];
|
| }
|
| -
|
| -NativeWebContentsModalDialog ConstrainedWindowMac::GetNativeDialog() {
|
| - // TODO(wittman): Ultimately this should be changed to the
|
| - // ConstrainedWindowSheet pointer, in conjunction with the corresponding
|
| - // changes to NativeWebContentsModalDialogManagerCocoa.
|
| - return this;
|
| -}
|
|
|