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

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

Issue 2862653002: If force-sign-in policy is enabled, popup warning dialog before window closing if auth token becom… (Closed)
Patch Set: fixup Created 3 years, 7 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
(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_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_H_
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_H_
7
8 #include <string>
9
10 #include "components/app_modal/app_modal_dialog.h"
11
12 namespace app_modal {
13 class NativeAppModalDialog;
14 } // namespace app_modal
15
16 class Browser;
17 class ForceSignoutTimer;
18 class Profile;
19 class SigninManager;
20
21 // A app modal dialog that display the warning message of the auth failure
sky 2017/05/04 03:45:11 An app modal dialog that displays a warning messag
zmin 2017/05/04 23:13:52 Done.
22 // before signing out user and closing browser window.
23 class ForceSignoutDialog : public app_modal::AppModalDialog {
24 public:
25 // Show the warning dialog on the browser window that is belonged to the
26 // |profile|. Sign out the profile directly if there is no opened browser
27 // window or tabs.
28 // Sign out the profile if user confirmed the window or sign out the profile
29 // with a delay if signout_timer is set.
30 static void ShowDialog(Profile* profile,
31 SigninManager* signin_manager,
32 ForceSignoutTimer* signout_timer);
33 void OnAccept();
34 void OnCancel();
35 std::string GetEmail();
36 // Return true if ForceSignoutTimer is set.
37 bool IsDelayAllowed();
38
39 protected:
40 app_modal::NativeAppModalDialog* CreateNativeDialog() override;
41
42 private:
43 ForceSignoutDialog(Browser* browser,
44 SigninManager* signin_manager,
45 ForceSignoutTimer* signout_timer);
46
47 Browser* browser_;
48 SigninManager* signin_manager_;
49 ForceSignoutTimer* signout_timer_;
50 };
sky 2017/05/04 03:45:11 DISALLOW...
zmin 2017/05/04 23:13:52 Done.
51
52 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698