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

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: fixup and rebase from master 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/profiles/force_signout_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..414b1023864c10d12a42b997743ebcf979b61241 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -176,6 +176,10 @@
#include "chrome/browser/ui/views/sync/one_click_signin_dialog_view.h"
#endif
+#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+#include "chrome/browser/ui/views/profiles/force_signout_dialog.h"
+#endif
+
using base::TimeDelta;
using base::UserMetricsAction;
using content::NativeWebKeyboardEvent;
@@ -1580,8 +1584,12 @@ 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 ((!queue->active_dialog() || !queue->active_dialog()->native_dialog() ||
sky 2017/05/12 13:15:16 Continually adding dependencies from BrowserView o
+ !queue->active_dialog()->native_dialog()->IsShowing())
+#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ && !ForceSignoutDialog::IsShowing()
+#endif
+ ) {
return true;
}
@@ -2595,6 +2603,12 @@ bool BrowserView::DoCutCopyPasteForWebContents(
}
void BrowserView::ActivateAppModalDialog() const {
+#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ if (ForceSignoutDialog::IsShowing()) {
+ ForceSignoutDialog::ActivateModalDialog();
+ return;
+ }
+#endif
// If another browser is app modal, flash and activate the modal browser.
app_modal::AppModalDialog* active_dialog =
app_modal::AppModalDialogQueue::GetInstance()->active_dialog();
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/profiles/force_signout_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698