-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8234 from brave/ipfs-page-indicator
Add custom badge to ipfs pages
- Loading branch information
Showing
9 changed files
with
79 additions
and
1 deletion.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
12 changes: 12 additions & 0 deletions
12
chromium_src/chrome/browser/ui/views/location_bar/location_icon_view.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,12 @@ | ||
/* Copyright (c) 2021 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 http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/components/ipfs/ipfs_constants.h" | ||
|
||
#define BRAVE_SHOULD_SHOW_URL_IPFS_CHECK \ | ||
url.SchemeIs(ipfs::kIPFSScheme) || url.SchemeIs(ipfs::kIPNSScheme) || | ||
|
||
#include "../../../../../../../chrome/browser/ui/views/location_bar/location_icon_view.cc" | ||
#undef BRAVE_SHOULD_SHOW_URL_IPFS_CHECK |
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
12 changes: 12 additions & 0 deletions
12
patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.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/chrome/browser/ui/views/location_bar/location_icon_view.cc b/chrome/browser/ui/views/location_bar/location_icon_view.cc | ||
index de836abcf94a550687d47894ecf19c6df1428b32..665df7d24b95bc7d9bfc19044c953c2bb954a745 100644 | ||
--- a/chrome/browser/ui/views/location_bar/location_icon_view.cc | ||
+++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc | ||
@@ -134,6 +134,7 @@ bool LocationIconView::ShouldShowText() const { | ||
const auto* location_bar_model = delegate_->GetLocationBarModel(); | ||
const GURL& url = location_bar_model->GetURL(); | ||
if (url.SchemeIs(content::kChromeUIScheme) || | ||
+ BRAVE_SHOULD_SHOW_URL_IPFS_CHECK | ||
url.SchemeIs(extensions::kExtensionScheme) || | ||
url.SchemeIs(url::kFileScheme) || | ||
url.SchemeIs(dom_distiller::kDomDistillerScheme)) { |