| 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 SetVisible(!delegate_->ShouldShowSpinner()); | 532 SetVisible(!delegate_->ShouldShowSpinner()); |
| 533 | 533 |
| 534 gfx::Image icon = delegate_->AccountChooserImage(); | 534 gfx::Image icon = delegate_->AccountChooserImage(); |
| 535 image_->SetImage(icon.AsImageSkia()); | 535 image_->SetImage(icon.AsImageSkia()); |
| 536 menu_button_->SetText(delegate_->AccountChooserText()); | 536 menu_button_->SetText(delegate_->AccountChooserText()); |
| 537 | 537 |
| 538 bool show_link = !delegate_->MenuModelForAccountChooser(); | 538 bool show_link = !delegate_->MenuModelForAccountChooser(); |
| 539 menu_button_->SetVisible(!show_link); | 539 menu_button_->SetVisible(!show_link); |
| 540 link_->SetText(delegate_->SignInLinkText()); | 540 link_->SetText(delegate_->SignInLinkText()); |
| 541 link_->SetVisible(show_link); | 541 link_->SetVisible(show_link); |
| 542 link_->SetEnabled(delegate_->SignedInState() != REQUIRES_RESPONSE); |
| 542 | 543 |
| 543 menu_runner_.reset(); | 544 menu_runner_.reset(); |
| 544 | 545 |
| 545 PreferredSizeChanged(); | 546 PreferredSizeChanged(); |
| 546 } | 547 } |
| 547 | 548 |
| 548 void AutofillDialogViews::AccountChooser::OnMenuButtonClicked( | 549 void AutofillDialogViews::AccountChooser::OnMenuButtonClicked( |
| 549 views::View* source, | 550 views::View* source, |
| 550 const gfx::Point& point) { | 551 const gfx::Point& point) { |
| 551 DCHECK_EQ(menu_button_, source); | 552 DCHECK_EQ(menu_button_, source); |
| (...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2420 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2421 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
| 2421 : section(section), | 2422 : section(section), |
| 2422 container(NULL), | 2423 container(NULL), |
| 2423 manual_input(NULL), | 2424 manual_input(NULL), |
| 2424 suggested_info(NULL), | 2425 suggested_info(NULL), |
| 2425 suggested_button(NULL) {} | 2426 suggested_button(NULL) {} |
| 2426 | 2427 |
| 2427 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2428 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
| 2428 | 2429 |
| 2429 } // namespace autofill | 2430 } // namespace autofill |
| OLD | NEW |