| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 base::Unretained(dialog))); | 144 base::Unretained(dialog))); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void ProfileSigninConfirmationDialog::Close() const { | 147 void ProfileSigninConfirmationDialog::Close() const { |
| 148 closed_by_handler_ = true; | 148 closed_by_handler_ = true; |
| 149 dialog_delegate_->OnDialogCloseFromWebUI(); | 149 dialog_delegate_->OnDialogCloseFromWebUI(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void ProfileSigninConfirmationDialog::Show(bool prompt) { | 152 void ProfileSigninConfirmationDialog::Show(bool prompt) { |
| 153 prompt_for_new_profile_ = prompt; | 153 prompt_for_new_profile_ = prompt; |
| 154 dialog_delegate_ = CreateConstrainedWebDialog(profile_, this, web_contents_); | 154 dialog_delegate_ = ShowConstrainedWebDialog(profile_, this, web_contents_); |
| 155 } | 155 } |
| 156 | 156 |
| 157 ui::ModalType ProfileSigninConfirmationDialog::GetDialogModalType() const { | 157 ui::ModalType ProfileSigninConfirmationDialog::GetDialogModalType() const { |
| 158 return ui::MODAL_TYPE_WINDOW; | 158 return ui::MODAL_TYPE_WINDOW; |
| 159 } | 159 } |
| 160 | 160 |
| 161 base::string16 ProfileSigninConfirmationDialog::GetDialogTitle() const { | 161 base::string16 ProfileSigninConfirmationDialog::GetDialogTitle() const { |
| 162 return l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_TITLE); | 162 return l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_TITLE); |
| 163 } | 163 } |
| 164 | 164 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 void ProfileSigninConfirmationDialog::OnCloseContents( | 205 void ProfileSigninConfirmationDialog::OnCloseContents( |
| 206 content::WebContents* source, | 206 content::WebContents* source, |
| 207 bool* out_close_dialog) { | 207 bool* out_close_dialog) { |
| 208 if (out_close_dialog) | 208 if (out_close_dialog) |
| 209 *out_close_dialog = true; | 209 *out_close_dialog = true; |
| 210 } | 210 } |
| 211 | 211 |
| 212 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { | 212 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { |
| 213 return true; | 213 return true; |
| 214 } | 214 } |
| OLD | NEW |