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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2862653002: If force-sign-in policy is enabled, popup warning dialog before window closing if auth token becom… (Closed)
Patch Set: cr Created 3 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/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 2deae98f3f4f27b3af24bad518cd95c7a44ed0a9..46fda60c55feedf69686f210af598408f3101483 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -61,6 +61,7 @@
#include "chrome/browser/ui/views/accessibility/invert_bubble_view.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
+#include "chrome/browser/ui/views/browser_modal_dialog.h"
#include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h"
#include "chrome/browser/ui/views/download/download_shelf_view.h"
#include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
@@ -103,9 +104,6 @@
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/locale_settings.h"
#include "chrome/grit/theme_resources.h"
-#include "components/app_modal/app_modal_dialog.h"
-#include "components/app_modal/app_modal_dialog_queue.h"
-#include "components/app_modal/native_app_modal_dialog.h"
#include "components/omnibox/browser/omnibox_popup_model.h"
#include "components/omnibox/browser/omnibox_popup_view.h"
#include "components/omnibox/browser/omnibox_view.h"
@@ -1578,17 +1576,14 @@ bool BrowserView::CanMinimize() const {
}
bool BrowserView::CanActivate() const {
- app_modal::AppModalDialogQueue* queue =
- app_modal::AppModalDialogQueue::GetInstance();
- if (!queue->active_dialog() || !queue->active_dialog()->native_dialog() ||
- !queue->active_dialog()->native_dialog()->IsShowing()) {
+ if (!BrowserModalDialogList::GetInstance()->IsShowing()) {
sky 2017/05/17 18:03:18 no {}
zmin 2017/05/18 03:31:18 Done.
return true;
}
#if defined(USE_AURA) && defined(OS_CHROMEOS)
// On Aura window manager controls all windows so settings focus via PostTask
// will make only worse because posted task will keep trying to steal focus.
- queue->ActivateModalDialog();
+ BrowserModalDialogList::GetInstance()->ActivateModalDialog(browser_.get());
#else
// If another browser is app modal, flash and activate the modal browser. This
// has to be done in a post task, otherwise if the user clicked on a window
@@ -2595,20 +2590,7 @@ bool BrowserView::DoCutCopyPasteForWebContents(
}
void BrowserView::ActivateAppModalDialog() const {
- // If another browser is app modal, flash and activate the modal browser.
- app_modal::AppModalDialog* active_dialog =
- app_modal::AppModalDialogQueue::GetInstance()->active_dialog();
- if (!active_dialog)
- return;
-
- Browser* modal_browser =
- chrome::FindBrowserWithWebContents(active_dialog->web_contents());
- if (modal_browser && (browser_.get() != modal_browser)) {
- modal_browser->window()->FlashFrame(true);
- modal_browser->window()->Activate();
- }
-
- app_modal::AppModalDialogQueue::GetInstance()->ActivateModalDialog();
+ BrowserModalDialogList::GetInstance()->ActivateModalDialog(browser_.get());
}
int BrowserView::GetMaxTopInfoBarArrowHeight() {

Powered by Google App Engine
This is Rietveld 408576698