Commit 573604e2 authored by siyua's avatar siyua Committed by Commit Bot

Update the local card migration bubble upon privacy request (F Option)

Changed the title, and added a body text.

Uploaded a screenshot in the bug. Note that the body text color is
incorrect (should be Google Grey 700) due to crbug.com/896891.

Bug: 880809, 897998
Change-Id: I5bf1cf07c6c86bb5a985811485edcb61d14d2610
Reviewed-on: https://chromium-review.googlesource.com/c/1294722Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Siyu An <siyua@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602451}
parent 947f2470
...@@ -76,12 +76,6 @@ LocalCardMigrationBubbleControllerImpl::local_card_migration_bubble_view() ...@@ -76,12 +76,6 @@ LocalCardMigrationBubbleControllerImpl::local_card_migration_bubble_view()
return local_card_migration_bubble_; return local_card_migration_bubble_;
} }
base::string16 LocalCardMigrationBubbleControllerImpl::GetBubbleMessage()
const {
return l10n_util::GetStringUTF16(
IDS_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_TITLE);
}
void LocalCardMigrationBubbleControllerImpl::OnConfirmButtonClicked() { void LocalCardMigrationBubbleControllerImpl::OnConfirmButtonClicked() {
DCHECK(local_card_migration_bubble_closure_); DCHECK(local_card_migration_bubble_closure_);
std::move(local_card_migration_bubble_closure_).Run(); std::move(local_card_migration_bubble_closure_).Run();
......
...@@ -42,7 +42,6 @@ class LocalCardMigrationBubbleControllerImpl ...@@ -42,7 +42,6 @@ class LocalCardMigrationBubbleControllerImpl
LocalCardMigrationBubble* local_card_migration_bubble_view() const; LocalCardMigrationBubble* local_card_migration_bubble_view() const;
// LocalCardBubbleController: // LocalCardBubbleController:
base::string16 GetBubbleMessage() const override;
void OnConfirmButtonClicked() override; void OnConfirmButtonClicked() override;
void OnCancelButtonClicked() override; void OnCancelButtonClicked() override;
void OnBubbleClosed() override; void OnBubbleClosed() override;
...@@ -87,4 +86,4 @@ class LocalCardMigrationBubbleControllerImpl ...@@ -87,4 +86,4 @@ class LocalCardMigrationBubbleControllerImpl
} // namespace autofill } // namespace autofill
#endif // CHROME_BROWSER_UI_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_CONTROLLER_IMPL_H_ #endif // CHROME_BROWSER_UI_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_CONTROLLER_IMPL_H_
\ No newline at end of file
...@@ -128,10 +128,22 @@ void LocalCardMigrationBubbleViews::WindowClosing() { ...@@ -128,10 +128,22 @@ void LocalCardMigrationBubbleViews::WindowClosing() {
LocalCardMigrationBubbleViews::~LocalCardMigrationBubbleViews() {} LocalCardMigrationBubbleViews::~LocalCardMigrationBubbleViews() {}
void LocalCardMigrationBubbleViews::Init() { void LocalCardMigrationBubbleViews::Init() {
SetLayoutManager( SetLayoutManager(std::make_unique<views::BoxLayout>(
std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical)); views::BoxLayout::kVertical, gfx::Insets(),
views::Label* explanatory_message = new views::Label( ChromeLayoutProvider::Get()->GetDistanceMetric(
controller_->GetBubbleMessage(), CONTEXT_BODY_TEXT_LARGE); DISTANCE_RELATED_CONTROL_VERTICAL_SMALL)));
auto* title = new views::Label(
l10n_util::GetStringUTF16(IDS_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_TITLE),
views::style::CONTEXT_DIALOG_TITLE);
title->SetHorizontalAlignment(gfx::ALIGN_LEFT);
title->SetMultiLine(true);
AddChildView(title);
auto* explanatory_message = new views::Label(
l10n_util::GetStringUTF16(
IDS_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_BODY_TEXT),
CONTEXT_BODY_TEXT_LARGE, ChromeTextStyle::STYLE_SECONDARY);
explanatory_message->SetHorizontalAlignment(gfx::ALIGN_LEFT); explanatory_message->SetHorizontalAlignment(gfx::ALIGN_LEFT);
explanatory_message->SetMultiLine(true); explanatory_message->SetMultiLine(true);
AddChildView(explanatory_message); AddChildView(explanatory_message);
......
...@@ -20,10 +20,6 @@ class LocalCardMigrationBubbleController { ...@@ -20,10 +20,6 @@ class LocalCardMigrationBubbleController {
LocalCardMigrationBubbleController() {} LocalCardMigrationBubbleController() {}
virtual ~LocalCardMigrationBubbleController() {} virtual ~LocalCardMigrationBubbleController() {}
// Returns the explanatory message that should be displayed in the bubble.
virtual base::string16 GetBubbleMessage() const = 0;
// Interaction.
virtual void OnConfirmButtonClicked() = 0; virtual void OnConfirmButtonClicked() = 0;
virtual void OnCancelButtonClicked() = 0; virtual void OnCancelButtonClicked() = 0;
virtual void OnBubbleClosed() = 0; virtual void OnBubbleClosed() = 0;
......
...@@ -250,11 +250,14 @@ ...@@ -250,11 +250,14 @@
Google Pay logo Google Pay logo
</message> </message>
<message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_TITLE" desc="The title text for a bubble that offers users to start the process of migrating local cards to cloud."> <message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_TITLE" desc="The title text for a bubble that offers users to start the process of migrating local cards to cloud.">
Save all your cards in one place? Save your cards to Google?
</message> </message>
<message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_BUTTON_LABEL" desc="The text in the OK button of a bubble that offers users to start the process of migration local cards to cloud."> <message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_BUTTON_LABEL" desc="The text in the OK button of a bubble that offers users to start the process of migration local cards to cloud.">
Continue Continue
</message> </message>
<message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_BUBBLE_BODY_TEXT" desc="The body text for a bubble that offers users to start the process of migrating local cards to cloud.">
In the next step, you can choose which cards to save to your Google Account.
</message>
<message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_DIALOG_TITLE_OFFER" desc="The title text for a dialog that offers to migrate local cards into the cloud."> <message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_DIALOG_TITLE_OFFER" desc="The title text for a dialog that offers to migrate local cards into the cloud.">
All your cards in one place All your cards in one place
</message> </message>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment