| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 const std::string& username, | 44 const std::string& username, |
| 45 ui::ProfileSigninConfirmationDelegate* delegate); | 45 ui::ProfileSigninConfirmationDelegate* delegate); |
| 46 virtual ~ProfileSigninConfirmationDialog(); | 46 virtual ~ProfileSigninConfirmationDialog(); |
| 47 | 47 |
| 48 // Shows the dialog and releases ownership of this object. It will | 48 // Shows the dialog and releases ownership of this object. It will |
| 49 // delete itself when the dialog is closed. If |prompt_for_new_profile| | 49 // delete itself when the dialog is closed. If |prompt_for_new_profile| |
| 50 // is true, the dialog will offer to create a new profile before signin. | 50 // is true, the dialog will offer to create a new profile before signin. |
| 51 void Show(bool prompt_for_new_profile); | 51 void Show(bool prompt_for_new_profile); |
| 52 | 52 |
| 53 // WebDialogDelegate implementation. | 53 // WebDialogDelegate implementation. |
| 54 virtual ui::ModalType GetDialogModalType() const OVERRIDE; | 54 virtual ui::ModalType GetDialogModalType() const override; |
| 55 virtual base::string16 GetDialogTitle() const OVERRIDE; | 55 virtual base::string16 GetDialogTitle() const override; |
| 56 virtual GURL GetDialogContentURL() const OVERRIDE; | 56 virtual GURL GetDialogContentURL() const override; |
| 57 virtual void GetWebUIMessageHandlers( | 57 virtual void GetWebUIMessageHandlers( |
| 58 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; | 58 std::vector<content::WebUIMessageHandler*>* handlers) const override; |
| 59 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | 59 virtual void GetDialogSize(gfx::Size* size) const override; |
| 60 virtual std::string GetDialogArgs() const OVERRIDE; | 60 virtual std::string GetDialogArgs() const override; |
| 61 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 61 virtual void OnDialogClosed(const std::string& json_retval) override; |
| 62 virtual void OnCloseContents(content::WebContents* source, | 62 virtual void OnCloseContents(content::WebContents* source, |
| 63 bool* out_close_dialog) OVERRIDE; | 63 bool* out_close_dialog) override; |
| 64 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 64 virtual bool ShouldShowDialogTitle() const override; |
| 65 | 65 |
| 66 // Weak pointer to the containing view. | 66 // Weak pointer to the containing view. |
| 67 content::WebContents* web_contents_; | 67 content::WebContents* web_contents_; |
| 68 | 68 |
| 69 // Weak pointer to the profile being signed-in. | 69 // Weak pointer to the profile being signed-in. |
| 70 Profile* profile_; | 70 Profile* profile_; |
| 71 | 71 |
| 72 // The GAIA username being signed in. | 72 // The GAIA username being signed in. |
| 73 std::string username_; | 73 std::string username_; |
| 74 | 74 |
| 75 // Weak pointer to the signin delegate. | 75 // Weak pointer to the signin delegate. |
| 76 ui::ProfileSigninConfirmationDelegate* signin_delegate_; | 76 ui::ProfileSigninConfirmationDelegate* signin_delegate_; |
| 77 | 77 |
| 78 // Weak pointer to the dialog delegate. | 78 // Weak pointer to the dialog delegate. |
| 79 ConstrainedWebDialogDelegate* dialog_delegate_; | 79 ConstrainedWebDialogDelegate* dialog_delegate_; |
| 80 | 80 |
| 81 // Whether to show the "Create a new profile" button. | 81 // Whether to show the "Create a new profile" button. |
| 82 bool prompt_for_new_profile_; | 82 bool prompt_for_new_profile_; |
| 83 | 83 |
| 84 // Cleanup bookkeeping. Labeled mutable to get around inherited const | 84 // Cleanup bookkeeping. Labeled mutable to get around inherited const |
| 85 // label on GetWebUIMessageHandlers. | 85 // label on GetWebUIMessageHandlers. |
| 86 mutable bool closed_by_handler_; | 86 mutable bool closed_by_handler_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationDialog); | 88 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationDialog); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_ | 91 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_ |
| OLD | NEW |