| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 views::Button::ConfigureDefaultFocus(continue_signin_button_); | 112 views::Button::ConfigureDefaultFocus(continue_signin_button_); |
| 113 continue_signin_button_->set_request_focus_on_press(true); |
| 113 } | 114 } |
| 114 return continue_signin_button_; | 115 return continue_signin_button_; |
| 115 } | 116 } |
| 116 | 117 |
| 117 bool ProfileSigninConfirmationDialogViews::Accept() { | 118 bool ProfileSigninConfirmationDialogViews::Accept() { |
| 118 if (delegate_) { | 119 if (delegate_) { |
| 119 if (prompt_for_new_profile_) | 120 if (prompt_for_new_profile_) |
| 120 delegate_->OnSigninWithNewProfile(); | 121 delegate_->OnSigninWithNewProfile(); |
| 121 else | 122 else |
| 122 delegate_->OnContinueSignin(); | 123 delegate_->OnContinueSignin(); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 views::Button* sender, | 247 views::Button* sender, |
| 247 const ui::Event& event) { | 248 const ui::Event& event) { |
| 248 DCHECK(prompt_for_new_profile_); | 249 DCHECK(prompt_for_new_profile_); |
| 249 DCHECK_EQ(continue_signin_button_, sender); | 250 DCHECK_EQ(continue_signin_button_, sender); |
| 250 if (delegate_) { | 251 if (delegate_) { |
| 251 delegate_->OnContinueSignin(); | 252 delegate_->OnContinueSignin(); |
| 252 delegate_ = NULL; | 253 delegate_ = NULL; |
| 253 } | 254 } |
| 254 GetWidget()->Close(); | 255 GetWidget()->Close(); |
| 255 } | 256 } |
| OLD | NEW |