| 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 "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_dialogs.h" | 10 #include "chrome/browser/ui/browser_dialogs.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 DCHECK(browser); | 123 DCHECK(browser); |
| 124 delegate_ = CreateConstrainedWebDialog( | 124 delegate_ = CreateConstrainedWebDialog( |
| 125 profile, this, NULL, browser->tab_strip_model()->GetActiveWebContents()); | 125 profile, this, NULL, browser->tab_strip_model()->GetActiveWebContents()); |
| 126 } | 126 } |
| 127 | 127 |
| 128 ProfileSigninConfirmationDialog::~ProfileSigninConfirmationDialog() { | 128 ProfileSigninConfirmationDialog::~ProfileSigninConfirmationDialog() { |
| 129 } | 129 } |
| 130 | 130 |
| 131 void ProfileSigninConfirmationDialog::Close() const { | 131 void ProfileSigninConfirmationDialog::Close() const { |
| 132 closed_by_handler_ = true; | 132 closed_by_handler_ = true; |
| 133 delegate_->GetWindow()->CloseWebContentsModalDialog(); | 133 delegate_->OnDialogCloseFromWebUI(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 ui::ModalType ProfileSigninConfirmationDialog::GetDialogModalType() const { | 136 ui::ModalType ProfileSigninConfirmationDialog::GetDialogModalType() const { |
| 137 return ui::MODAL_TYPE_WINDOW; | 137 return ui::MODAL_TYPE_WINDOW; |
| 138 } | 138 } |
| 139 | 139 |
| 140 string16 ProfileSigninConfirmationDialog::GetDialogTitle() const { | 140 string16 ProfileSigninConfirmationDialog::GetDialogTitle() const { |
| 141 return l10n_util::GetStringUTF16( | 141 return l10n_util::GetStringUTF16( |
| 142 IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_DIALOG_TITLE); | 142 IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_DIALOG_TITLE); |
| 143 } | 143 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void ProfileSigninConfirmationDialog::OnCloseContents( | 178 void ProfileSigninConfirmationDialog::OnCloseContents( |
| 179 content::WebContents* source, | 179 content::WebContents* source, |
| 180 bool* out_close_dialog) { | 180 bool* out_close_dialog) { |
| 181 if (out_close_dialog) | 181 if (out_close_dialog) |
| 182 *out_close_dialog = true; | 182 *out_close_dialog = true; |
| 183 } | 183 } |
| 184 | 184 |
| 185 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { | 185 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { |
| 186 return true; | 186 return true; |
| 187 } | 187 } |
| OLD | NEW |