diff --git a/browser/resources/downloads/BUILD.gn b/browser/resources/downloads/BUILD.gn deleted file mode 100644 index 22d32868a3a..00000000000 --- a/browser/resources/downloads/BUILD.gn +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2023 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/. - -import("//tools/grit/preprocess_if_expr.gni") -import("sources.gni") - -# Move brave files to the place where chromium downloads page is compiled from. -# It should be the same directory that build_webui.gni uses after it performs -# its own preprocess_if_expr. Once chromium and brave frontend files are all in -# the same place, build_webui.gni will continue its typescript and rollup -# compile (etc.) from that directory. -preprocess_if_expr("preprocess") { - out_folder = "$root_gen_dir/chrome/browser/resources/downloads/preprocessed" - in_files = brave_downloads_ts_local_files -} diff --git a/browser/resources/downloads/brave_overrides/index.ts b/browser/resources/downloads/brave_overrides/index.ts deleted file mode 100644 index 5ef9e5fc719..00000000000 --- a/browser/resources/downloads/brave_overrides/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2023 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/. - -import './item.js' diff --git a/browser/resources/downloads/sources.gni b/browser/resources/downloads/sources.gni deleted file mode 100644 index 119a61a6669..00000000000 --- a/browser/resources/downloads/sources.gni +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023 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/. - -brave_downloads_non_web_component_files = [ - "brave_overrides/index.ts", - "brave_overrides/item.ts", -] - -brave_downloads_preprocess_extra_deps = - [ "//brave/browser/resources/downloads:preprocess" ] - -brave_downloads_ts_local_files = brave_downloads_non_web_component_files diff --git a/browser/resources/downloads/brave_overrides/item.ts b/chromium_src/chrome/browser/resources/downloads/item.ts similarity index 88% rename from browser/resources/downloads/brave_overrides/item.ts rename to chromium_src/chrome/browser/resources/downloads/item.ts index 92f05ca9942..d4b00cbbafa 100644 --- a/browser/resources/downloads/brave_overrides/item.ts +++ b/chromium_src/chrome/browser/resources/downloads/item.ts @@ -5,7 +5,7 @@ import { injectStyle } from '//resources/brave/lit_overriding.js' import { css } from '//resources/lit/v3_0/lit.rollup.js' -import { DownloadsItemElement } from '../item.js' +import { DownloadsItemElement } from './item-chromium.js' injectStyle(DownloadsItemElement, css` #progress { @@ -18,3 +18,5 @@ injectStyle(DownloadsItemElement, css` } } `) + +export * from './item-chromium.js' diff --git a/patches/chrome-browser-resources-downloads-BUILD.gn.patch b/patches/chrome-browser-resources-downloads-BUILD.gn.patch deleted file mode 100644 index 8f1b172aa07..00000000000 --- a/patches/chrome-browser-resources-downloads-BUILD.gn.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/chrome/browser/resources/downloads/BUILD.gn b/chrome/browser/resources/downloads/BUILD.gn -index f388e81c0cc50be62ac7471254730dfa54a95644..55384e1dbcfd48387791d9d82362cbfd576e9bb8 100644 ---- a/chrome/browser/resources/downloads/BUILD.gn -+++ b/chrome/browser/resources/downloads/BUILD.gn -@@ -71,4 +71,5 @@ build_webui("build") { - optimize_webui_host = "downloads" - optimize_webui_in_files = [ "downloads.js" ] - } -+ import("//brave/browser/resources/downloads/sources.gni") non_web_component_files += brave_downloads_non_web_component_files exclude_ts_preprocess_files = brave_downloads_ts_local_files preprocess_deps = brave_downloads_preprocess_extra_deps - } diff --git a/patches/chrome-browser-resources-downloads-downloads.ts.patch b/patches/chrome-browser-resources-downloads-downloads.ts.patch deleted file mode 100644 index feb9366f03e..00000000000 --- a/patches/chrome-browser-resources-downloads-downloads.ts.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/chrome/browser/resources/downloads/downloads.ts b/chrome/browser/resources/downloads/downloads.ts -index f4036a3479f94b642164ac1c52b7c037389fae95..3287be58d54c34a097a1b8e404d11bed8171aa0c 100644 ---- a/chrome/browser/resources/downloads/downloads.ts -+++ b/chrome/browser/resources/downloads/downloads.ts -@@ -2,6 +2,7 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+import './brave_overrides/index.js'; - import './manager.js'; - - export {CrIconElement} from 'chrome://resources/cr_elements/cr_icon/cr_icon.js';