Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support widevine in linux #1606

Merged
merged 1 commit into from
Feb 14, 2019
Merged

Support widevine in linux #1606

merged 1 commit into from
Feb 14, 2019

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Feb 7, 2019

Widevine install is only downloaded when user accepts the use of
widevine from google service via content bubble dialog. Then, it
can be used after browser is restarted due to the use of zygote
process in linux.

Background update is only triggered when brave has different
version of widevine with installed version. That means
widevine_cdm_version.h included updated widevine version.
This new version is also in effect after brwoser restart.
We can update version string by changing widevine version in
package.json.

Of course, we could implement install and update w/o depending on
version string. Instead it can be done by fetching latest version
from google server. However, this could introduce many upstream file
change because upstream code assumes version is not changed in runtime.

BraveWidevineBundleManager manages widevine bundle's install state and
it uses BraveWidevineBundleUnzipper to unzip downloaded zipped bundle.

Fix brave/brave-browser#413

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

yarn test brave_unit_tests --filter=BraveWidevineBundleManagerTest.*
For manual test, please refer to Test Plan in brave/brave-browser#3300

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

@simonhong simonhong force-pushed the linux_widevine branch 2 times, most recently from 7edb43d to 1fbba6e Compare February 7, 2019 06:44
@simonhong simonhong self-assigned this Feb 8, 2019
@simonhong simonhong force-pushed the linux_widevine branch 3 times, most recently from 0331f22 to 678c528 Compare February 11, 2019 03:54
@simonhong simonhong changed the title WIP: Support widevine in linux Support widevine in linux Feb 11, 2019
@simonhong
Copy link
Member Author

simonhong commented Feb 11, 2019

I think implementation is ready to review.
Test writing is in-progress. Done.

@simonhong simonhong force-pushed the linux_widevine branch 2 times, most recently from 180718c to b3cef89 Compare February 11, 2019 06:16
DVLOG(1) << __func__ << ": Widevine install completed w/o error";
// TODO(simonhong): This is very aggresive.
// Showing relaunch dialog would be better.
chrome::AttemptRelaunch();
Copy link
Member Author

@simonhong simonhong Feb 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbondy I think there are many ways to make user restart.

  1. just restart after install is success like I did
  2. change content settings bubble string after install. In this case, blocked image is still visible to user and bubble has different text like To use widevine, please restart browser.
  3. show relaunch dialog

Which one is best UX? Or please let me know if our UX team has different option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonhong #2 please. That messaging only for Linux.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbondy UX is changed to #2. PTAL again.

@simonhong simonhong force-pushed the linux_widevine branch 5 times, most recently from d757642 to f1c7dd1 Compare February 13, 2019 03:08
@simonhong simonhong added this to the 0.62.x - Nightly milestone Feb 13, 2019
@simonhong simonhong force-pushed the linux_widevine branch 2 times, most recently from 0ab6e1f to 6ef8f86 Compare February 13, 2019 13:22
Widevine install is only downloaded when user accepts the use of
widevine from google service via content bubble dialog. Then, it
can be used after browser is restarted due to the use of zygote
process in linux.

Background update is only triggered when brave has different
version of widevine with installed version. That means
widevine_cdm_version.h included updated widevine version.
This new version is also in effect after brwoser restart.
We can update version string by changing widevine version in
package.json.

Of course, we could implement install and update w/o depending on
version string. Instead it can be done by fetching latest version
from google server. However, this could introduce many upstream file
change because upstream code assumes version is not changed in runtime.

BraveWidevineBundleManager manages widevine bundle's install state and
it uses BraveWidevineBundleUnzipper to unzip downloaded zipped bundle.

When installed, contents settings bubble text is changed to "restart".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Widevine support for Linux
2 participants