OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_COCO
A_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_COCO
A_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_COCO
A_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_COCO
A_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // A constrained dialog that confirms Chrome sign-in for enterprise users. | 32 // A constrained dialog that confirms Chrome sign-in for enterprise users. |
33 class ProfileSigninConfirmationDialogCocoa : ConstrainedWindowMacDelegate { | 33 class ProfileSigninConfirmationDialogCocoa : ConstrainedWindowMacDelegate { |
34 public: | 34 public: |
35 // Creates and shows the dialog, which owns itself. | 35 // Creates and shows the dialog, which owns itself. |
36 ProfileSigninConfirmationDialogCocoa( | 36 ProfileSigninConfirmationDialogCocoa( |
37 Browser* browser, | 37 Browser* browser, |
38 content::WebContents* web_contents, | 38 content::WebContents* web_contents, |
39 Profile* profile, | 39 Profile* profile, |
40 const std::string& username, | 40 const std::string& username, |
41 ui::ProfileSigninConfirmationDelegate* delegate, | 41 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate, |
42 bool offer_profile_creation); | 42 bool offer_profile_creation); |
43 virtual ~ProfileSigninConfirmationDialogCocoa(); | 43 virtual ~ProfileSigninConfirmationDialogCocoa(); |
44 | 44 |
45 // Shows the dialog if needed. | 45 // Shows the dialog if needed. |
46 static void Show(Browser* browser, | 46 static void Show( |
47 content::WebContents* web_contents, | 47 Browser* browser, |
48 Profile* profile, | 48 content::WebContents* web_contents, |
49 const std::string& username, | 49 Profile* profile, |
50 ui::ProfileSigninConfirmationDelegate* delegate); | 50 const std::string& username, |
| 51 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate); |
51 | 52 |
52 // Closes the dialog, which deletes itself. | 53 // Closes the dialog, which deletes itself. |
53 void Close(); | 54 void Close(); |
54 | 55 |
55 private: | 56 private: |
56 // ConstrainedWindowMacDelegate: | 57 // ConstrainedWindowMacDelegate: |
57 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; | 58 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; |
58 | 59 |
59 // Controller for the dialog view. | 60 // Controller for the dialog view. |
60 base::scoped_nsobject<ProfileSigninConfirmationViewController> controller_; | 61 base::scoped_nsobject<ProfileSigninConfirmationViewController> controller_; |
61 | 62 |
62 // The constrained window that contains the dialog view. | 63 // The constrained window that contains the dialog view. |
63 std::unique_ptr<ConstrainedWindowMac> window_; | 64 std::unique_ptr<ConstrainedWindowMac> window_; |
64 | 65 |
65 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationDialogCocoa); | 66 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationDialogCocoa); |
66 }; | 67 }; |
67 | 68 |
68 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_C
OCOA_H_ | 69 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_C
OCOA_H_ |
OLD | NEW |