| Index: chrome/browser/ui/browser_commands.cc
|
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
|
| index 8ae051d1c25df80815e0e847e9452494195f0706..65c0d74dc7eff78eb471252677b9e03a93abca07 100644
|
| --- a/chrome/browser/ui/browser_commands.cc
|
| +++ b/chrome/browser/ui/browser_commands.cc
|
| @@ -64,7 +64,7 @@
|
| #include "components/bookmarks/browser/bookmark_utils.h"
|
| #include "components/google/core/browser/google_util.h"
|
| #include "components/translate/core/browser/language_state.h"
|
| -#include "components/web_modal/web_contents_modal_dialog_manager.h"
|
| +#include "components/web_modal/popup_manager.h"
|
| #include "content/public/browser/devtools_agent_host.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| #include "content/public/browser/navigation_entry.h"
|
| @@ -108,7 +108,6 @@ using content::OpenURLParams;
|
| using content::Referrer;
|
| using content::SSLStatus;
|
| using content::WebContents;
|
| -using web_modal::WebContentsModalDialogManager;
|
|
|
| namespace chrome {
|
| namespace {
|
| @@ -250,9 +249,14 @@ bool IsShowingWebContentsModalDialog(const Browser* browser) {
|
| if (!web_contents)
|
| return false;
|
|
|
| - WebContentsModalDialogManager* web_contents_modal_dialog_manager =
|
| - WebContentsModalDialogManager::FromWebContents(web_contents);
|
| - return web_contents_modal_dialog_manager->IsDialogActive();
|
| + // TODO(gbillock): This gets called by the CanPrint method, and may be too
|
| + // restrictive if we allow print preview to overlap -- we should just queue
|
| + // print requests or attach a user gesture or whatever we know.
|
| + // Note: check because tests may not have a popup manager.
|
| + if (!browser->popup_manager())
|
| + return false;
|
| +
|
| + return browser->popup_manager()->IsWebModalDialogActive(web_contents);
|
| }
|
|
|
| bool PrintPreviewShowing(const Browser* browser) {
|
|
|