From 45c8a93e444a9668214c552a6b3ff86524deba7b Mon Sep 17 00:00:00 2001 From: Jocelyn Liu Date: Fri, 29 Jun 2018 16:43:24 -0700 Subject: [PATCH 1/3] add brave_page_visibility.js --- .../settings/brave_page_visibility.js | 32 +++++++++++++++++++ .../resources/settings/settings_resources.grd | 3 ++ ...ources-settings-page_visibility.html.patch | 9 ++++++ 3 files changed, 44 insertions(+) create mode 100644 browser/resources/settings/brave_page_visibility.js create mode 100644 patches/chrome-browser-resources-settings-page_visibility.html.patch diff --git a/browser/resources/settings/brave_page_visibility.js b/browser/resources/settings/brave_page_visibility.js new file mode 100644 index 000000000000..ccbfab8a9165 --- /dev/null +++ b/browser/resources/settings/brave_page_visibility.js @@ -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 }; +}); diff --git a/browser/resources/settings/settings_resources.grd b/browser/resources/settings/settings_resources.grd index 2ee3649d9615..3d8bc025ccd3 100644 --- a/browser/resources/settings/settings_resources.grd +++ b/browser/resources/settings/settings_resources.grd @@ -918,6 +918,9 @@ + + + ++ From 091d23acaf6938425d0ae6c3faa2b159862d99c6 Mon Sep 17 00:00:00 2001 From: Jocelyn Liu Date: Fri, 29 Jun 2018 09:09:12 -0700 Subject: [PATCH 2/3] hide syncedTabs href in chrome://history and sign in disabled by device admin message in people page --- ...rowser-resources-md_history-app.html.patch | 20 +++++++++++++++++++ ...r-resources-md_history-side_bar.html.patch | 18 +++++++++++++++++ ...ettings-people_page-people_page.html.patch | 16 +++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 patches/chrome-browser-resources-md_history-app.html.patch create mode 100644 patches/chrome-browser-resources-md_history-side_bar.html.patch create mode 100644 patches/chrome-browser-resources-settings-people_page-people_page.html.patch diff --git a/patches/chrome-browser-resources-md_history-app.html.patch b/patches/chrome-browser-resources-md_history-app.html.patch new file mode 100644 index 000000000000..9dc5d860696e --- /dev/null +++ b/patches/chrome-browser-resources-md_history-app.html.patch @@ -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"> + ++ + ++ + + + diff --git a/patches/chrome-browser-resources-md_history-side_bar.html.patch b/patches/chrome-browser-resources-md_history-side_bar.html.patch new file mode 100644 index 000000000000..0a20e778704d --- /dev/null +++ b/patches/chrome-browser-resources-md_history-side_bar.html.patch @@ -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} + + ++ + + $i18n{openTabsMenuItem} + + ++ +
+ + + ++ + ++ + + + From fc76973dd891121a97a07c4478a67602d22df3bb Mon Sep 17 00:00:00 2001 From: Jocelyn Liu Date: Sun, 1 Jul 2018 10:49:04 -0700 Subject: [PATCH 3/3] Add browser_resources.grd generated by l10nUtil.js --- browser/browser_resources.grd | 663 ++++++++++++++++++++++++++++++++++ 1 file changed, 663 insertions(+) create mode 100644 browser/browser_resources.grd diff --git a/browser/browser_resources.grd b/browser/browser_resources.grd new file mode 100644 index 000000000000..4da884798c0e --- /dev/null +++ b/browser/browser_resources.grd @@ -0,0 +1,663 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +