OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/autofill/autofill_dialog_views.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 SetVisible(!delegate_->ShouldShowSpinner()); | 482 SetVisible(!delegate_->ShouldShowSpinner()); |
483 | 483 |
484 gfx::Image icon = delegate_->AccountChooserImage(); | 484 gfx::Image icon = delegate_->AccountChooserImage(); |
485 image_->SetImage(icon.AsImageSkia()); | 485 image_->SetImage(icon.AsImageSkia()); |
486 menu_button_->SetText(delegate_->AccountChooserText()); | 486 menu_button_->SetText(delegate_->AccountChooserText()); |
487 | 487 |
488 bool show_link = !delegate_->MenuModelForAccountChooser(); | 488 bool show_link = !delegate_->MenuModelForAccountChooser(); |
489 menu_button_->SetVisible(!show_link); | 489 menu_button_->SetVisible(!show_link); |
490 link_->SetText(delegate_->SignInLinkText()); | 490 link_->SetText(delegate_->SignInLinkText()); |
491 link_->SetVisible(show_link); | 491 link_->SetVisible(show_link); |
| 492 link_->SetEnabled(!delegate_->ShouldDisableSignInLink()); |
492 | 493 |
493 menu_runner_.reset(); | 494 menu_runner_.reset(); |
494 | 495 |
495 PreferredSizeChanged(); | 496 PreferredSizeChanged(); |
496 } | 497 } |
497 | 498 |
498 void AutofillDialogViews::AccountChooser::OnMenuButtonClicked( | 499 void AutofillDialogViews::AccountChooser::OnMenuButtonClicked( |
499 views::View* source, | 500 views::View* source, |
500 const gfx::Point& point) { | 501 const gfx::Point& point) { |
501 DCHECK_EQ(menu_button_, source); | 502 DCHECK_EQ(menu_button_, source); |
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2285 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2286 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2286 : section(section), | 2287 : section(section), |
2287 container(NULL), | 2288 container(NULL), |
2288 manual_input(NULL), | 2289 manual_input(NULL), |
2289 suggested_info(NULL), | 2290 suggested_info(NULL), |
2290 suggested_button(NULL) {} | 2291 suggested_button(NULL) {} |
2291 | 2292 |
2292 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2293 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2293 | 2294 |
2294 } // namespace autofill | 2295 } // namespace autofill |
OLD | NEW |