- WebContentsModalDialogManager* web_contents_modal_dialog_manager =
- WebContentsModalDialogManager::FromWebContents(web_contents_);
- if (web_contents_modal_dialog_manager) {
- // TODO(erg): WebContents used to own web contents modal dialogs, which is
- // why this is here. Eventually this should be ported to a containing view
- // specializing in web contents modal dialog management.
- if (web_contents_modal_dialog_manager->IsDialogActive()) {
- web_contents_modal_dialog_manager->FocusTopmostDialog();
- return true;
- }
- }
+ web_modal::PopupManager* popup_manager =
+ web_modal::PopupManager::FromWebContents(web_contents_);
+ if (popup_manager)
+ popup_manager->WasFocused(web_contents_);