OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_FORCED_REAUTHENTICATION_DIALOG_DELEGATE_H_ | |
6 #define CHROME_BROWSER_UI_FORCED_REAUTHENTICATION_DIALOG_DELEGATE_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/weak_ptr.h" | |
10 | |
11 class ForcedReauthenticationDialog; | |
12 class Profile; | |
13 class SigninManager; | |
14 | |
15 namespace base { | |
16 class TimeDelta; | |
17 } // namespace base | |
18 | |
19 // A helper class to show/hide ForcedReauthenticationDialog. | |
20 class ForcedReauthenticationDialogDelegate { | |
sky
2017/06/23 17:06:04
Much better, thanks.
It isn't clear why this has D
| |
21 public: | |
22 ForcedReauthenticationDialogDelegate(); | |
23 ~ForcedReauthenticationDialogDelegate(); | |
24 // Show the ForcedReauthenticationDialog for |profile|. If there're no opened | |
25 // browser windows for |profile|, |signin_manager| will be called to signed | |
26 // out immediately. Otherwise, dialog will be closed with all browser windows | |
27 // are assoicated to |profile| after |countdown_duration| if there is no | |
28 // reauth. | |
29 void ShowDialog(Profile* profile, | |
30 SigninManager* signin_manager, | |
31 base::TimeDelta countdown_duration); | |
32 | |
33 void CloseDialog(); | |
sky
2017/06/23 17:06:04
Is there a reason for the explicit close? AFAICT t
| |
34 | |
35 private: | |
36 base::WeakPtr<ForcedReauthenticationDialog> dialog_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(ForcedReauthenticationDialogDelegate); | |
39 }; | |
40 | |
41 #endif // CHROME_BROWSER_UI_FORCED_REAUTHENTICATION_DIALOG_DELEGATE_H_ | |
OLD | NEW |