diff --git a/chromium_src/chrome/browser/ui/views/web_apps/web_app_detailed_install_dialog.cc b/chromium_src/chrome/browser/ui/views/web_apps/web_app_detailed_install_dialog.cc new file mode 100644 index 00000000000..556b938ad49 --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/web_apps/web_app_detailed_install_dialog.cc @@ -0,0 +1,14 @@ +// Copyright (c) 2025 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +#include "ui/base/models/dialog_model.h" + +// Change the default button from kCancel to kOk +#define OverrideDefaultButton(__VA_ARGS__) \ + OverrideDefaultButton(ui::mojom::DialogButton::kOk) + +#include "src/chrome/browser/ui/views/web_apps/web_app_detailed_install_dialog.cc" + +#undef OverrideDefaultButton diff --git a/chromium_src/chrome/browser/ui/views/web_apps/web_app_diy_install_dialog.cc b/chromium_src/chrome/browser/ui/views/web_apps/web_app_diy_install_dialog.cc new file mode 100644 index 00000000000..dc627ca18e9 --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/web_apps/web_app_diy_install_dialog.cc @@ -0,0 +1,14 @@ +// Copyright (c) 2025 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +#include "ui/base/models/dialog_model.h" + +// Change the default button from kCancel to kOk +#define OverrideDefaultButton(__VA_ARGS__) \ + OverrideDefaultButton(ui::mojom::DialogButton::kOk) + +#include "src/chrome/browser/ui/views/web_apps/web_app_diy_install_dialog.cc" + +#undef OverrideDefaultButton diff --git a/chromium_src/chrome/browser/ui/views/web_apps/web_app_simple_install_dialog.cc b/chromium_src/chrome/browser/ui/views/web_apps/web_app_simple_install_dialog.cc new file mode 100644 index 00000000000..ed192ad62d4 --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/web_apps/web_app_simple_install_dialog.cc @@ -0,0 +1,14 @@ +// Copyright (c) 2025 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +#include "ui/base/models/dialog_model.h" + +// Change the default button from kCancel to kOk +#define OverrideDefaultButton(__VA_ARGS__) \ + OverrideDefaultButton(ui::mojom::DialogButton::kOk) + +#include "src/chrome/browser/ui/views/web_apps/web_app_simple_install_dialog.cc" + +#undef OverrideDefaultButton