[Downloads]: Convert to new patching system (#26847)
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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'
|
||||
@@ -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
|
||||
+3
-1
@@ -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'
|
||||
@@ -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
|
||||
}
|
||||
@@ -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';
|
||||
Reference in New Issue
Block a user