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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 12094069: [autofill] Hook the sign-in button up to required actions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: isherman@ Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autofill/autofill_dialog_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 319bea00e3af89d8f7586b8c7a630b8af3f7ae66..4a193daad987497a6c9550a51049b149c132b1db 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -305,6 +305,7 @@ AutofillDialogViews::~AutofillDialogViews() {
void AutofillDialogViews::Show() {
InitChildViews();
+ UpdateAccountChooser();
UpdateNotificationArea();
// Ownership of |contents_| is handed off by this call. The
@@ -601,12 +602,21 @@ views::View* AutofillDialogViews::CreateNotificationArea() {
notification_label_->SetAutoColorReadabilityEnabled(false);
notification_label_->SetMultiLine(true);
notification_label_->set_collapse_when_hidden(true);
+ notification_label_->set_border(
+ views::Border::CreateEmptyBorder(10, 0, 10, 0));
+ // TODO(dbeam): talk to msw@ or ainslie@ to make this border match the mocks.
notification_area->AddChildView(notification_label_);
return notification_area;
}
+void AutofillDialogViews::UpdateAccountChooser() {
+ DialogSignedInState state = controller_->SignedInState();
+ sign_in_link_->SetEnabled(state != REQUIRES_RESPONSE);
+ sign_in_link_->SetVisible(state != SIGNED_IN);
+}
+
void AutofillDialogViews::UpdateNotificationArea() {
DCHECK(notification_label_);
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698