Commit b51226bd authored by John Williams's avatar John Williams Committed by Commit Bot

[Cast MRP] Allow desktop picker to by bypassed.

This change potentially has some privacy implications, but the
relevant people agreed it's not a problem and doesn't require a formal
review.  My original email asking if I need a review is included
below:

I have a very small Chrome change I'd like to land that might be
considered privacy-sensitive, but it's so small I'm not sure a full
review is warranted.

The change I want to make is to the desktop picker dialog that appears
when you use the "Cast..." feature to project your desktop to another
device. Currently, when you choose the "Cast desktop" option and click
a device to cast to, a dialog appears asking what you'd like to
share. In the typical usage of this dialog, the user can choose the
whole screen (or potentially one of multiple screens), or an
application window. In the case of casting, on every platform except
Linux, the only option is to cast a screen, and in the typical case
where the user only has a single screen, the dialog feels like an
unnecessary step in what is already a multi-step process, so I'd like
to bypass it entirely in that case.

The privacy concern is that even when there is only one option for the
user to pick, the dialog still serves the purpose of making the user
aware they're about to share the contents of their screen and gives
them a chance to prevent it from happening. This seems like a genuine
concern in the original use case of the dialog, which can be opened
from third-party JavaScript code through the
chrome.desktopCapture.chooseDesktopMedia function and used to send the
resulting video stream to an arbitrary destination. In the case of
casting, the dialog is opened by C++ code in Chrome itself only after
the user has gone through the following steps:

- Open the Cast dialog, either from the right-click menu, the Cast
  icon in the toolbar, or a Cast icon embedded in a page that uses the
  Cast API.

- Click the "Sources" button at the bottom of the dialog.

- Choose "Cast desktop" from the menu.

- Click on a Cast receiver (e.g. a Chromecast on the LAN) in the Cast
  dialog.

This, to me, seems like more than enough to ensure that a user really
does intend to broadcast their screen, and the final two steps of
clicking a thumbnail of the screen and then clicking "Share" are
entirely redundant.

Finally, there are a few points I'd like to clarify. First, I only
want to expose the ability to bypass the dialog to native code, not
the JavaScript API. The current version of the Cast dialog invokes the
desktop picker from JavaScript code, but we're moving to an all-native
implementation. Second, even though the Cast dialog can be opened from
third-party code embedded in a web site, if the user chooses "Cast
desktop" from the dialog, nothing that happens afterward involves any
third-party code. (That seems pretty confusing from a UX standpoint,
but harmless w.r.t. privacy.) Finally, I only want to bypass the
dialog in the case where the user only has a single screen, so there's
no possible confusion about which screen will be shared.

Bug: 637643
Change-Id: I07784aacd0e0fa6b4ea35378535e1e237fb8c57e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032088Reviewed-by: default avatarTakumi Fujimoto <takumif@chromium.org>
Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
Commit-Queue: John Williams <jrw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737924}
parent 8572dc06
...@@ -147,8 +147,7 @@ DesktopMediaPickerController::Params MakeDesktopPickerParams( ...@@ -147,8 +147,7 @@ DesktopMediaPickerController::Params MakeDesktopPickerParams(
params.context = web_contents->GetTopLevelNativeWindow(); params.context = web_contents->GetTopLevelNativeWindow();
params.app_name = l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); params.app_name = l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
params.target_name = params.app_name; params.target_name = params.app_name;
// TODO(crbug.com/637643): Change to true after privacy approval. params.select_only_screen = true;
params.select_only_screen = false;
return params; return params;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment