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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 } | 500 } |
501 | 501 |
502 AutofillDialogViews::AccountChooser::~AccountChooser() {} | 502 AutofillDialogViews::AccountChooser::~AccountChooser() {} |
503 | 503 |
504 void AutofillDialogViews::AccountChooser::Update() { | 504 void AutofillDialogViews::AccountChooser::Update() { |
505 SetVisible(delegate_->ShouldShowAccountChooser()); | 505 SetVisible(delegate_->ShouldShowAccountChooser()); |
506 | 506 |
507 gfx::Image icon = delegate_->AccountChooserImage(); | 507 gfx::Image icon = delegate_->AccountChooserImage(); |
508 image_->SetImage(icon.AsImageSkia()); | 508 image_->SetImage(icon.AsImageSkia()); |
509 menu_button_->SetText(delegate_->AccountChooserText()); | 509 menu_button_->SetText(delegate_->AccountChooserText()); |
510 // This allows the button to shrink if the new text is smaller. | 510 menu_button_->set_min_size(gfx::Size()); |
511 menu_button_->ClearMaxTextSize(); | |
512 | 511 |
513 bool show_link = !delegate_->MenuModelForAccountChooser(); | 512 bool show_link = !delegate_->MenuModelForAccountChooser(); |
514 menu_button_->SetVisible(!show_link); | 513 menu_button_->SetVisible(!show_link); |
515 link_->SetText(delegate_->SignInLinkText()); | 514 link_->SetText(delegate_->SignInLinkText()); |
516 link_->SetVisible(show_link); | 515 link_->SetVisible(show_link); |
517 | 516 |
518 menu_runner_.reset(); | 517 menu_runner_.reset(); |
519 | 518 |
520 PreferredSizeChanged(); | 519 PreferredSizeChanged(); |
521 } | 520 } |
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2502 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2501 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2503 : section(section), | 2502 : section(section), |
2504 container(NULL), | 2503 container(NULL), |
2505 manual_input(NULL), | 2504 manual_input(NULL), |
2506 suggested_info(NULL), | 2505 suggested_info(NULL), |
2507 suggested_button(NULL) {} | 2506 suggested_button(NULL) {} |
2508 | 2507 |
2509 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2508 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2510 | 2509 |
2511 } // namespace autofill | 2510 } // namespace autofill |
OLD | NEW |