-
Notifications
You must be signed in to change notification settings - Fork 883
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e0c4f6
commit 711d159
Showing
16 changed files
with
137 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
chromium_src/chrome/browser/ui/webui/certificate_manager/certificate_manager_ui.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* Copyright (c) 2024 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 "chrome/browser/ui/webui/certificate_manager/certificate_manager_ui.h" | ||
|
||
#include "content/public/browser/web_ui_data_source.h" | ||
|
||
namespace { | ||
|
||
const char kBraveCRSLearnMoreLink[] = | ||
"https://github.com/brave/brave-browser/wiki/TLS-Policy#root-store"; | ||
|
||
} // namespace | ||
|
||
// Decay arrays to pointers for == comparison. | ||
#define AddString(NAME, VALUE) \ | ||
AddString(NAME, +VALUE == +kCRSLearnMoreLink ? kBraveCRSLearnMoreLink : VALUE) | ||
|
||
#include "src/chrome/browser/ui/webui/certificate_manager/certificate_manager_ui.cc" | ||
#undef AddString |
10 changes: 10 additions & 0 deletions
10
patches/ui-webui-resources-cr_components-certificate_manager-BUILD.gn.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/ui/webui/resources/cr_components/certificate_manager/BUILD.gn b/ui/webui/resources/cr_components/certificate_manager/BUILD.gn | ||
index c7fbec010504b332d55068c1bd051f55d0115e06..9c0e5cbb73817f12fed96ffae95ea58d947f598f 100644 | ||
--- a/ui/webui/resources/cr_components/certificate_manager/BUILD.gn | ||
+++ b/ui/webui/resources/cr_components/certificate_manager/BUILD.gn | ||
@@ -110,4 +110,5 @@ build_webui("build") { | ||
webui_context_type = "relative" | ||
generate_grdp = true | ||
grd_resource_path_prefix = rebase_path(".", "//ui/webui/resources") | ||
+ import("//brave/ui/webui/resources/cr_components/certificate_manager/sources.gni") non_web_component_files += brave_certificate_manager_non_web_component_files exclude_ts_preprocess_files = brave_certificate_manager_ts_local_files preprocess_deps = brave_certificate_manager_preprocess_extra_deps | ||
} |
12 changes: 12 additions & 0 deletions
12
patches/ui-webui-resources-cr_components-certificate_manager-certificate_manager_v2.ts.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/ui/webui/resources/cr_components/certificate_manager/certificate_manager_v2.ts b/ui/webui/resources/cr_components/certificate_manager/certificate_manager_v2.ts | ||
index 2d6af36e0ab618de12fe85a72bc5f8fb7471c83e..fac186bd91c1349633a3c3889d24eb1ff2661bea 100644 | ||
--- a/ui/webui/resources/cr_components/certificate_manager/certificate_manager_v2.ts | ||
+++ b/ui/webui/resources/cr_components/certificate_manager/certificate_manager_v2.ts | ||
@@ -8,6 +8,7 @@ | ||
* and Chrome Cert Management Enterprise policies launch. | ||
*/ | ||
|
||
+import './brave_overrides/index.js'; | ||
import './certificate_list_v2.js'; | ||
import './certificate_confirmation_dialog.js'; | ||
import './certificate_info_dialog.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
ui/webui/resources/cr_components/certificate_manager/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright (c) 2024 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 certificate manager 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/ui/webui/resources/cr_components/certificate_manager/preprocessed" | ||
in_files = brave_certificate_manager_ts_local_files | ||
} |
41 changes: 41 additions & 0 deletions
41
...bui/resources/cr_components/certificate_manager/brave_overrides/certificate_manager_v2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) 2024 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/. | ||
|
||
// @ts-nocheck TODO(petemill): Define types and remove ts-nocheck | ||
|
||
import {RegisterStyleOverride} from '//resources/brave/polymer_overriding.js' | ||
import {html} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js' | ||
|
||
RegisterStyleOverride( | ||
'certificate-manager-v2', | ||
html` | ||
<style> | ||
.cr-nav-menu-item { | ||
min-height: 20px !important; | ||
border-end-end-radius: 0px !important; | ||
border-start-end-radius: 0px !important; | ||
box-sizing: content-box !important; | ||
} | ||
.cr-nav-menu-item:hover { | ||
background: transparent !important; | ||
} | ||
.cr-nav-menu-item[selected] { | ||
--iron-icon-fill-color: var(--cr-link-color) !important; | ||
color: var(--cr-link-color) !important; | ||
background: transparent !important; | ||
} | ||
.cr-nav-menu-item cr-icon { | ||
display: none !important; | ||
} | ||
.cr-nav-menu-item cr-ripple { | ||
display: none !important; | ||
} | ||
</style> | ||
` | ||
) |
6 changes: 6 additions & 0 deletions
6
ui/webui/resources/cr_components/certificate_manager/brave_overrides/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright (c) 2024 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 './certificate_manager_v2.js' |
16 changes: 16 additions & 0 deletions
16
ui/webui/resources/cr_components/certificate_manager/sources.gni
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2024 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_certificate_manager_non_web_component_files = [ | ||
"brave_overrides/certificate_manager_v2.ts", | ||
"brave_overrides/index.ts", | ||
] | ||
|
||
brave_certificate_manager_preprocess_extra_deps = [ | ||
"//brave/ui/webui/resources/cr_components/certificate_manager:preprocess", | ||
] | ||
|
||
brave_certificate_manager_ts_local_files = | ||
brave_certificate_manager_non_web_component_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters