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

Side by Side Diff: chrome/browser/ui/views/profiles/forced_reauthentication_dialog.h

Issue 2944713003: After signin token check failed, show force reauth dialog and start window closing countdown. (Closed)
Patch Set: cr 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_FORCED_REAUTHENTICATION_DIALOG_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_FORCED_REAUTHENTICATION_DIALOG_H_
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_FORCED_REAUTHENTICATION_DIALOG_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_FORCED_REAUTHENTICATION_DIALOG_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 ~ForcedReauthenticationDialog() override; 25 ~ForcedReauthenticationDialog() override;
26 26
27 // Shows a warning dialog for |profile|. If there are no Browser windows 27 // Shows a warning dialog for |profile|. If there are no Browser windows
28 // associated with |profile|, signs out the profile immediately, otherwise the 28 // associated with |profile|, signs out the profile immediately, otherwise the
29 // user can clicks accept to sign in again. Dialog will be closed after 29 // user can clicks accept to sign in again. Dialog will be closed after
30 // |countdown_duration| seconds. 30 // |countdown_duration| seconds.
31 // Dialog will delete itself after closing. 31 // Dialog will delete itself after closing.
32 static ForcedReauthenticationDialog* ShowDialog( 32 static ForcedReauthenticationDialog* ShowDialog(
33 Profile* profile, 33 Profile* profile,
34 SigninManager* signin_manager, 34 SigninManager* signin_manager,
35 const base::TimeDelta& countdown_duration); 35 base::TimeDelta countdown_duration);
36 36
37 // override views::DialogDelegateView 37 // override views::DialogDelegateView
38 bool Accept() override; 38 bool Accept() override;
39 bool Cancel() override; 39 bool Cancel() override;
40 void WindowClosing() override; 40 void WindowClosing() override;
41 base::string16 GetWindowTitle() const override; 41 base::string16 GetWindowTitle() const override;
42 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 42 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
43 ui::ModalType GetModalType() const override; 43 ui::ModalType GetModalType() const override;
44 44
45 // override views::View 45 // override views::View
46 void AddedToWidget() override; 46 void AddedToWidget() override;
47 47
48 private: 48 private:
49 // Show the dialog for |browser|. The dialog will delete itself after closing. 49 // Show the dialog for |browser|. The dialog will delete itself after closing.
50 ForcedReauthenticationDialog(Browser* browser, 50 ForcedReauthenticationDialog(Browser* browser,
51 SigninManager* signin_manager, 51 SigninManager* signin_manager,
52 const base::TimeDelta& countdown_duration); 52 base::TimeDelta countdown_duration);
53 53
54 void OnCountDown(); 54 void OnCountDown();
55 base::TimeDelta GetTimeRemaining() const; 55 base::TimeDelta GetTimeRemaining() const;
56 56
57 Browser* browser_; 57 Browser* browser_;
58 SigninManager* signin_manager_; 58 SigninManager* signin_manager_;
59 59
60 const base::TimeTicks desired_close_time_; 60 const base::TimeTicks desired_close_time_;
61 61
62 // The timer which is used to refresh the dialog title to display the 62 // The timer which is used to refresh the dialog title to display the
63 // remaining time. 63 // remaining time.
64 base::RepeatingTimer refresh_timer_; 64 base::RepeatingTimer refresh_timer_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(ForcedReauthenticationDialog); 66 DISALLOW_COPY_AND_ASSIGN(ForcedReauthenticationDialog);
67 }; 67 };
68 68
69 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_FORCED_REAUTHENTICATION_DIALOG_H_ 69 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_FORCED_REAUTHENTICATION_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698