| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return ui::DIALOG_BUTTON_NONE; | 110 return ui::DIALOG_BUTTON_NONE; |
| 111 } | 111 } |
| 112 | 112 |
| 113 views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() { | 113 views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() { |
| 114 if (prompt_for_new_profile_) { | 114 if (prompt_for_new_profile_) { |
| 115 const base::string16 continue_signin_text = | 115 const base::string16 continue_signin_text = |
| 116 l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_CONTINUE_NEW_STYLE); | 116 l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_CONTINUE_NEW_STYLE); |
| 117 continue_signin_button_ = | 117 continue_signin_button_ = |
| 118 new views::LabelButton(this, continue_signin_text); | 118 new views::LabelButton(this, continue_signin_text); |
| 119 continue_signin_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); | 119 continue_signin_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); |
| 120 continue_signin_button_->set_focusable(true); | 120 continue_signin_button_->SetFocusable(true); |
| 121 } | 121 } |
| 122 return continue_signin_button_; | 122 return continue_signin_button_; |
| 123 } | 123 } |
| 124 | 124 |
| 125 bool ProfileSigninConfirmationDialogViews::Accept() { | 125 bool ProfileSigninConfirmationDialogViews::Accept() { |
| 126 if (delegate_) { | 126 if (delegate_) { |
| 127 if (prompt_for_new_profile_) | 127 if (prompt_for_new_profile_) |
| 128 delegate_->OnSigninWithNewProfile(); | 128 delegate_->OnSigninWithNewProfile(); |
| 129 else | 129 else |
| 130 delegate_->OnContinueSignin(); | 130 delegate_->OnContinueSignin(); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 views::Button* sender, | 253 views::Button* sender, |
| 254 const ui::Event& event) { | 254 const ui::Event& event) { |
| 255 DCHECK(prompt_for_new_profile_); | 255 DCHECK(prompt_for_new_profile_); |
| 256 DCHECK_EQ(continue_signin_button_, sender); | 256 DCHECK_EQ(continue_signin_button_, sender); |
| 257 if (delegate_) { | 257 if (delegate_) { |
| 258 delegate_->OnContinueSignin(); | 258 delegate_->OnContinueSignin(); |
| 259 delegate_ = NULL; | 259 delegate_ = NULL; |
| 260 } | 260 } |
| 261 GetWidget()->Close(); | 261 GetWidget()->Close(); |
| 262 } | 262 } |
| OLD | NEW |