[payments] Extract payment handler header view elements to utility [chromium/src : main]

0 views
Skip to first unread message

Xuehui Chen (Gerrit)

unread,
Jul 8, 2026, 10:19:09 AM (yesterday) Jul 8
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: Ie03fec2c16657eec8f990800b282cdfa3e511378
Gerrit-Change-Number: 8058965
Gerrit-PatchSet: 7
Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
Gerrit-Comment-Date: Wed, 08 Jul 2026 14:18:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
Jul 8, 2026, 11:32:55 AM (yesterday) Jul 8
to Xuehui Chen, Chromium Payments Reviews, Darwin Yang, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
Attention needed from Darwin Yang

Message from gwsq

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

Open in Gerrit

Related details

Attention is currently required from:
  • Darwin Yang
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: Ie03fec2c16657eec8f990800b282cdfa3e511378
Gerrit-Change-Number: 8058965
Gerrit-PatchSet: 9
Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
Gerrit-Reviewer: Darwin Yang <darwi...@chromium.org>
Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
Gerrit-CC: Chromium Payments Reviews <chrome-paym...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Darwin Yang <darwi...@chromium.org>
Gerrit-Comment-Date: Wed, 08 Jul 2026 15:32:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Darwin Yang (Gerrit)

unread,
Jul 8, 2026, 2:26:45 PM (23 hours ago) Jul 8
to Xuehui Chen, Chromium Payments Reviews, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
Attention needed from Xuehui Chen

Darwin Yang voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Xuehui Chen
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement 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: Ie03fec2c16657eec8f990800b282cdfa3e511378
Gerrit-Change-Number: 8058965
Gerrit-PatchSet: 9
Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
Gerrit-Reviewer: Darwin Yang <darwi...@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: Wed, 08 Jul 2026 18:26:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Slobodan Pejic (Gerrit)

unread,
11:23 AM (2 hours ago) 11:23 AM
to Xuehui Chen, Chromium Payments Reviews, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org
Attention needed from Xuehui Chen

Slobodan Pejic voted and added 1 comment

Votes added by Slobodan Pejic

Code-Review+1

1 comment

File chrome/browser/ui/views/payments/payment_handler_header_view_util.cc
Line 154, Patchset 9 (Latest):PaymentHandlerHeaderViews PopulatePaymentHandlerHeaderView(
Slobodan Pejic . unresolved

optional/follow-up: Have you explored making this function play nice with the views builder pattern used in [chrome/browser/ui/views/payments/payment_request_sheet_controller.h](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/payments/payment_request_sheet_controller.cc;l=285-318;drc=0bedfcc1f8e786bfd905e2d16909da4504df025f)?

E.g. Using the builder to `.CopyAddressTo(origin_label_)` instead of needing to return it and assign it.

Open in Gerrit

Related details

Attention is currently required from:
  • Xuehui Chen
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement 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: Ie03fec2c16657eec8f990800b282cdfa3e511378
    Gerrit-Change-Number: 8058965
    Gerrit-PatchSet: 9
    Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
    Gerrit-Reviewer: Darwin Yang <darwi...@chromium.org>
    Gerrit-Reviewer: Slobodan Pejic <slob...@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 15:23:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xuehui Chen (Gerrit)

    unread,
    11:35 AM (2 hours ago) 11:35 AM
    to Slobodan Pejic, Chromium Payments Reviews, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org

    Xuehui Chen added 1 comment

    File chrome/browser/ui/views/payments/payment_handler_header_view_util.cc
    Line 154, Patchset 9 (Latest):PaymentHandlerHeaderViews PopulatePaymentHandlerHeaderView(
    Slobodan Pejic . resolved

    optional/follow-up: Have you explored making this function play nice with the views builder pattern used in [chrome/browser/ui/views/payments/payment_request_sheet_controller.h](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/payments/payment_request_sheet_controller.cc;l=285-318;drc=0bedfcc1f8e786bfd905e2d16909da4504df025f)?

    E.g. Using the builder to `.CopyAddressTo(origin_label_)` instead of needing to return it and assign it.

    Xuehui Chen

    Yes, I have tested it with both new loading view and existing web flow view.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement 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: Ie03fec2c16657eec8f990800b282cdfa3e511378
      Gerrit-Change-Number: 8058965
      Gerrit-PatchSet: 9
      Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
      Gerrit-Reviewer: Darwin Yang <darwi...@chromium.org>
      Gerrit-Reviewer: Slobodan Pejic <slob...@chromium.org>
      Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
      Gerrit-CC: Chromium Payments Reviews <chrome-paym...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Comment-Date: Thu, 09 Jul 2026 15:35:16 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Slobodan Pejic <slob...@chromium.org>
      satisfied_requirement
      open
      diffy

      Xuehui Chen (Gerrit)

      unread,
      12:03 PM (2 hours ago) 12:03 PM
      to Slobodan Pejic, Chromium Payments Reviews, Chromium LUCI CQ, chromium...@chromium.org, sloboda...@chromium.org

      Xuehui Chen voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement 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: Ie03fec2c16657eec8f990800b282cdfa3e511378
      Gerrit-Change-Number: 8058965
      Gerrit-PatchSet: 9
      Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
      Gerrit-Reviewer: Darwin Yang <darwi...@chromium.org>
      Gerrit-Reviewer: Slobodan Pejic <slob...@chromium.org>
      Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
      Gerrit-CC: Chromium Payments Reviews <chrome-paym...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Comment-Date: Thu, 09 Jul 2026 16:03:14 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      12:42 PM (1 hour ago) 12:42 PM
      to Xuehui Chen, Slobodan Pejic, Darwin Yang, Chromium Payments Reviews, chromium...@chromium.org, sloboda...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [payments] Extract payment handler header view elements to utility

      Extract PaymentHandlerProgressBar, PaymentHandlerOriginLabel, and
      PaymentHandlerCloseButton class definitions, as well as the header
      population and styling functions, from
      payment_handler_web_flow_view_controller to
      payment_handler_header_view_util.

      This enables reuse of these visual elements across web flow view and
      loading view in the upcoming cl. The controller now delegates header
      creation to PopulatePaymentHandlerHeaderView and receives a struct
      containing weak pointers to the children(origin & close button). Header
      color calculation is now decoupled from WebContents(loading view doesn't
      have webcontent to provide theme color).
      Bug: b:522844222
      Test: Locally with Bobbucks
      Change-Id: Ie03fec2c16657eec8f990800b282cdfa3e511378
      Reviewed-by: Slobodan Pejic <slob...@chromium.org>
      Reviewed-by: Darwin Yang <darwi...@chromium.org>
      Commit-Queue: Xuehui Chen <xuehu...@google.com>
      Cr-Commit-Position: refs/heads/main@{#1659635}
      Files:
      • M chrome/browser/ui/views/payments/BUILD.gn
      • A chrome/browser/ui/views/payments/payment_handler_header_view_util.cc
      • A chrome/browser/ui/views/payments/payment_handler_header_view_util.h
      • M chrome/browser/ui/views/payments/payment_handler_web_flow_view_controller.cc
      Change size: L
      Delta: 4 files changed, 392 insertions(+), 245 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Slobodan Pejic, +1 by Darwin Yang
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ie03fec2c16657eec8f990800b282cdfa3e511378
      Gerrit-Change-Number: 8058965
      Gerrit-PatchSet: 10
      Gerrit-Owner: Xuehui Chen <xuehu...@google.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Darwin Yang <darwi...@chromium.org>
      Gerrit-Reviewer: Slobodan Pejic <slob...@chromium.org>
      Gerrit-Reviewer: Xuehui Chen <xuehu...@google.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages