Commit 893f002d authored by Sahel Sharify's avatar Sahel Sharify Committed by Commit Bot

Reland "[Web Payments][Desktop]PH window size matches pop up size."

This is a reland of c7dc1979 after
adjusting expected PH window height.

original cl:
https://chromium-review.googlesource.com/c/chromium/src/+/2165673

revert cl:
https://chromium-review.googlesource.com/c/chromium/src/+/2169450

Original change's description:
> [Web Payments][Desktop]PH window size matches pop up size.
>
> This cl changes the payment handler window size on desktop to better
> align with a common pop up size for payment apps (600x600).
> This change gives payment apps enough space to show additional contents
> (e.g. shipping address) inside the viewport.
>
> The pop up window size is chosen since 1- users are already used to
> this window size and 2- payment apps already using pop up windows won't
> have difficulty adjusting their UI. To avoid clipped PH windows on
> devices with small screens the height is capped at the browser
> window's content height.
>
> Change-Id: I26b0debcd9b1eef1fc6f5b807ed8f209890b8423
> Bug: 1064452
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165673
> Commit-Queue: Sahel Sharify <sahel@chromium.org>
> Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
> Reviewed-by: Liquan (Max) Gu <maxlg@chromium.org>
> Reviewed-by: Danyao Wang <danyao@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#763088}

Bug: 1064452
Change-Id: I18c43df22bded0f22167854f959cc5a60df4330e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2170135
Commit-Queue: Sahel Sharify <sahel@chromium.org>
Reviewed-by: default avatarDanyao Wang <danyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763429}
parent ef94b43e
...@@ -215,7 +215,8 @@ void PaymentHandlerWebFlowViewController::FillContentView( ...@@ -215,7 +215,8 @@ void PaymentHandlerWebFlowViewController::FillContentView(
// time of first layout (nothing has loaded yet). Because of this, set it to. // time of first layout (nothing has loaded yet). Because of this, set it to.
// total_dialog_height - header_height. On the other hand, the width will be // total_dialog_height - header_height. On the other hand, the width will be
// properly set so it can be 0 here. // properly set so it can be 0 here.
web_view->SetPreferredSize(gfx::Size(0, kDialogHeight - 75)); web_view->SetPreferredSize(
gfx::Size(0, dialog()->GetActualPaymentHandlerDialogHeight() - 75));
content_view->AddChildView(web_view.release()); content_view->AddChildView(web_view.release());
} }
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
#include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
#include "chrome/browser/ui/views/payments/payment_request_views_util.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/payments/core/features.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace payments {
class PaymentHandlerWindowSizeTest : public PaymentRequestBrowserTestBase,
public testing::WithParamInterface<bool> {
public:
PaymentHandlerWindowSizeTest(const PaymentHandlerWindowSizeTest&) = delete;
PaymentHandlerWindowSizeTest& operator=(const PaymentHandlerWindowSizeTest&) =
delete;
protected:
PaymentHandlerWindowSizeTest()
: payment_handler_pop_up_size_window_enabled_(GetParam()),
expected_payment_request_dialog_size_(
gfx::Size(kDialogMinWidth, kDialogHeight)) {
if (payment_handler_pop_up_size_window_enabled_) {
scoped_feature_list_.InitAndEnableFeature(
features::kPaymentHandlerPopUpSizeWindow);
} else {
scoped_feature_list_.InitAndDisableFeature(
features::kPaymentHandlerPopUpSizeWindow);
}
}
~PaymentHandlerWindowSizeTest() override = default;
void SetUpOnMainThread() override {
PaymentRequestBrowserTestBase::SetUpOnMainThread();
NavigateTo("/payment_handler.html");
}
gfx::Size DialogViewSize() { return dialog_view()->CalculatePreferredSize(); }
const bool payment_handler_pop_up_size_window_enabled_;
const gfx::Size expected_payment_request_dialog_size_;
private:
base::test::ScopedFeatureList scoped_feature_list_;
};
IN_PROC_BROWSER_TEST_P(PaymentHandlerWindowSizeTest, ValidateDialogSize) {
// Add autofill profile and credit card so that payment sheet is shown.
autofill::AutofillProfile profile(autofill::test::GetFullProfile());
AddAutofillProfile(profile);
autofill::CreditCard card(autofill::test::GetCreditCard()); // Visa card.
card.set_billing_address_id(profile.guid());
AddCreditCard(card);
// Install a payment handler which opens a window.
EXPECT_EQ("success", content::EvalJs(GetActiveWebContents(), "install()"));
// Invoke a payment request with basic-card and methodName =
// window.location.origin + '/pay' supportedMethods (see payment_handler.js).
// Then check the dialog size when payment sheet is shown.
ResetEventWaiterForDialogOpened();
EXPECT_EQ(
"success",
content::EvalJs(GetActiveWebContents(),
"paymentRequestWithOptions({requestShipping: true})"));
WaitForObservedEvent();
EXPECT_EQ(expected_payment_request_dialog_size_, DialogViewSize());
gfx::Size expected_payment_handler_dialog_size;
if (payment_handler_pop_up_size_window_enabled_) {
// Adjust the expected PH window height based on the browser content height.
int browser_window_content_height =
browser()->window()->GetContentsSize().height();
expected_payment_handler_dialog_size = gfx::Size(
kPreferredPaymentHandlerDialogWidth,
std::max(kDialogHeight, std::min(kPreferredPaymentHandlerDialogHeight,
browser_window_content_height)));
} else {
expected_payment_handler_dialog_size =
gfx::Size(kDialogMinWidth, kDialogHeight);
}
// Click on Pay and check dialog size when payment handler view is shown.
EXPECT_TRUE(IsPayButtonEnabled());
ResetEventWaiterForSequence({DialogEvent::PROCESSING_SPINNER_SHOWN,
DialogEvent::PROCESSING_SPINNER_HIDDEN,
DialogEvent::PAYMENT_HANDLER_WINDOW_OPENED});
ClickOnDialogViewAndWait(DialogViewID::PAY_BUTTON, dialog_view());
EXPECT_EQ(expected_payment_handler_dialog_size, DialogViewSize());
// Check that dialog size resets after back navigation from payment handler
// window.
ClickOnBackArrow();
EXPECT_EQ(expected_payment_request_dialog_size_, DialogViewSize());
}
INSTANTIATE_TEST_SUITE_P(All, PaymentHandlerWindowSizeTest, testing::Bool());
} // namespace payments
...@@ -258,6 +258,12 @@ void PaymentRequestBrowserTestBase::OnProcessingSpinnerHidden() { ...@@ -258,6 +258,12 @@ void PaymentRequestBrowserTestBase::OnProcessingSpinnerHidden() {
event_waiter_->OnEvent(DialogEvent::PROCESSING_SPINNER_HIDDEN); event_waiter_->OnEvent(DialogEvent::PROCESSING_SPINNER_HIDDEN);
} }
void PaymentRequestBrowserTestBase::OnPaymentHandlerWindowOpened() {
if (event_waiter_) {
event_waiter_->OnEvent(DialogEvent::PAYMENT_HANDLER_WINDOW_OPENED);
}
}
void PaymentRequestBrowserTestBase::InvokePaymentRequestUI() { void PaymentRequestBrowserTestBase::InvokePaymentRequestUI() {
ResetEventWaiterForDialogOpened(); ResetEventWaiterForDialogOpened();
...@@ -918,6 +924,9 @@ std::ostream& operator<<( ...@@ -918,6 +924,9 @@ std::ostream& operator<<(
case DialogEvent::PROCESSING_SPINNER_HIDDEN: case DialogEvent::PROCESSING_SPINNER_HIDDEN:
out << "PROCESSING_SPINNER_HIDDEN"; out << "PROCESSING_SPINNER_HIDDEN";
break; break;
case DialogEvent::PAYMENT_HANDLER_WINDOW_OPENED:
out << "PAYMENT HANDLER WINDOW OPENED";
break;
} }
return out; return out;
} }
...@@ -92,6 +92,7 @@ class PaymentRequestBrowserTestBase ...@@ -92,6 +92,7 @@ class PaymentRequestBrowserTestBase
ABORT_CALLED, ABORT_CALLED,
PROCESSING_SPINNER_SHOWN, PROCESSING_SPINNER_SHOWN,
PROCESSING_SPINNER_HIDDEN, PROCESSING_SPINNER_HIDDEN,
PAYMENT_HANDLER_WINDOW_OPENED,
}; };
protected: protected:
...@@ -137,6 +138,7 @@ class PaymentRequestBrowserTestBase ...@@ -137,6 +138,7 @@ class PaymentRequestBrowserTestBase
void OnCvcPromptShown() override; void OnCvcPromptShown() override;
void OnProcessingSpinnerShown() override; void OnProcessingSpinnerShown() override;
void OnProcessingSpinnerHidden() override; void OnProcessingSpinnerHidden() override;
void OnPaymentHandlerWindowOpened() override;
// Will call JavaScript to invoke the PaymentRequest dialog and verify that // Will call JavaScript to invoke the PaymentRequest dialog and verify that
// it's open and ready for input. // it's open and ready for input.
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include "base/logging.h" #include "base/logging.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/payments/contact_info_editor_view_controller.h" #include "chrome/browser/ui/views/payments/contact_info_editor_view_controller.h"
#include "chrome/browser/ui/views/payments/credit_card_editor_view_controller.h" #include "chrome/browser/ui/views/payments/credit_card_editor_view_controller.h"
#include "chrome/browser/ui/views/payments/cvc_unmask_view_controller.h" #include "chrome/browser/ui/views/payments/cvc_unmask_view_controller.h"
...@@ -30,6 +32,7 @@ ...@@ -30,6 +32,7 @@
#include "components/payments/core/features.h" #include "components/payments/core/features.h"
#include "components/payments/core/payments_experimental_features.h" #include "components/payments/core/payments_experimental_features.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h" #include "content/public/common/content_features.h"
...@@ -38,6 +41,7 @@ ...@@ -38,6 +41,7 @@
#include "ui/views/controls/label.h" #include "ui/views/controls/label.h"
#include "ui/views/layout/fill_layout.h" #include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/grid_layout.h" #include "ui/views/layout/grid_layout.h"
#include "ui/views/layout/layout_provider.h"
namespace payments { namespace payments {
...@@ -179,15 +183,35 @@ bool PaymentRequestDialogView::IsInteractive() const { ...@@ -179,15 +183,35 @@ bool PaymentRequestDialogView::IsInteractive() const {
void PaymentRequestDialogView::ShowPaymentHandlerScreen( void PaymentRequestDialogView::ShowPaymentHandlerScreen(
const GURL& url, const GURL& url,
PaymentHandlerOpenWindowCallback callback) { PaymentHandlerOpenWindowCallback callback) {
if (PaymentsExperimentalFeatures::IsEnabled(
features::kPaymentHandlerPopUpSizeWindow)) {
is_showing_large_payment_handler_window_ = true;
// Calculate |payment_handler_window_height_|
auto* browser =
chrome::FindBrowserWithWebContents(request_->web_contents());
int browser_window_content_height =
browser->window()->GetContentsSize().height();
payment_handler_window_height_ =
std::max(kDialogHeight, std::min(kPreferredPaymentHandlerDialogHeight,
browser_window_content_height));
ResizeDialogWindow();
}
view_stack_->Push( view_stack_->Push(
CreateViewAndInstallController( CreateViewAndInstallController(
std::make_unique<PaymentHandlerWebFlowViewController>( std::make_unique<PaymentHandlerWebFlowViewController>(
request_->spec(), request_->state(), this, request_->spec(), request_->state(), this,
request_->web_contents(), GetProfile(), url, std::move(callback)), request_->web_contents(), GetProfile(), url, std::move(callback)),
&controller_map_), &controller_map_),
/* animate = */ !request_->skipped_payment_request_ui()); // Do not animate the view when the dialog size changes or payment sheet
// is skipped.
/* animate = */ !is_showing_large_payment_handler_window_ &&
!request_->skipped_payment_request_ui());
request_->OnPaymentHandlerOpenWindowCalled(); request_->OnPaymentHandlerOpenWindowCalled();
HideProcessingSpinner(); HideProcessingSpinner();
if (observer_for_testing_)
observer_for_testing_->OnPaymentHandlerWindowOpened();
} }
void PaymentRequestDialogView::RetryDialog() { void PaymentRequestDialogView::RetryDialog() {
...@@ -263,8 +287,14 @@ void PaymentRequestDialogView::GoBack() { ...@@ -263,8 +287,14 @@ void PaymentRequestDialogView::GoBack() {
return; return;
} }
view_stack_->Pop(); // Do not animate views when the dialog size changes.
view_stack_->Pop(!is_showing_large_payment_handler_window_ /* = animate */);
// Back navigation from payment handler window should resize the dialog;
if (is_showing_large_payment_handler_window_) {
is_showing_large_payment_handler_window_ = false;
ResizeDialogWindow();
}
if (observer_for_testing_) if (observer_for_testing_)
observer_for_testing_->OnBackNavigation(); observer_for_testing_->OnBackNavigation();
} }
...@@ -272,9 +302,17 @@ void PaymentRequestDialogView::GoBack() { ...@@ -272,9 +302,17 @@ void PaymentRequestDialogView::GoBack() {
void PaymentRequestDialogView::GoBackToPaymentSheet(bool animate) { void PaymentRequestDialogView::GoBackToPaymentSheet(bool animate) {
// This assumes that the Payment Sheet is the first view in the stack. Thus if // This assumes that the Payment Sheet is the first view in the stack. Thus if
// there is only one view, we are already showing the payment sheet. // there is only one view, we are already showing the payment sheet.
if (view_stack_->size() > 1) if (view_stack_->size() > 1) {
view_stack_->PopMany(view_stack_->size() - 1, animate); // Do not animate views when the dialog size changes.
view_stack_->PopMany(view_stack_->size() - 1,
animate && !is_showing_large_payment_handler_window_);
// Back navigation from payment handler window should resize the dialog;
if (is_showing_large_payment_handler_window_) {
ResizeDialogWindow();
is_showing_large_payment_handler_window_ = false;
}
}
if (observer_for_testing_) if (observer_for_testing_)
observer_for_testing_->OnBackToPaymentSheetNavigation(); observer_for_testing_->OnBackToPaymentSheetNavigation();
} }
...@@ -486,9 +524,32 @@ void PaymentRequestDialogView::SetupSpinnerOverlay() { ...@@ -486,9 +524,32 @@ void PaymentRequestDialogView::SetupSpinnerOverlay() {
} }
gfx::Size PaymentRequestDialogView::CalculatePreferredSize() const { gfx::Size PaymentRequestDialogView::CalculatePreferredSize() const {
if (is_showing_large_payment_handler_window_) {
return gfx::Size(GetActualDialogWidth(),
GetActualPaymentHandlerDialogHeight());
}
return gfx::Size(GetActualDialogWidth(), kDialogHeight); return gfx::Size(GetActualDialogWidth(), kDialogHeight);
} }
int PaymentRequestDialogView::GetActualPaymentHandlerDialogHeight() const {
if (!PaymentsExperimentalFeatures::IsEnabled(
features::kPaymentHandlerPopUpSizeWindow)) {
return kDialogHeight;
}
DCHECK_NE(0, payment_handler_window_height_);
return payment_handler_window_height_ > 0 ? payment_handler_window_height_
: kDialogHeight;
}
int PaymentRequestDialogView::GetActualDialogWidth() const {
int actual_width = views::LayoutProvider::Get()->GetSnappedDialogWidth(
is_showing_large_payment_handler_window_
? kPreferredPaymentHandlerDialogWidth
: kDialogMinWidth);
return actual_width;
}
void PaymentRequestDialogView::ViewHierarchyChanged( void PaymentRequestDialogView::ViewHierarchyChanged(
const views::ViewHierarchyChangedDetails& details) { const views::ViewHierarchyChangedDetails& details) {
if (being_closed_) if (being_closed_)
...@@ -503,4 +564,14 @@ void PaymentRequestDialogView::ViewHierarchyChanged( ...@@ -503,4 +564,14 @@ void PaymentRequestDialogView::ViewHierarchyChanged(
} }
} }
void PaymentRequestDialogView::ResizeDialogWindow() {
if (GetWidget() && request_->web_contents()) {
constrained_window::UpdateWebContentsModalDialogPosition(
GetWidget(), web_modal::WebContentsModalDialogManager::FromWebContents(
request_->web_contents())
->delegate()
->GetWebContentsModalDialogHost());
}
}
} // namespace payments } // namespace payments
...@@ -84,6 +84,8 @@ class PaymentRequestDialogView : public views::DialogDelegateView, ...@@ -84,6 +84,8 @@ class PaymentRequestDialogView : public views::DialogDelegateView,
virtual void OnProcessingSpinnerShown() = 0; virtual void OnProcessingSpinnerShown() = 0;
virtual void OnProcessingSpinnerHidden() = 0; virtual void OnProcessingSpinnerHidden() = 0;
virtual void OnPaymentHandlerWindowOpened() = 0;
}; };
// Build a Dialog around the PaymentRequest object. |observer| is used to // Build a Dialog around the PaymentRequest object. |observer| is used to
...@@ -177,14 +179,26 @@ class PaymentRequestDialogView : public views::DialogDelegateView, ...@@ -177,14 +179,26 @@ class PaymentRequestDialogView : public views::DialogDelegateView,
Profile* GetProfile(); Profile* GetProfile();
// Calculates the actual payment handler dialog height based on the preferred
// height and current browser window size.
int GetActualPaymentHandlerDialogHeight() const;
// Calculates the dialog width depending on whether or not the large payment
// handler window is currently showing.
int GetActualDialogWidth() const;
ViewStack* view_stack_for_testing() { return view_stack_.get(); } ViewStack* view_stack_for_testing() { return view_stack_.get(); }
views::View* throbber_overlay_for_testing() { return throbber_overlay_; } views::View* throbber_overlay_for_testing() { return throbber_overlay_; }
private: private:
// The browsertest validates the calculated dialog size.
friend class PaymentHandlerWindowSizeTest;
void OnDialogOpened(); void OnDialogOpened();
void ShowInitialPaymentSheet(); void ShowInitialPaymentSheet();
void SetupSpinnerOverlay(); void SetupSpinnerOverlay();
void OnDialogClosed(); void OnDialogClosed();
void ResizeDialogWindow();
// views::View // views::View
gfx::Size CalculatePreferredSize() const override; gfx::Size CalculatePreferredSize() const override;
...@@ -214,6 +228,14 @@ class PaymentRequestDialogView : public views::DialogDelegateView, ...@@ -214,6 +228,14 @@ class PaymentRequestDialogView : public views::DialogDelegateView,
// The number of initialization tasks that are not yet initialized. // The number of initialization tasks that are not yet initialized.
size_t number_of_initialization_tasks_ = 0; size_t number_of_initialization_tasks_ = 0;
// True when payment handler screen is shown and the
// kPaymentHandlerPopUpSizeWindow runtime flag is set.
bool is_showing_large_payment_handler_window_ = false;
// Calculated based on the browser content size at the time of opening payment
// handler window.
int payment_handler_window_height_ = 0;
DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView);
}; };
......
...@@ -258,7 +258,7 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() { ...@@ -258,7 +258,7 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() {
pane_columns->AddColumn( pane_columns->AddColumn(
views::GridLayout::Alignment::FILL, views::GridLayout::Alignment::LEADING, views::GridLayout::Alignment::FILL, views::GridLayout::Alignment::LEADING,
views::GridLayout::kFixedSize, views::GridLayout::SizeType::FIXED, views::GridLayout::kFixedSize, views::GridLayout::SizeType::FIXED,
GetActualDialogWidth(), GetActualDialogWidth()); dialog_->GetActualDialogWidth(), dialog_->GetActualDialogWidth());
pane_layout->StartRow(views::GridLayout::kFixedSize, 0); pane_layout->StartRow(views::GridLayout::kFixedSize, 0);
// This is owned by its parent. It's the container passed to FillContentView. // This is owned by its parent. It's the container passed to FillContentView.
auto content_view = std::make_unique<views::View>(); auto content_view = std::make_unique<views::View>();
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
#include "ui/views/controls/styled_label.h" #include "ui/views/controls/styled_label.h"
#include "ui/views/layout/box_layout.h" #include "ui/views/layout/box_layout.h"
#include "ui/views/layout/grid_layout.h" #include "ui/views/layout/grid_layout.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/painter.h" #include "ui/views/painter.h"
#include "ui/views/view.h" #include "ui/views/view.h"
...@@ -178,12 +177,6 @@ class PaymentRequestRowBorderPainter : public views::Painter { ...@@ -178,12 +177,6 @@ class PaymentRequestRowBorderPainter : public views::Painter {
} // namespace } // namespace
int GetActualDialogWidth() {
static int actual_width =
views::LayoutProvider::Get()->GetSnappedDialogWidth(kDialogMinWidth);
return actual_width;
}
void PopulateSheetHeaderView(bool show_back_arrow, void PopulateSheetHeaderView(bool show_back_arrow,
std::unique_ptr<views::View> header_content_view, std::unique_ptr<views::View> header_content_view,
views::ButtonListener* listener, views::ButtonListener* listener,
......
...@@ -46,6 +46,10 @@ constexpr int kPaymentRequestButtonSpacing = 10; ...@@ -46,6 +46,10 @@ constexpr int kPaymentRequestButtonSpacing = 10;
constexpr int kDialogMinWidth = 512; constexpr int kDialogMinWidth = 512;
constexpr int kDialogHeight = 450; constexpr int kDialogHeight = 450;
// Preferred dimensions of the payment handler dialog in pixels.
constexpr int kPreferredPaymentHandlerDialogWidth = 608;
constexpr int kPreferredPaymentHandlerDialogHeight = 600;
// Fixed width of the amount sections in the payment sheet and the order summary // Fixed width of the amount sections in the payment sheet and the order summary
// sheet, in pixels. // sheet, in pixels.
constexpr int kAmountSectionWidth = 96; constexpr int kAmountSectionWidth = 96;
...@@ -60,8 +64,6 @@ enum class PaymentRequestCommonTags { ...@@ -60,8 +64,6 @@ enum class PaymentRequestCommonTags {
PAYMENT_REQUEST_COMMON_TAG_MAX PAYMENT_REQUEST_COMMON_TAG_MAX
}; };
int GetActualDialogWidth();
// Creates and returns a header for all the sheets in the PaymentRequest dialog. // Creates and returns a header for all the sheets in the PaymentRequest dialog.
// The header contains an optional back arrow button (if |show_back_arrow| is // The header contains an optional back arrow button (if |show_back_arrow| is
// true), a |title| label. |delegate| becomes the delegate for the back and // true), a |title| label. |delegate| becomes the delegate for the back and
......
...@@ -1983,6 +1983,7 @@ if (!is_android) { ...@@ -1983,6 +1983,7 @@ if (!is_android) {
"../browser/ui/views/payments/modifiers_browsertest.cc", "../browser/ui/views/payments/modifiers_browsertest.cc",
"../browser/ui/views/payments/order_summary_view_controller_browsertest.cc", "../browser/ui/views/payments/order_summary_view_controller_browsertest.cc",
"../browser/ui/views/payments/payment_handler_change_payment_method_browsertest.cc", "../browser/ui/views/payments/payment_handler_change_payment_method_browsertest.cc",
"../browser/ui/views/payments/payment_handler_window_size_browsertest.cc",
"../browser/ui/views/payments/payment_method_view_controller_browsertest.cc", "../browser/ui/views/payments/payment_method_view_controller_browsertest.cc",
"../browser/ui/views/payments/payment_request_blob_url_browsertest.cc", "../browser/ui/views/payments/payment_request_blob_url_browsertest.cc",
"../browser/ui/views/payments/payment_request_browsertest.cc", "../browser/ui/views/payments/payment_request_browsertest.cc",
......
...@@ -56,5 +56,8 @@ const base::Feature kPaymentRequestSkipToGPayIfNoCard{ ...@@ -56,5 +56,8 @@ const base::Feature kPaymentRequestSkipToGPayIfNoCard{
const base::Feature kDownRankJustInTimePaymentApp{ const base::Feature kDownRankJustInTimePaymentApp{
"DownRankJustInTimePaymentApp", base::FEATURE_DISABLED_BY_DEFAULT}; "DownRankJustInTimePaymentApp", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kPaymentHandlerPopUpSizeWindow{
"PaymentHandlerPopUpSizeWindow", base::FEATURE_ENABLED_BY_DEFAULT};
} // namespace features } // namespace features
} // namespace payments } // namespace payments
...@@ -64,6 +64,10 @@ extern const base::Feature kPaymentRequestSkipToGPayIfNoCard; ...@@ -64,6 +64,10 @@ extern const base::Feature kPaymentRequestSkipToGPayIfNoCard;
// complete autofill instruments in payment sheet's method selection section. // complete autofill instruments in payment sheet's method selection section.
extern const base::Feature kDownRankJustInTimePaymentApp; extern const base::Feature kDownRankJustInTimePaymentApp;
// Desktop only, if enabled payment handler window size matches the pop up
// window size.
extern const base::Feature kPaymentHandlerPopUpSizeWindow;
} // namespace features } // namespace features
} // namespace payments } // namespace payments
......
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