Index: chrome/browser/ui/forced_reauthentication_dialog_delegate.h |
diff --git a/chrome/browser/ui/forced_reauthentication_dialog_delegate.h b/chrome/browser/ui/forced_reauthentication_dialog_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..392639977038c6b8280bffafef36367c41d68c27 |
--- /dev/null |
+++ b/chrome/browser/ui/forced_reauthentication_dialog_delegate.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_FORCED_REAUTHENTICATION_DIALOG_DELEGATE_H_ |
+#define CHROME_BROWSER_UI_FORCED_REAUTHENTICATION_DIALOG_DELEGATE_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
+ |
+class ForcedReauthenticationDialog; |
+class Profile; |
+class SigninManager; |
+ |
+namespace base { |
+class TimeDelta; |
+} // namespace base |
+ |
+// A helper class to show/hide ForcedReauthenticationDialog. |
+class ForcedReauthenticationDialogDelegate { |
sky
2017/06/23 17:06:04
Much better, thanks.
It isn't clear why this has D
|
+ public: |
+ ForcedReauthenticationDialogDelegate(); |
+ ~ForcedReauthenticationDialogDelegate(); |
+ // Show the ForcedReauthenticationDialog for |profile|. If there're no opened |
+ // browser windows for |profile|, |signin_manager| will be called to signed |
+ // out immediately. Otherwise, dialog will be closed with all browser windows |
+ // are assoicated to |profile| after |countdown_duration| if there is no |
+ // reauth. |
+ void ShowDialog(Profile* profile, |
+ SigninManager* signin_manager, |
+ base::TimeDelta countdown_duration); |
+ |
+ void CloseDialog(); |
sky
2017/06/23 17:06:04
Is there a reason for the explicit close? AFAICT t
|
+ |
+ private: |
+ base::WeakPtr<ForcedReauthenticationDialog> dialog_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ForcedReauthenticationDialogDelegate); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_FORCED_REAUTHENTICATION_DIALOG_DELEGATE_H_ |