 Chromium Code Reviews
 Chromium Code Reviews Issue 2862653002:
  If force-sign-in policy is enabled,  popup warning dialog before window closing if auth token becom…  (Closed)
    
  
    Issue 2862653002:
  If force-sign-in policy is enabled,  popup warning dialog before window closing if auth token becom…  (Closed) 
  | 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 66f94a6abf38d8c66fd75458e3a17bab019d723f..40bfa57c96689ce2f047d7cb2981b41e0332b28f 100644 | 
| --- a/chrome/browser/ui/views/frame/browser_view.cc | 
| +++ b/chrome/browser/ui/views/frame/browser_view.cc | 
| @@ -82,6 +82,7 @@ | 
| #include "chrome/browser/ui/views/new_back_shortcut_bubble.h" | 
| #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" | 
| #include "chrome/browser/ui/views/page_info/page_info_bubble_view.h" | 
| +#include "chrome/browser/ui/views/profiles/force_signout_dialog.h" | 
| #include "chrome/browser/ui/views/profiles/profile_indicator_icon.h" | 
| #include "chrome/browser/ui/views/status_bubble_views.h" | 
| #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" | 
| @@ -1581,8 +1582,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/10 15:43:25
Ugh! Sorry, I think I sent you down the wrong path
 | 
| + !queue->active_dialog()->native_dialog()->IsShowing()) | 
| +#if defined(OS_WIN) || defined(OS_LINUX) | 
| + && !ForceSignoutDialog::IsShowing() | 
| +#endif | 
| + ) { | 
| return true; | 
| } | 
| @@ -2603,6 +2608,12 @@ bool BrowserView::DoCutCopyPasteForWebContents( | 
| } | 
| void BrowserView::ActivateAppModalDialog() const { | 
| +#if defined(OS_WIN) || defined(OS_LINUX) | 
| + 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(); |