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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 287123002: [WebModals] New API for browser-scoped popup management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make PopupManager a thin API for WCMDM Created 6 years, 7 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/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index d1385587ed464427f7143fd159bc9d49f73aef21..5c7973d233043fadca1a1685b62715e25671a690 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -61,7 +61,7 @@
#include "chrome/common/pref_names.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_utils.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"
@@ -105,7 +105,6 @@ using content::OpenURLParams;
using content::Referrer;
using content::SSLStatus;
using content::WebContents;
-using web_modal::WebContentsModalDialogManager;
namespace chrome {
namespace {
@@ -244,9 +243,10 @@ 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.
+ return browser->popup_manager()->IsWebModalDialogActive(web_contents);
}
bool PrintPreviewShowing(const Browser* browser) {

Powered by Google App Engine
This is Rietveld 408576698