| 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_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_COCO
A_ |
| 6 #define CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_COCO
A_ | 6 #define CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_COCO
A_ |
| 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 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate, | 41 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( | 46 static void Show(Browser* browser, |
| 47 Browser* browser, | 47 content::WebContents* web_contents, |
| 48 content::WebContents* web_contents, | 48 Profile* profile, |
| 49 Profile* profile, | 49 const std::string& username, |
| 50 const std::string& username, | 50 ui::ProfileSigninConfirmationDelegate* delegate); |
| 51 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate); | |
| 52 | 51 |
| 53 // Closes the dialog, which deletes itself. | 52 // Closes the dialog, which deletes itself. |
| 54 void Close(); | 53 void Close(); |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 // ConstrainedWindowMacDelegate: | 56 // ConstrainedWindowMacDelegate: |
| 58 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; | 57 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; |
| 59 | 58 |
| 60 // Controller for the dialog view. | 59 // Controller for the dialog view. |
| 61 base::scoped_nsobject<ProfileSigninConfirmationViewController> controller_; | 60 base::scoped_nsobject<ProfileSigninConfirmationViewController> controller_; |
| 62 | 61 |
| 63 // The constrained window that contains the dialog view. | 62 // The constrained window that contains the dialog view. |
| 64 std::unique_ptr<ConstrainedWindowMac> window_; | 63 std::unique_ptr<ConstrainedWindowMac> window_; |
| 65 | 64 |
| 66 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationDialogCocoa); | 65 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationDialogCocoa); |
| 67 }; | 66 }; |
| 68 | 67 |
| 69 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_C
OCOA_ | 68 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_SIGNIN_CONFIRMATION_DIALOG_C
OCOA_ |
| OLD | NEW |