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/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 | 167 |
168 std::string ProfileSigninConfirmationDialog::GetDialogArgs() const { | 168 std::string ProfileSigninConfirmationDialog::GetDialogArgs() const { |
169 std::string data; | 169 std::string data; |
170 base::DictionaryValue dict; | 170 base::DictionaryValue dict; |
171 dict.SetString("username", username_); | 171 dict.SetString("username", username_); |
172 dict.SetBoolean("promptForNewProfile", prompt_for_new_profile_); | 172 dict.SetBoolean("promptForNewProfile", prompt_for_new_profile_); |
173 #if defined(OS_WIN) | 173 #if defined(OS_WIN) |
174 dict.SetBoolean("hideTitle", true); | 174 dict.SetBoolean("hideTitle", true); |
175 #endif | 175 #endif |
176 base::JSONWriter::Write(&dict, &data); | 176 base::JSONWriter::Write(dict, &data); |
177 return data; | 177 return data; |
178 } | 178 } |
179 | 179 |
180 void ProfileSigninConfirmationDialog::OnDialogClosed( | 180 void ProfileSigninConfirmationDialog::OnDialogClosed( |
181 const std::string& json_retval) { | 181 const std::string& json_retval) { |
182 if (!closed_by_handler_) | 182 if (!closed_by_handler_) |
183 signin_delegate_->OnCancelSignin(); | 183 signin_delegate_->OnCancelSignin(); |
184 } | 184 } |
185 | 185 |
186 void ProfileSigninConfirmationDialog::OnCloseContents( | 186 void ProfileSigninConfirmationDialog::OnCloseContents( |
187 content::WebContents* source, | 187 content::WebContents* source, |
188 bool* out_close_dialog) { | 188 bool* out_close_dialog) { |
189 *out_close_dialog = true; | 189 *out_close_dialog = true; |
190 } | 190 } |
191 | 191 |
192 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { | 192 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { |
193 return true; | 193 return true; |
194 } | 194 } |
OLD | NEW |