[payments] Add payment app loading view [chromium/src : main]

0 views
Skip to first unread message

Xuehui Chen (Gerrit)

unread,
11:51 AM (7 hours ago) 11:51 AM
to chromium...@chromium.org, sloboda...@chromium.org

Xuehui Chen voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I5cb70bb5dde772e83d59745dc102c67ee5109445
Gerrit-Change-Number: 8070996
Gerrit-PatchSet: 3
Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
Gerrit-Comment-Date: Thu, 09 Jul 2026 15:51:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Xuehui Chen (Gerrit)

unread,
1:07 PM (6 hours ago) 1:07 PM
to Chromium Payments Reviews, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
Attention needed from Chromium Payments Reviews

Xuehui Chen voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Chromium Payments Reviews
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I5cb70bb5dde772e83d59745dc102c67ee5109445
Gerrit-Change-Number: 8070996
Gerrit-PatchSet: 3
Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
Gerrit-Reviewer: Chromium Payments Reviews <chrome-paym...@google.com>
Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
Gerrit-Attention: Chromium Payments Reviews <chrome-paym...@google.com>
Gerrit-Comment-Date: Thu, 09 Jul 2026 17:07:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
1:10 PM (5 hours ago) 1:10 PM
to Xuehui Chen, Chromium Payments Reviews, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
Attention needed from Stephen McGruer

Message from gwsq

Reviewer source(s):
smcg...@chromium.org is from context(googleclient/chrome/chromium_gwsq/chrome/browser/payments/reviews.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Stephen McGruer
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I5cb70bb5dde772e83d59745dc102c67ee5109445
Gerrit-Change-Number: 8070996
Gerrit-PatchSet: 3
Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
Gerrit-CC: Chromium Payments Reviews <chrome-paym...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
Gerrit-Comment-Date: Thu, 09 Jul 2026 17:10:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Stephen McGruer (Gerrit)

unread,
2:14 PM (4 hours ago) 2:14 PM
to Xuehui Chen, Chromium Payments Reviews, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
Attention needed from Xuehui Chen

Stephen McGruer added 10 comments

Commit Message
Line 18, Patchset 3:followup cl will implement that
Stephen McGruer . unresolved

Hyper-nit: missing '.' at end of sentence 😄

Line 20, Patchset 3:Bug: b:522844222
Stephen McGruer . unresolved

Nit; where possible we should link CLs to public crbugs, rather than internal bugs. Is there a wider tracking bug that you could also link this change against?

File chrome/browser/ui/views/payments/payment_app_loading_view.cc
Line 1, Patchset 3:// Copyright 2026 The Chromium Authors
Stephen McGruer . unresolved

Consider adding a render test, like chrome/browser/ui/views/autofill/payments/bnpl_tos_view_desktop_interactive_uitest.cc

Line 29, Patchset 3:constexpr int kLoadingMessageHorizontalInsets = 24;
Stephen McGruer . unresolved

Nit: these should be singular, not plural (no trailing 's')

Line 38, Patchset 3: : state_(state) {
Stephen McGruer . unresolved

Do we use the state anywhere outside of the constructor? If not, we don't need to store it, right?

Line 48, Patchset 3: const SkBitmap* icon_bitmap = state_->selected_app()->icon_bitmap();
Stephen McGruer . unresolved

Instead of passing in the State, would it be cleaner to just pass in the selected app? Or even the three data points you need (icon, id - but named as app_origin -, and top origin)?

Line 78, Patchset 3: SetHeaderColors(header_view, header_views.origin_label.get(), progress_bar,
Stephen McGruer . unresolved

Does this call work? PaymentAppLoadingView is not attached to anything yet, so will it work to try to set theme appropriate colours on the header?

Line 87, Patchset 3: if (is_visible && GetVisible()) {
Stephen McGruer . unresolved

Is the `GetVisible()` check here redundant? What purpose does it serve?

Line 101, Patchset 3: text_update_timer_.Stop();
Stephen McGruer . unresolved

When does this happen, if the payment app loading view is closed/removed before the timer fires? (Either by the user or when the HTML loads?)

Open in Gerrit

Related details

Attention is currently required from:
  • Xuehui Chen
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5cb70bb5dde772e83d59745dc102c67ee5109445
    Gerrit-Change-Number: 8070996
    Gerrit-PatchSet: 3
    Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
    Gerrit-CC: Chromium Payments Reviews <chrome-paym...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Xuehui Chen <xuehu...@google.com>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 18:14:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xuehui Chen (Gerrit)

    unread,
    2:46 PM (4 hours ago) 2:46 PM
    to Chromium Payments Reviews, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
    Attention needed from Stephen McGruer

    Xuehui Chen added 3 comments

    Commit Message
    Line 18, Patchset 3:followup cl will implement that
    Stephen McGruer . resolved

    Hyper-nit: missing '.' at end of sentence 😄

    Xuehui Chen

    Done

    File chrome/browser/ui/views/payments/payment_app_loading_view.cc
    Line 87, Patchset 3: if (is_visible && GetVisible()) {
    Stephen McGruer . unresolved

    Is the `GetVisible()` check here redundant? What purpose does it serve?

    Xuehui Chen

    Something I learned today, visibility change signal can come from either ancestor or the loading view itself [ui/views/view.cc](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.cc;l=3502-3506;drc=6b0e66c1b6dafa6967898773ff9ccbc3dc2d0445). This is just a safeguard, we don't start the timer for the situation that the loading view is hidden, but the parent view has a visibility change and broadcast to all the children view. Will add a comment to the code explaining this.

    Line 101, Patchset 3: text_update_timer_.Stop();
    Stephen McGruer . resolved

    When does this happen, if the payment app loading view is closed/removed before the timer fires? (Either by the user or when the HTML loads?)

    Xuehui Chen

    User close dialog will go through a tear down flow, the timer will be destructed with the view destruction.
    Webcontent finish loading within 500ms will stop this timer. I expect this happens 99% of the time.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Stephen McGruer
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5cb70bb5dde772e83d59745dc102c67ee5109445
    Gerrit-Change-Number: 8070996
    Gerrit-PatchSet: 4
    Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
    Gerrit-CC: Chromium Payments Reviews <chrome-paym...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 18:46:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Stephen McGruer <smcg...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xuehui Chen (Gerrit)

    unread,
    2:50 PM (4 hours ago) 2:50 PM
    to Chromium Payments Reviews, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
    Attention needed from Stephen McGruer

    Xuehui Chen added 1 comment

    File chrome/browser/ui/views/payments/payment_app_loading_view.cc
    Line 78, Patchset 3: SetHeaderColors(header_view, header_views.origin_label.get(), progress_bar,
    Stephen McGruer . unresolved

    Does this call work? PaymentAppLoadingView is not attached to anything yet, so will it work to try to set theme appropriate colours on the header?

    Xuehui Chen

    It's not setting theme color, it uses a default color for the background. But good call on this, I didn't explore what exact color is being used here. The screenshot in the Test tag looks ok, but I will check it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Stephen McGruer
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5cb70bb5dde772e83d59745dc102c67ee5109445
    Gerrit-Change-Number: 8070996
    Gerrit-PatchSet: 5
    Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
    Gerrit-CC: Chromium Payments Reviews <chrome-paym...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 18:50:36 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xuehui Chen (Gerrit)

    unread,
    5:06 PM (2 hours ago) 5:06 PM
    to Chromium Payments Reviews, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
    Attention needed from Stephen McGruer

    Xuehui Chen added 7 comments

    Commit Message
    Line 20, Patchset 3:Bug: b:522844222
    Stephen McGruer . resolved

    Nit; where possible we should link CLs to public crbugs, rather than internal bugs. Is there a wider tracking bug that you could also link this change against?

    Xuehui Chen

    Done

    File chrome/browser/ui/views/payments/payment_app_loading_view.cc
    Line 1, Patchset 3:// Copyright 2026 The Chromium Authors
    Stephen McGruer . unresolved

    Consider adding a render test, like chrome/browser/ui/views/autofill/payments/bnpl_tos_view_desktop_interactive_uitest.cc

    Xuehui Chen

    I added a basic view unit test for test coverage, will add additional browser/interactive tests after this is attached to the payment request dialog, wdyt?

    Line 29, Patchset 3:constexpr int kLoadingMessageHorizontalInsets = 24;
    Stephen McGruer . resolved

    Nit: these should be singular, not plural (no trailing 's')

    Xuehui Chen

    Done

    Line 38, Patchset 3: : state_(state) {
    Stephen McGruer . resolved

    Do we use the state anywhere outside of the constructor? If not, we don't need to store it, right?

    Xuehui Chen

    Removed in favor of passing icon and origins directly to the header constructor.

    Line 45, Patchset 3: DCHECK(state_);
    Stephen McGruer . resolved
    Xuehui Chen

    removed.

    Line 48, Patchset 3: const SkBitmap* icon_bitmap = state_->selected_app()->icon_bitmap();
    Stephen McGruer . resolved

    Instead of passing in the State, would it be cleaner to just pass in the selected app? Or even the three data points you need (icon, id - but named as app_origin -, and top origin)?

    Xuehui Chen

    Good call, updated.

    Line 78, Patchset 3: SetHeaderColors(header_view, header_views.origin_label.get(), progress_bar,
    Stephen McGruer . unresolved

    Does this call work? PaymentAppLoadingView is not attached to anything yet, so will it work to try to set theme appropriate colours on the header?

    Xuehui Chen

    It's not setting theme color, it uses a default color for the background. But good call on this, I didn't explore what exact color is being used here. The screenshot in the Test tag looks ok, but I will check it.

    Xuehui Chen

    the header view will take kColorDialogBackground by default, see [chrome/browser/ui/views/payments/payment_handler_header_view_util.cc](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/payments/payment_handler_header_view_util.cc;l=244-275) as no theme is provided, other header elements will take headers color as background color input.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Stephen McGruer
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5cb70bb5dde772e83d59745dc102c67ee5109445
    Gerrit-Change-Number: 8070996
    Gerrit-PatchSet: 7
    Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
    Gerrit-CC: Chromium Payments Reviews <chrome-paym...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 21:06:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Stephen McGruer <smcg...@chromium.org>
    Comment-In-Reply-To: Xuehui Chen <xuehu...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages