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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 19531006: requestAutocomplete: fix some text colors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +PreferredSizeChanged override Created 7 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/autofill/autofill_dialog_controller_impl.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 801
802 // First-run, post-submit, Wallet expository page. 802 // First-run, post-submit, Wallet expository page.
803 if (full_wallet_ && full_wallet_->required_actions().empty()) { 803 if (full_wallet_ && full_wallet_->required_actions().empty()) {
804 string16 cc_number = full_wallet_->GetInfo(CREDIT_CARD_NUMBER); 804 string16 cc_number = full_wallet_->GetInfo(CREDIT_CARD_NUMBER);
805 DCHECK_EQ(16U, cc_number.size()); 805 DCHECK_EQ(16U, cc_number.size());
806 state.image = GetGeneratedCardImage( 806 state.image = GetGeneratedCardImage(
807 ASCIIToUTF16("xxxx xxxx xxxx ") + 807 ASCIIToUTF16("xxxx xxxx xxxx ") +
808 cc_number.substr(cc_number.size() - 4)); 808 cc_number.substr(cc_number.size() - 4));
809 string.text = l10n_util::GetStringUTF16( 809 string.text = l10n_util::GetStringUTF16(
810 IDS_AUTOFILL_DIALOG_CARD_GENERATION_DONE); 810 IDS_AUTOFILL_DIALOG_CARD_GENERATION_DONE);
811 // TODO(estade): figure out correct color. 811 string.text_color = SK_ColorBLACK;
812 string.text_color = SK_ColorGRAY;
813 812
814 state.strings.push_back(DialogOverlayString()); 813 state.strings.push_back(DialogOverlayString());
815 DialogOverlayString& subtext = state.strings.back(); 814 DialogOverlayString& subtext = state.strings.back();
816 subtext.font = rb.GetFont(ui::ResourceBundle::BaseFont); 815 subtext.font = rb.GetFont(ui::ResourceBundle::BaseFont);
817 // TODO(estade): figure out correct color. 816 subtext.text_color = SkColorSetRGB(102, 102, 102);
818 subtext.text_color = SK_ColorGRAY;
819 subtext.text = l10n_util::GetStringUTF16( 817 subtext.text = l10n_util::GetStringUTF16(
820 IDS_AUTOFILL_DIALOG_CARD_GENERATION_EXPLANATION); 818 IDS_AUTOFILL_DIALOG_CARD_GENERATION_EXPLANATION);
821 819
822 state.button_text = l10n_util::GetStringUTF16( 820 state.button_text = l10n_util::GetStringUTF16(
823 IDS_AUTOFILL_DIALOG_CARD_GENERATION_OK_BUTTON); 821 IDS_AUTOFILL_DIALOG_CARD_GENERATION_OK_BUTTON);
824 } else { 822 } else {
825 // TODO(estade): fix this (animation?). 823 // TODO(estade): fix this (animation?).
826 state.image = 824 state.image =
827 GetGeneratedCardImage(ASCIIToUTF16("xxxx xxxx xx...")); 825 GetGeneratedCardImage(ASCIIToUTF16("xxxx xxxx xx..."));
828 826
829 // "Submitting" waiting page. 827 // "Submitting" waiting page.
830 string.text = l10n_util::GetStringUTF16( 828 string.text = l10n_util::GetStringUTF16(
831 IDS_AUTOFILL_DIALOG_CARD_GENERATION_IN_PROGRESS); 829 IDS_AUTOFILL_DIALOG_CARD_GENERATION_IN_PROGRESS);
832 // TODO(estade): figure out correct color. 830 string.text_color = SK_ColorBLACK;
833 string.text_color = SK_ColorGRAY;
834 string.alignment = gfx::ALIGN_CENTER; 831 string.alignment = gfx::ALIGN_CENTER;
835 } 832 }
836 833
837 return state; 834 return state;
838 } 835 }
839 836
840 const std::vector<ui::Range>& AutofillDialogControllerImpl:: 837 const std::vector<ui::Range>& AutofillDialogControllerImpl::
841 LegalDocumentLinks() { 838 LegalDocumentLinks() {
842 EnsureLegalDocumentsText(); 839 EnsureLegalDocumentsText();
843 return legal_document_link_ranges_; 840 return legal_document_link_ranges_;
(...skipping 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after
3456 view_->GetUserInput(SECTION_CC_BILLING, &output); 3453 view_->GetUserInput(SECTION_CC_BILLING, &output);
3457 CreditCard card; 3454 CreditCard card;
3458 GetBillingInfoFromOutputs(output, &card, NULL, NULL); 3455 GetBillingInfoFromOutputs(output, &card, NULL, NULL);
3459 backing_last_four = card.TypeAndLastFourDigits(); 3456 backing_last_four = card.TypeAndLastFourDigits();
3460 } 3457 }
3461 AutofillCreditCardBubbleController::ShowGeneratedCardBubble( 3458 AutofillCreditCardBubbleController::ShowGeneratedCardBubble(
3462 web_contents(), backing_last_four, full_wallet_->TypeAndLastFourDigits()); 3459 web_contents(), backing_last_four, full_wallet_->TypeAndLastFourDigits());
3463 } 3460 }
3464 3461
3465 } // namespace autofill 3462 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698