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_ = | 154 dialog_delegate_ = CreateConstrainedWebDialog(profile_, this, web_contents_); |
155 CreateConstrainedWebDialog(profile_, this, NULL, web_contents_); | |
156 } | 155 } |
157 | 156 |
158 ui::ModalType ProfileSigninConfirmationDialog::GetDialogModalType() const { | 157 ui::ModalType ProfileSigninConfirmationDialog::GetDialogModalType() const { |
159 return ui::MODAL_TYPE_WINDOW; | 158 return ui::MODAL_TYPE_WINDOW; |
160 } | 159 } |
161 | 160 |
162 base::string16 ProfileSigninConfirmationDialog::GetDialogTitle() const { | 161 base::string16 ProfileSigninConfirmationDialog::GetDialogTitle() const { |
163 return l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_TITLE); | 162 return l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_TITLE); |
164 } | 163 } |
165 | 164 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 void ProfileSigninConfirmationDialog::OnCloseContents( | 205 void ProfileSigninConfirmationDialog::OnCloseContents( |
207 content::WebContents* source, | 206 content::WebContents* source, |
208 bool* out_close_dialog) { | 207 bool* out_close_dialog) { |
209 if (out_close_dialog) | 208 if (out_close_dialog) |
210 *out_close_dialog = true; | 209 *out_close_dialog = true; |
211 } | 210 } |
212 | 211 |
213 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { | 212 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { |
214 return true; | 213 return true; |
215 } | 214 } |
OLD | NEW |