Makes SiteSettingsPreferences inherits BraveSiteSettingsPreferencesBase.
With this, we don't need to modify multiple preferences xml files.
Only need to change one SiteSettingsPreferences.java file.
Global desktop mode setting is applied to webcontents only when tab
is created. We can know this by whether checking last committed
entry is null or not.
With this, we don't need to modify Tab.java.
DesktopModeTabHelper overrides when new WebContents is created.
DesktopMode changing will affect to newly created Tab.
So, existing tab will not be changed desktop mode.
If user choose desktop view option explicitly, we respect it during the
life time of the Tab.
To initialize initial prefs for dual DSE, it needs default TemplateUrl.
It can be fetched after TemplateUrlService loading is done.
So, initialization is done after loading is finished.
Brave uses different DSE for standard and private but chromium uses
single DSE for both.
To achieve our goal, we set proper DSE whenever standard/private context is
changed.
Run updateBravePreferences() after fininshing MainPreferences::updatePreferences().
Otherwise, some prefs could be added after finishing updateBravePreferences().
Shields button should be clickable always.
This bug is regression from controlling enable/disable shields button.
To fix this, shields button should be always enabled.
The purpose of disabling shields button was preventing shields button
click when tab is not ready.
So, instead of disabling shields button, just return when current tab is
null during the handling of click.
And enable/disableShieldsButton methods are integrated into
updateBraveShieldsButtonState().
Also, shields popup will be displayed only for http/https protocols.
The only method we were overriding - doesDefaultSearchEngineHaveLogo
has moved to the native side, so removed our java override and added
a chromium_src override.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/f517f7d559cb1fcde37dced14cfde71312adaeab
commit f517f7d559cb1fcde37dced14cfde71312adaeab
Author: Peter Wen <wnwen@chromium.org>
Date: Thu Jun 13 15:28:27 2019 +0000
Move Android TemplateUrlService to //components
The code that TemplateUrlServiceAndroid depends on has been moved to
//components/search_engines. The only piece that is still required is
Profile, which is now supplied by TemplateUrlServiceFactory.
Change-Id: Ic16991570fb5332d7f7b99b09c324021f7a440f0
Bug: 968156
Initially, button should be disabled state. If not, it could be clicked
while tab is not displayed.
Also, button should be only enabled when shields is on for current tab
and button state should be updated when visible tab is changed.