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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 return ui::DIALOG_BUTTON_NONE; | 102 return ui::DIALOG_BUTTON_NONE; |
103 } | 103 } |
104 | 104 |
105 views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() { | 105 views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() { |
106 if (prompt_for_new_profile_) { | 106 if (prompt_for_new_profile_) { |
107 const base::string16 continue_signin_text = | 107 const base::string16 continue_signin_text = |
108 l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_CONTINUE_NEW_STYLE); | 108 l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_CONTINUE_NEW_STYLE); |
109 continue_signin_button_ = | 109 continue_signin_button_ = |
110 new views::LabelButton(this, continue_signin_text); | 110 new views::LabelButton(this, continue_signin_text); |
111 continue_signin_button_->SetStyle(views::Button::STYLE_BUTTON); | 111 continue_signin_button_->SetStyle(views::Button::STYLE_BUTTON); |
112 continue_signin_button_->SetFocusBehavior(FocusBehavior::ALWAYS); | 112 views::Button::ConfigureDefaultFocus(continue_signin_button_); |
113 } | 113 } |
114 return continue_signin_button_; | 114 return continue_signin_button_; |
115 } | 115 } |
116 | 116 |
117 bool ProfileSigninConfirmationDialogViews::Accept() { | 117 bool ProfileSigninConfirmationDialogViews::Accept() { |
118 if (delegate_) { | 118 if (delegate_) { |
119 if (prompt_for_new_profile_) | 119 if (prompt_for_new_profile_) |
120 delegate_->OnSigninWithNewProfile(); | 120 delegate_->OnSigninWithNewProfile(); |
121 else | 121 else |
122 delegate_->OnContinueSignin(); | 122 delegate_->OnContinueSignin(); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 views::Button* sender, | 246 views::Button* sender, |
247 const ui::Event& event) { | 247 const ui::Event& event) { |
248 DCHECK(prompt_for_new_profile_); | 248 DCHECK(prompt_for_new_profile_); |
249 DCHECK_EQ(continue_signin_button_, sender); | 249 DCHECK_EQ(continue_signin_button_, sender); |
250 if (delegate_) { | 250 if (delegate_) { |
251 delegate_->OnContinueSignin(); | 251 delegate_->OnContinueSignin(); |
252 delegate_ = NULL; | 252 delegate_ = NULL; |
253 } | 253 } |
254 GetWidget()->Close(); | 254 GetWidget()->Close(); |
255 } | 255 } |
OLD | NEW |