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 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h" | 5 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 base::Bind(&ProfileSigninConfirmationHandler::OnCreateProfileClicked, | 62 base::Bind(&ProfileSigninConfirmationHandler::OnCreateProfileClicked, |
63 base::Unretained(this))); | 63 base::Unretained(this))); |
64 web_ui()->RegisterMessageCallback( | 64 web_ui()->RegisterMessageCallback( |
65 "continue", | 65 "continue", |
66 base::Bind(&ProfileSigninConfirmationHandler::OnContinueButtonClicked, | 66 base::Bind(&ProfileSigninConfirmationHandler::OnContinueButtonClicked, |
67 base::Unretained(this))); | 67 base::Unretained(this))); |
68 } | 68 } |
69 | 69 |
70 void ProfileSigninConfirmationHandler::OnCancelButtonClicked( | 70 void ProfileSigninConfirmationHandler::OnCancelButtonClicked( |
71 const base::ListValue* args) { | 71 const base::ListValue* args) { |
72 // TODO(dconnelly): redirect back to NTP? | |
73 delegate_->OnCancelSignin(); | 72 delegate_->OnCancelSignin(); |
74 dialog_->Close(); | 73 dialog_->Close(); |
75 } | 74 } |
76 | 75 |
77 void ProfileSigninConfirmationHandler::OnCreateProfileClicked( | 76 void ProfileSigninConfirmationHandler::OnCreateProfileClicked( |
78 const base::ListValue* args) { | 77 const base::ListValue* args) { |
79 delegate_->OnSigninWithNewProfile(); | 78 delegate_->OnSigninWithNewProfile(); |
80 dialog_->Close(); | 79 dialog_->Close(); |
81 } | 80 } |
82 | 81 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 184 |
186 void ProfileSigninConfirmationDialog::OnCloseContents( | 185 void ProfileSigninConfirmationDialog::OnCloseContents( |
187 content::WebContents* source, | 186 content::WebContents* source, |
188 bool* out_close_dialog) { | 187 bool* out_close_dialog) { |
189 *out_close_dialog = true; | 188 *out_close_dialog = true; |
190 } | 189 } |
191 | 190 |
192 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { | 191 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { |
193 return true; | 192 return true; |
194 } | 193 } |
OLD | NEW |