Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Issue 986653004: Add fullscreen permission controls to settings (Closed)

Created:
5 years, 9 months ago by qinmin
Modified:
5 years, 8 months ago
Reviewers:
Ted C, Finnur
CC:
chromium-reviews, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add fullscreen permission controls to settings See http://crbug/378412 for details This change adds fullscreen permission control to site settings. For fullscreen, the settings has to be either ASK or ALLOW. The settings behavior should match that of the desktop: 1. when a site enters fullscreen, an infobar will be shown to user if permission is not ALLOW. 2. The infobar will be dismissed when user click any button on it, or site leaves fullscreen. TBR=grt@chromium.org BUG=378412 Committed: https://crrev.com/95ccf94d5e5f47b4b4fca37cddd4cdca51c01e51 Cr-Commit-Position: refs/heads/master@{#321669}

Patch Set 1 #

Total comments: 30

Patch Set 2 : addressing comments #

Total comments: 3

Patch Set 3 : removing ASK from SetSettingForOrigin #

Patch Set 4 : rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+474 lines, -9 lines) Patch
A + chrome/android/java/res/drawable-hdpi/infobar_fullscreen.png View 1 Binary file 0 comments Download
A + chrome/android/java/res/drawable-hdpi/permission_fullscreen.png View Binary file 0 comments Download
A + chrome/android/java/res/drawable-mdpi/infobar_fullscreen.png View 1 Binary file 0 comments Download
A + chrome/android/java/res/drawable-mdpi/permission_fullscreen.png View Binary file 0 comments Download
A + chrome/android/java/res/drawable-xhdpi/infobar_fullscreen.png View 1 Binary file 0 comments Download
A + chrome/android/java/res/drawable-xhdpi/permission_fullscreen.png View Binary file 0 comments Download
A + chrome/android/java/res/drawable-xxhdpi/infobar_fullscreen.png View 1 Binary file 0 comments Download
A + chrome/android/java/res/drawable-xxhdpi/permission_fullscreen.png View 1 Binary file 0 comments Download
A + chrome/android/java/res/drawable-xxxhdpi/infobar_fullscreen.png View Binary file 0 comments Download
A + chrome/android/java/res/drawable-xxxhdpi/permission_fullscreen.png View 1 Binary file 0 comments Download
M chrome/android/java/res/xml/content_preferences.xml View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java View 1 2 3 5 chunks +14 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java View 1 1 chunk +76 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java View 1 2 3 4 chunks +26 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/website/ContentPreferences.java View 1 4 chunks +6 lines, -0 lines 0 comments Download
A + chrome/android/java/src/org/chromium/chrome/browser/preferences/website/FullscreenInfo.java View 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java View 1 7 chunks +14 lines, -0 lines 1 comment Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java View 3 chunks +47 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java View 3 chunks +20 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreferenceBridge.java View 2 chunks +23 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreferences.java View 1 5 chunks +12 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsiteSettingsCategoryFilter.java View 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/app/theme/theme_resources.grd View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h View 1 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc View 1 1 chunk +95 lines, -0 lines 0 comments Download
M chrome/browser/android/preferences/pref_service_bridge.cc View 1 2 3 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/android/preferences/website_preference_bridge.cc View 1 2 3 chunks +24 lines, -0 lines 1 comment Download
M chrome/browser/android/resource_id.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (9 generated)
qinmin
PTAL
5 years, 9 months ago (2015-03-06 23:12:13 UTC) #2
Ted C
+finnur for the website settings logic You should also figure out if this should show ...
5 years, 9 months ago (2015-03-12 21:21:35 UTC) #4
Finnur
https://codereview.chromium.org/986653004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java File chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java (right): https://codereview.chromium.org/986653004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java#newcode56 chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java:56: public static final String PREF_FULLSCREEN_PERMISSION = "fullscreen_permission_list"; This list ...
5 years, 9 months ago (2015-03-13 10:42:14 UTC) #5
qinmin
https://codereview.chromium.org/986653004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java File chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java (right): https://codereview.chromium.org/986653004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java#newcode344 chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java:344: String origin = UrlUtilities.getOriginForDisplay(new URI(tab.getUrl()), true); Done. Moved the ...
5 years, 9 months ago (2015-03-17 23:49:30 UTC) #6
Finnur
... Upload your changes? :)
5 years, 9 months ago (2015-03-18 15:36:26 UTC) #7
qinmin
On 2015/03/18 15:36:26, Finnur wrote: > ... Upload your changes? :) Done. Sorry, "git cl ...
5 years, 9 months ago (2015-03-18 16:18:03 UTC) #8
Finnur
https://codereview.chromium.org/986653004/diff/1/chrome/browser/android/preferences/website_preference_bridge.cc File chrome/browser/android/preferences/website_preference_bridge.cc (right): https://codereview.chromium.org/986653004/diff/1/chrome/browser/android/preferences/website_preference_bridge.cc#newcode150 chrome/browser/android/preferences/website_preference_bridge.cc:150: case 3: setting = CONTENT_SETTING_ASK; break; I suspect we're ...
5 years, 9 months ago (2015-03-19 10:35:26 UTC) #9
Ted C
On 2015/03/19 10:35:26, Finnur wrote: > https://codereview.chromium.org/986653004/diff/1/chrome/browser/android/preferences/website_preference_bridge.cc > File chrome/browser/android/preferences/website_preference_bridge.cc (right): > > https://codereview.chromium.org/986653004/diff/1/chrome/browser/android/preferences/website_preference_bridge.cc#newcode150 > ...
5 years, 9 months ago (2015-03-19 15:13:56 UTC) #10
qinmin
https://codereview.chromium.org/986653004/diff/1/chrome/browser/android/preferences/website_preference_bridge.cc File chrome/browser/android/preferences/website_preference_bridge.cc (right): https://codereview.chromium.org/986653004/diff/1/chrome/browser/android/preferences/website_preference_bridge.cc#newcode150 chrome/browser/android/preferences/website_preference_bridge.cc:150: case 3: setting = CONTENT_SETTING_ASK; break; I see. I ...
5 years, 9 months ago (2015-03-19 18:15:00 UTC) #11
Finnur
LGTM
5 years, 9 months ago (2015-03-20 15:14:10 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/986653004/40001
5 years, 9 months ago (2015-03-20 21:08:40 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/35402) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 9 months ago (2015-03-20 21:14:05 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/986653004/60001
5 years, 9 months ago (2015-03-20 22:29:47 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/51143)
5 years, 9 months ago (2015-03-20 22:37:26 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/986653004/60001
5 years, 9 months ago (2015-03-20 22:56:39 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 9 months ago (2015-03-21 00:34:38 UTC) #25
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/95ccf94d5e5f47b4b4fca37cddd4cdca51c01e51 Cr-Commit-Position: refs/heads/master@{#321669}
5 years, 9 months ago (2015-03-21 00:35:10 UTC) #26
Finnur
5 years, 8 months ago (2015-03-30 13:42:23 UTC) #27
Message was sent while issue was closed.
There are a couple of problems here. As checked in, this CL will cause a DCHECK
if you open the FullScreen category.

Fortunately, it was easy to track down so I've spun a CL to fix:
https://codereview.chromium.org/1044883002/

However, there are further problems. The FullScreen UI element was not showing
up on the SingleWebsitePreferences page due to the missing entry in its layout
XML (which I also fixed). 

But that gets us to a point where if you can now flip the permission for
FullScreen from Allow to Block, but it DCHECKs in doing so because of
IsSettingAllowedForType. This is what I asked you to test earlier, and since I
didn't hear back I thought it was working fine.

This is a problem you need to figure out in a follow-up CL. My take on it is
that we should support CONTENT_SETTING_BLOCK for FullScreen, but I don't know
that implementation well.

https://codereview.chromium.org/986653004/diff/60001/chrome/android/java/src/...
File
chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java
(right):

https://codereview.chromium.org/986653004/diff/60001/chrome/android/java/src/...
chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java:56:
public static final String PREF_FULLSCREEN_PERMISSION =
"fullscreen_permission_list";
I missed the fact that you did not update the xml layout file for this class
(single_website_preference.xml). I took care of that in my other CL.

https://codereview.chromium.org/986653004/diff/60001/chrome/browser/android/p...
File chrome/browser/android/preferences/website_preference_bridge.cc (right):

https://codereview.chromium.org/986653004/diff/60001/chrome/browser/android/p...
chrome/browser/android/preferences/website_preference_bridge.cc:116: env, list,
jorigin.obj(), jembedder.obj());
This is missing a break statement which results in a DCHECK on line 118. Working
on a fix (that also fixes the positioning of the menu item under Site Settings).

Powered by Google App Engine
This is Rietveld 408576698