Index: chrome/browser/ui/autofill/autofill_dialog_types.cc |
diff --git a/chrome/browser/ui/autofill/autofill_dialog_types.cc b/chrome/browser/ui/autofill/autofill_dialog_types.cc |
index ffd0c121576c6d77dbc3252cc89a37946987fe61..6307b0522a4a6c27b95ea3671af25efac9b549ea 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_types.cc |
+++ b/chrome/browser/ui/autofill/autofill_dialog_types.cc |
@@ -25,13 +25,11 @@ DialogNotification::DialogNotification(Type type, const string16& display_text) |
SkColor DialogNotification::GetBackgroundColor() const { |
switch (type_) { |
- case DialogNotification::AUTOCHECKOUT_SUCCESS: |
case DialogNotification::EXPLANATORY_MESSAGE: |
case DialogNotification::WALLET_USAGE_CONFIRMATION: |
return SkColorSetRGB(0xf5, 0xf5, 0xf5); |
case DialogNotification::REQUIRED_ACTION: |
case DialogNotification::WALLET_ERROR: |
- case DialogNotification::AUTOCHECKOUT_ERROR: |
return SkColorSetRGB(0xfc, 0xf3, 0xbf); |
case DialogNotification::DEVELOPER_WARNING: |
case DialogNotification::SECURITY_WARNING: |
@@ -47,13 +45,11 @@ SkColor DialogNotification::GetBackgroundColor() const { |
SkColor DialogNotification::GetBorderColor() const { |
switch (type_) { |
- case DialogNotification::AUTOCHECKOUT_SUCCESS: |
case DialogNotification::EXPLANATORY_MESSAGE: |
case DialogNotification::WALLET_USAGE_CONFIRMATION: |
return SkColorSetRGB(0xe5, 0xe5, 0xe5); |
case DialogNotification::REQUIRED_ACTION: |
case DialogNotification::WALLET_ERROR: |
- case DialogNotification::AUTOCHECKOUT_ERROR: |
case DialogNotification::DEVELOPER_WARNING: |
case DialogNotification::SECURITY_WARNING: |
case DialogNotification::VALIDATION_ERROR: |
@@ -69,8 +65,6 @@ SkColor DialogNotification::GetTextColor() const { |
switch (type_) { |
case DialogNotification::REQUIRED_ACTION: |
case DialogNotification::WALLET_ERROR: |
- case DialogNotification::AUTOCHECKOUT_ERROR: |
- case DialogNotification::AUTOCHECKOUT_SUCCESS: |
case DialogNotification::EXPLANATORY_MESSAGE: |
case DialogNotification::WALLET_USAGE_CONFIRMATION: |
return SkColorSetRGB(102, 102, 102); |
@@ -96,137 +90,6 @@ bool DialogNotification::HasCheckbox() const { |
return type_ == DialogNotification::WALLET_USAGE_CONFIRMATION; |
} |
-DialogAutocheckoutStep::DialogAutocheckoutStep(AutocheckoutStepType type, |
- AutocheckoutStepStatus status) |
- : type_(type), |
- status_(status) {} |
- |
-SkColor DialogAutocheckoutStep::GetTextColor() const { |
- switch (status_) { |
- case AUTOCHECKOUT_STEP_UNSTARTED: |
- return SK_ColorGRAY; |
- |
- case AUTOCHECKOUT_STEP_STARTED: |
- case AUTOCHECKOUT_STEP_COMPLETED: |
- return SK_ColorBLACK; |
- |
- case AUTOCHECKOUT_STEP_FAILED: |
- return SK_ColorRED; |
- } |
- |
- NOTREACHED(); |
- return SK_ColorTRANSPARENT; |
-} |
- |
-gfx::Font DialogAutocheckoutStep::GetTextFont() const { |
- gfx::Font::FontStyle font_style = gfx::Font::NORMAL; |
- switch (status_) { |
- case AUTOCHECKOUT_STEP_UNSTARTED: |
- case AUTOCHECKOUT_STEP_STARTED: |
- font_style = gfx::Font::NORMAL; |
- break; |
- |
- case AUTOCHECKOUT_STEP_COMPLETED: |
- case AUTOCHECKOUT_STEP_FAILED: |
- font_style = gfx::Font::BOLD; |
- break; |
- } |
- |
- return ui::ResourceBundle::GetSharedInstance().GetFont( |
- ui::ResourceBundle::BaseFont).DeriveFont(0, font_style); |
-} |
- |
-bool DialogAutocheckoutStep::IsIconVisible() const { |
- return status_ == AUTOCHECKOUT_STEP_COMPLETED; |
-} |
- |
-string16 DialogAutocheckoutStep::GetDisplayText() const { |
- int description_id = -1; |
- switch (status_) { |
- case AUTOCHECKOUT_STEP_UNSTARTED: |
- switch (type_) { |
- case AUTOCHECKOUT_STEP_SHIPPING: |
- description_id = IDS_AUTOFILL_STEP_SHIPPING_DETAILS_UNSTARTED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_DELIVERY: |
- description_id = IDS_AUTOFILL_STEP_DELIVERY_DETAILS_UNSTARTED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_BILLING: |
- description_id = IDS_AUTOFILL_STEP_BILLING_DETAILS_UNSTARTED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_PROXY_CARD: |
- description_id = IDS_AUTOFILL_STEP_PROXY_CARD_UNSTARTED; |
- break; |
- } |
- break; |
- |
- case AUTOCHECKOUT_STEP_STARTED: |
- switch (type_) { |
- case AUTOCHECKOUT_STEP_SHIPPING: |
- description_id = IDS_AUTOFILL_STEP_SHIPPING_DETAILS_STARTED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_DELIVERY: |
- description_id = IDS_AUTOFILL_STEP_DELIVERY_DETAILS_STARTED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_BILLING: |
- description_id = IDS_AUTOFILL_STEP_BILLING_DETAILS_STARTED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_PROXY_CARD: |
- description_id = IDS_AUTOFILL_STEP_PROXY_CARD_STARTED; |
- break; |
- } |
- break; |
- |
- case AUTOCHECKOUT_STEP_COMPLETED: |
- switch (type_) { |
- case AUTOCHECKOUT_STEP_SHIPPING: |
- description_id = IDS_AUTOFILL_STEP_SHIPPING_DETAILS_COMPLETE; |
- break; |
- |
- case AUTOCHECKOUT_STEP_DELIVERY: |
- description_id = IDS_AUTOFILL_STEP_DELIVERY_DETAILS_COMPLETE; |
- break; |
- |
- case AUTOCHECKOUT_STEP_BILLING: |
- description_id = IDS_AUTOFILL_STEP_BILLING_DETAILS_COMPLETE; |
- break; |
- |
- case AUTOCHECKOUT_STEP_PROXY_CARD: |
- description_id = IDS_AUTOFILL_STEP_PROXY_CARD_COMPLETE; |
- break; |
- } |
- break; |
- |
- case AUTOCHECKOUT_STEP_FAILED: |
- switch (type_) { |
- case AUTOCHECKOUT_STEP_SHIPPING: |
- description_id = IDS_AUTOFILL_STEP_SHIPPING_DETAILS_FAILED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_DELIVERY: |
- description_id = IDS_AUTOFILL_STEP_DELIVERY_DETAILS_FAILED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_BILLING: |
- description_id = IDS_AUTOFILL_STEP_BILLING_DETAILS_FAILED; |
- break; |
- |
- case AUTOCHECKOUT_STEP_PROXY_CARD: |
- description_id = IDS_AUTOFILL_STEP_PROXY_CARD_FAILED; |
- break; |
- } |
- break; |
- } |
- |
- return l10n_util::GetStringUTF16(description_id); |
-} |
- |
SkColor const kWarningColor = SkColorSetRGB(0xde, 0x49, 0x32); |
SuggestionState::SuggestionState() |