Disable PIP for videos in incognito mode. [chromium/src : master]

310 views
Skip to first unread message

Side YILMAZ (Gerrit)

unread,
Jan 28, 2021, 8:01:45 AM1/28/21
to Mounir Lamouri, feature-me...@chromium.org

Attention is currently required from: Mounir Lamouri.

Side YILMAZ would like Mounir Lamouri to review this change.

View Change

Disable PIP for videos in incognito mode.

This CL block picture in picture mode for incognito.

Bug: 1101935
Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
---
M chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java b/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
index 814df3b..efcda7e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
@@ -24,6 +24,7 @@
import org.chromium.chrome.browser.ActivityTabProvider;
import org.chromium.chrome.browser.fullscreen.FullscreenManager;
import org.chromium.chrome.browser.infobar.InfoBarContainer;
+import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabObserver;
@@ -117,6 +118,10 @@
return false;
}

+ if (Profile.fromWebContents(webContents).isOffTheRecord()) {
+ return false;
+ }
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
recordAttemptResult(METRICS_ATTEMPT_RESULT_NO_SYSTEM_SUPPORT);
return false;

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 2
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Mounir Lamouri <mlam...@chromium.org>
Gerrit-MessageType: newchange

Side YILMAZ (Gerrit)

unread,
Jan 28, 2021, 8:02:07 AM1/28/21
to feature-me...@chromium.org, Mounir Lamouri, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Mounir Lamouri.

View Change

1 comment:

  • Patchset:

    • Patch Set #2:

      Hello Mounir,
      I created a fix to block picture in picture mode for incognito.
      Could you please take a look?

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 2
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Comment-Date: Thu, 28 Jan 2021 13:01:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Mounir Lamouri (Gerrit)

unread,
Jan 28, 2021, 4:57:42 PM1/28/21
to Side YILMAZ, feature-me...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Side YILMAZ.

View Change

1 comment:

  • Patchset:

    • Patch Set #2:

      Is there a reason why we want to do that? Why is playing a video in incognito okay but playing the same video in Picture-in-Picture in incognito not okay?

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 2
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Side YILMAZ <sidey...@chromium.org>
Gerrit-Comment-Date: Thu, 28 Jan 2021 21:57:27 +0000

Side YILMAZ (Gerrit)

unread,
Jan 29, 2021, 3:19:01 AM1/29/21
to feature-me...@chromium.org

Attention is currently required from: Side YILMAZ.

Side YILMAZ uploaded patch set #3 to this change.

View Change

Disable PIP for videos in incognito mode.

This CL block picture in picture mode for incognito, since The main
reason is that the content of incognito should stay in incognito
browser experience.


Bug: 1101935
Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
---
M chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
1 file changed, 5 insertions(+), 0 deletions(-)

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 3
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Side YILMAZ <sidey...@chromium.org>
Gerrit-MessageType: newpatchset

Side YILMAZ (Gerrit)

unread,
Jan 29, 2021, 3:19:23 AM1/29/21
to feature-me...@chromium.org

Attention is currently required from: Side YILMAZ.

Side YILMAZ uploaded patch set #4 to this change.

View Change

Disable PIP for videos in incognito mode.

This CL block picture in picture mode for incognito, since the content

of incognito should stay in incognito browser experience.

Bug: 1101935
Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
---
M chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
1 file changed, 5 insertions(+), 0 deletions(-)

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4

Side YILMAZ (Gerrit)

unread,
Jan 29, 2021, 3:20:33 AM1/29/21
to feature-me...@chromium.org, Mounir Lamouri, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Mounir Lamouri.

View Change

2 comments:

  • Patchset:

    • Patch Set #2:

      Is there a reason why we want to do that? Why is playing a video in incognito okay but playing the s […]

      The main reason is that the content in incognito should stay in incognito browser experience, but not live outside of it. In PIP case, incognito content will be alive even Chrome incognito is not active on foreground. So this is against the incognito principals.

      Also when looking from user's perspective, it is likely that the incognito is sensitive and may contain content that user'd prefer to hide while closing browser. Hence we should keep media inside of the Chrome.

      As an example we treat the media session similar and hide the content name on notification as here:
      https://drive.google.com/file/d/1tjlQFlJL7azeyiVhQkiHDZDPU47EHt-Z/edit

  • Patchset:

    • Patch Set #4:

      Thanks Mounir for review! I replied at the comment.

      The bug 1101935 is assign to you currently, would you mind if I assign to myself?

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Comment-Date: Fri, 29 Jan 2021 08:20:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mounir Lamouri <mlam...@chromium.org>
Gerrit-MessageType: comment

Side YILMAZ (Gerrit)

unread,
Feb 1, 2021, 10:39:01 AM2/1/21
to Ramin Halavati, feature-me...@chromium.org, Mounir Lamouri

Attention is currently required from: Ramin Halavati, Mounir Lamouri.

Side YILMAZ would like Ramin Halavati to review this change.

View Change

Disable PIP for videos in incognito mode.

This CL block picture in picture mode for incognito, since the content
of incognito should stay in incognito browser experience.

Bug: 1101935
Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
---
M chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java b/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
index 814df3b..efcda7e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java
@@ -24,6 +24,7 @@
import org.chromium.chrome.browser.ActivityTabProvider;
import org.chromium.chrome.browser.fullscreen.FullscreenManager;
import org.chromium.chrome.browser.infobar.InfoBarContainer;
+import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabObserver;
@@ -117,6 +118,10 @@
return false;
}

+ if (Profile.fromWebContents(webContents).isOffTheRecord()) {
+ return false;
+ }
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
recordAttemptResult(METRICS_ATTEMPT_RESULT_NO_SYSTEM_SUPPORT);
return false;

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Ramin Halavati <rhal...@chromium.org>

Side YILMAZ (Gerrit)

unread,
Feb 1, 2021, 10:39:17 AM2/1/21
to feature-me...@chromium.org, Ramin Halavati, Mounir Lamouri, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Ramin Halavati, Mounir Lamouri.

View Change

1 comment:

  • Patchset:

    • Patch Set #4:

      Hi Ramin,

      Can you please review the CL from incognito side?

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Ramin Halavati <rhal...@chromium.org>
Gerrit-Attention: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Comment-Date: Mon, 01 Feb 2021 15:38:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Ramin Halavati (Gerrit)

unread,
Feb 1, 2021, 12:43:52 PM2/1/21
to Side YILMAZ, feature-me...@chromium.org, Ramin Halavati, Mounir Lamouri, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Side YILMAZ, Mounir Lamouri.

Patch set 4:Code-Review +1

View Change

1 comment:

  • Patchset:

    • Patch Set #4:

      The expressed behavior LGTM.
      If user hides the Incognito tab, the video should not continue.

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Comment-Date: Mon, 01 Feb 2021 17:43:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Side YILMAZ (Gerrit)

unread,
Feb 5, 2021, 7:17:19 AM2/5/21
to feature-me...@chromium.org, Ramin Halavati, Mounir Lamouri, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Mounir Lamouri.

View Change

1 comment:

  • Patchset:

    • Patch Set #4:

      Hi Mounir,

      Do you still have concerns for hiding PIP for incognito mode?
      If so, happy to discuss more on gvc.

      Thanks,
      Side

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Comment-Date: Fri, 05 Feb 2021 12:17:06 +0000

Mounir Lamouri (Gerrit)

unread,
Feb 19, 2021, 3:30:30 PM2/19/21
to Side YILMAZ, feature-me...@chromium.org, Ramin Halavati, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Side YILMAZ.

View Change

1 comment:

  • Patchset:

    • Patch Set #4:

      Hi Mounir, […]

      Sorry for the delay, I wanted to reach out to Florian before getting back to you as I've seen changes like that coming from the incognito team with little context recently. This CL in particular isn't something I would be strongly opposed to but the feature has been around for 4+ years, we weren't asked to block it in Incognito and Incognito users relying on it would have no other way to get that capabilities back.

      In my opinion, this should be discussed outside of the code review because it's not a code problem. Actually, your code looks fine, I would only suggest to add a test if we wanted this to land. A document explaining why this behaviour needs to change now and what the expected user impact would be could help. We can then discuss around that document and get back to the CL afterwards. WDYT?

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Side YILMAZ <sidey...@chromium.org>
Gerrit-Comment-Date: Fri, 19 Feb 2021 20:30:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Side YILMAZ <sidey...@chromium.org>
Gerrit-MessageType: comment

Side YILMAZ (Gerrit)

unread,
Feb 23, 2021, 3:26:37 AM2/23/21
to feature-me...@chromium.org, Ramin Halavati, Mounir Lamouri, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Mounir Lamouri.

View Change

1 comment:

  • Patchset:

    • Patch Set #4:

      Sorry for the delay, I wanted to reach out to Florian before getting back to you as I've seen change […]

      That makes so much sense to me. Actually my intention is using this CL as an opportunity to discuss more, if there is any concern with the proposal.

      I have created this doc(https://docs.google.com/document/d/1d7M3ucWPdPBji0SYK3-5H8FfeCVubyP1LMkb_CQMfxo) and put there a pros and cons section. Happy to discuss on the doc and come back to CL later :)

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-Attention: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Feb 2021 08:26:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Side YILMAZ <sidey...@chromium.org>

Side YILMAZ (Gerrit)

unread,
Mar 4, 2021, 4:10:29 AM3/4/21
to feature-me...@chromium.org, Ramin Halavati, Mounir Lamouri, Chromium LUCI CQ, chromium...@chromium.org

Side YILMAZ abandoned this change.

View Change

Abandoned Abandoning since project is paused.

To view, visit change 2653147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iae9727b52dc45c60c169805eaa19867394d7238d
Gerrit-Change-Number: 2653147
Gerrit-PatchSet: 4
Gerrit-Owner: Side YILMAZ <sidey...@chromium.org>
Gerrit-Reviewer: Mounir Lamouri <mlam...@chromium.org>
Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
Gerrit-Reviewer: Side YILMAZ <sidey...@chromium.org>
Gerrit-MessageType: abandon
Reply all
Reply to author
Forward
0 new messages