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

Unified Diff: chrome/browser/ui/forced_reauthentication_dialog_delegate.h

Issue 2944713003: After signin token check failed, show force reauth dialog and start window closing countdown. (Closed)
Patch Set: delegate Created 3 years, 6 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/forced_reauthentication_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/profiles/forced_reauthentication_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698