Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 298813002: views: Move MenuButton from TextButton to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove stray LOG Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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.
msw 2014/06/09 17:18:39 You can "Call set_min_size(gfx::Size()) to clear t
Elliot Glaysher 2014/06/11 00:27:28 Used set_min_size() at all places where we used to
511 menu_button_->ClearMaxTextSize();
512 510
513 bool show_link = !delegate_->MenuModelForAccountChooser(); 511 bool show_link = !delegate_->MenuModelForAccountChooser();
514 menu_button_->SetVisible(!show_link); 512 menu_button_->SetVisible(!show_link);
515 link_->SetText(delegate_->SignInLinkText()); 513 link_->SetText(delegate_->SignInLinkText());
516 link_->SetVisible(show_link); 514 link_->SetVisible(show_link);
517 515
518 menu_runner_.reset(); 516 menu_runner_.reset();
519 517
520 PreferredSizeChanged(); 518 PreferredSizeChanged();
521 } 519 }
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
2502 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2500 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2503 : section(section), 2501 : section(section),
2504 container(NULL), 2502 container(NULL),
2505 manual_input(NULL), 2503 manual_input(NULL),
2506 suggested_info(NULL), 2504 suggested_info(NULL),
2507 suggested_button(NULL) {} 2505 suggested_button(NULL) {}
2508 2506
2509 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2507 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2510 2508
2511 } // namespace autofill 2509 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698