| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/views/sync/profile_signin_confirmation_dialog_views.
h" | 5 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.
h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_dialogs.h" | 9 #include "chrome/browser/ui/browser_dialogs.h" |
| 10 #include "chrome/browser/ui/browser_navigator.h" | 10 #include "chrome/browser/ui/browser_navigator.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 ui::CheckShouldPromptForNewProfile( | 106 ui::CheckShouldPromptForNewProfile( |
| 107 profile, | 107 profile, |
| 108 // This callback is guaranteed to be invoked, and once it is, the dialog | 108 // This callback is guaranteed to be invoked, and once it is, the dialog |
| 109 // owns itself. | 109 // owns itself. |
| 110 base::Bind(&ProfileSigninConfirmationDialogViews::Show, | 110 base::Bind(&ProfileSigninConfirmationDialogViews::Show, |
| 111 base::Unretained(dialog))); | 111 base::Unretained(dialog))); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) { | 114 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) { |
| 115 prompt_for_new_profile_ = prompt_for_new_profile; | 115 prompt_for_new_profile_ = prompt_for_new_profile; |
| 116 CreateDialogWidget(this, NULL, browser_->window()->GetNativeWindow())->Show(); | 116 CreateBrowserModalDialogViews( |
| 117 this, browser_->window()->GetNativeWindow())->Show(); |
| 117 } | 118 } |
| 118 | 119 |
| 119 string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const { | 120 string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const { |
| 120 return l10n_util::GetStringUTF16( | 121 return l10n_util::GetStringUTF16( |
| 121 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE); | 122 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE); |
| 122 } | 123 } |
| 123 | 124 |
| 124 string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel( | 125 string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel( |
| 125 ui::DialogButton button) const { | 126 ui::DialogButton button) const { |
| 126 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ? | 127 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ? |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 params.disposition = NEW_POPUP; | 246 params.disposition = NEW_POPUP; |
| 246 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 247 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 247 chrome::Navigate(¶ms); | 248 chrome::Navigate(¶ms); |
| 248 } | 249 } |
| 249 | 250 |
| 250 void ProfileSigninConfirmationDialogViews::ResetCallbacks() { | 251 void ProfileSigninConfirmationDialogViews::ResetCallbacks() { |
| 251 cancel_signin_.Reset(); | 252 cancel_signin_.Reset(); |
| 252 continue_signin_.Reset(); | 253 continue_signin_.Reset(); |
| 253 signin_with_new_profile_.Reset(); | 254 signin_with_new_profile_.Reset(); |
| 254 } | 255 } |
| OLD | NEW |