-
Notifications
You must be signed in to change notification settings - Fork 904
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 #212 from brave/branding_settings_history
Branding in settings and history pages
- Loading branch information
Showing
7 changed files
with
761 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,32 @@ | ||
/* 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/. */ | ||
|
||
cr.define('settings', function() { | ||
// use value defined in page_visibility.js in guest mode | ||
if (loadTimeData.getBoolean('isGuest')) return; | ||
|
||
// We need to specify values for every attribute in pageVisibility instead of | ||
// only overriding specific attributes here because chromium does not | ||
// explicitly define pageVisibility in page_visibility.js since polymer only | ||
// notifies after a property is set. | ||
// Use proxy objects here so we only need to write out the attributes we | ||
// would like to hide. | ||
|
||
const appearanceHandler = { | ||
get: function(obj, prop) { | ||
return prop === 'setTheme' ? false : true; | ||
} | ||
}; | ||
|
||
const handler = { | ||
get: function(obj, prop) { | ||
if (prop === 'appearance') return new Proxy({}, appearanceHandler); | ||
return prop === 'a11y' ? false : true; | ||
} | ||
}; | ||
|
||
let proxy = new Proxy({}, handler); | ||
|
||
return { pageVisibility: proxy }; | ||
}); |
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
20 changes: 20 additions & 0 deletions
20
patches/chrome-browser-resources-md_history-app.html.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,20 @@ | ||
diff --git a/chrome/browser/resources/md_history/app.html b/chrome/browser/resources/md_history/app.html | ||
index 13481a8e52052efd85f99172f165010031ce92f6..d9a48f7fb13de0b3fb8c2e34cd238bf69aa40ff8 100644 | ||
--- a/chrome/browser/resources/md_history/app.html | ||
+++ b/chrome/browser/resources/md_history/app.html | ||
@@ -92,6 +92,7 @@ | ||
query-result="[[queryResult_]]" | ||
path="history"> | ||
</history-list> | ||
+<if expr=_google_chrome> | ||
<template is="dom-if" if="[[syncedTabsSelected_(selectedPage_)]]"> | ||
<history-synced-device-manager id="synced-devices" | ||
session-list="[[queryResult_.sessionList]]" | ||
@@ -100,6 +101,7 @@ | ||
path="syncedTabs"> | ||
</history-synced-device-manager> | ||
</template> | ||
+</if> | ||
</iron-pages> | ||
</div> | ||
|
18 changes: 18 additions & 0 deletions
18
patches/chrome-browser-resources-md_history-side_bar.html.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,18 @@ | ||
diff --git a/chrome/browser/resources/md_history/side_bar.html b/chrome/browser/resources/md_history/side_bar.html | ||
index 49b11840b7b7215cb8cf8ce641883c48072a53d2..5237c1b68dc73ed0c81eb7a91c387633093c4477 100644 | ||
--- a/chrome/browser/resources/md_history/side_bar.html | ||
+++ b/chrome/browser/resources/md_history/side_bar.html | ||
@@ -99,11 +99,13 @@ | ||
$i18n{historyMenuItem} | ||
<paper-ripple></paper-ripple> | ||
</a> | ||
+<if expr="_google_chrome"> | ||
<a href="/syncedTabs" class="page-item" path="syncedTabs" | ||
on-click="onItemClick_"> | ||
$i18n{openTabsMenuItem} | ||
<paper-ripple></paper-ripple> | ||
</a> | ||
+</if> | ||
<div class="separator"></div> | ||
<a id="clear-browsing-data" | ||
href="chrome://settings/clearBrowserData" |
9 changes: 9 additions & 0 deletions
9
patches/chrome-browser-resources-settings-page_visibility.html.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,9 @@ | ||
diff --git a/chrome/browser/resources/settings/page_visibility.html b/chrome/browser/resources/settings/page_visibility.html | ||
index 8ea50773be028e98aa2d4f90477a05f69f5a476e..6f8314a72295c599bdf97831436562c205509f61 100644 | ||
--- a/chrome/browser/resources/settings/page_visibility.html | ||
+++ b/chrome/browser/resources/settings/page_visibility.html | ||
@@ -1,3 +1,4 @@ | ||
<link rel="import" href="chrome://resources/html/cr.html"> | ||
|
||
<script src="page_visibility.js"></script> | ||
+<script src="brave_page_visibility.js"></script> |
16 changes: 16 additions & 0 deletions
16
patches/chrome-browser-resources-settings-people_page-people_page.html.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,16 @@ | ||
diff --git a/chrome/browser/resources/settings/people_page/people_page.html b/chrome/browser/resources/settings/people_page/people_page.html | ||
index 2adc21adf829c182fa2d496745d6d4402bc0b349..26db5c5846142470e98b6353c1e3f6c2a68135b7 100644 | ||
--- a/chrome/browser/resources/settings/people_page/people_page.html | ||
+++ b/chrome/browser/resources/settings/people_page/people_page.html | ||
@@ -197,9 +197,11 @@ | ||
<if expr="not chromeos"> | ||
</template> <!-- if="[[!diceEnabled_]]" --> | ||
</if> | ||
+<if expr="_google_chrome"> | ||
<div class="settings-box" hidden="[[syncStatus.signinAllowed]]"> | ||
$i18n{syncDisabledByAdministrator} | ||
</div> | ||
+</if> | ||
</template> | ||
|
||
<if expr="not chromeos"> |