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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 ui::CheckShouldPromptForNewProfile( | 84 ui::CheckShouldPromptForNewProfile( |
85 profile, | 85 profile, |
86 // This callback is guaranteed to be invoked, and once it is, the dialog | 86 // This callback is guaranteed to be invoked, and once it is, the dialog |
87 // owns itself. | 87 // owns itself. |
88 base::Bind(&ProfileSigninConfirmationDialogViews::Show, | 88 base::Bind(&ProfileSigninConfirmationDialogViews::Show, |
89 base::Unretained(dialog))); | 89 base::Unretained(dialog))); |
90 } | 90 } |
91 | 91 |
92 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) { | 92 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) { |
93 prompt_for_new_profile_ = prompt_for_new_profile; | 93 prompt_for_new_profile_ = prompt_for_new_profile; |
94 CreateBrowserModalDialogViews( | 94 CreateAppModalDialogViews( |
95 this, browser_->window()->GetNativeWindow())->Show(); | 95 this, browser_->window()->GetNativeWindow())->Show(); |
96 } | 96 } |
97 | 97 |
98 base::string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const { | 98 base::string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const { |
99 return l10n_util::GetStringUTF16( | 99 return l10n_util::GetStringUTF16( |
100 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE); | 100 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE); |
101 } | 101 } |
102 | 102 |
103 base::string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel( | 103 base::string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel( |
104 ui::DialogButton button) const { | 104 ui::DialogButton button) const { |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 views::Button* sender, | 263 views::Button* sender, |
264 const ui::Event& event) { | 264 const ui::Event& event) { |
265 DCHECK(prompt_for_new_profile_); | 265 DCHECK(prompt_for_new_profile_); |
266 DCHECK_EQ(continue_signin_button_, sender); | 266 DCHECK_EQ(continue_signin_button_, sender); |
267 if (delegate_) { | 267 if (delegate_) { |
268 delegate_->OnContinueSignin(); | 268 delegate_->OnContinueSignin(); |
269 delegate_ = NULL; | 269 delegate_ = NULL; |
270 } | 270 } |
271 GetWidget()->Close(); | 271 GetWidget()->Close(); |
272 } | 272 } |
OLD | NEW |