Chromium Code Reviews| Index: chrome/browser/ui/forced_reauthentication_dialog.h |
| diff --git a/chrome/browser/ui/forced_reauthentication_dialog.h b/chrome/browser/ui/forced_reauthentication_dialog.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6a852801aa5886eb4b720d0d7fdd5d5594ea07f0 |
| --- /dev/null |
| +++ b/chrome/browser/ui/forced_reauthentication_dialog.h |
| @@ -0,0 +1,42 @@ |
| +// 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_H_ |
| +#define CHROME_BROWSER_UI_FORCED_REAUTHENTICATION_DIALOG_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
|
sky
2017/06/26 22:18:21
This include isn't used.
|
| + |
| +class Profile; |
| +class SigninManager; |
| + |
| +namespace base { |
| +class TimeDelta; |
| +} // namespace base |
| + |
| +// The virtual class of ForcedReauthenticationDialog. |
| +class ForcedReauthenticationDialog { |
| + public: |
| + static std::unique_ptr<ForcedReauthenticationDialog> Create(); |
| + |
| + virtual ~ForcedReauthenticationDialog() = 0; |
|
sky
2017/06/26 22:18:21
Typically we inline these. That way you don't have
|
| + // 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. |
| + virtual void ShowDialog(Profile* profile, |
| + SigninManager* signin_manager, |
| + base::TimeDelta countdown_duration) = 0; |
| + |
| + protected: |
| + ForcedReauthenticationDialog(); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ForcedReauthenticationDialog); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_FORCED_REAUTHENTICATION_DIALOG_H_ |