-
Notifications
You must be signed in to change notification settings - Fork 859
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 and 2 component updaters #189
Conversation
acd439d
to
7e74428
Compare
ed94d9f
to
74ab2cb
Compare
- | ||
+#if defined(BRAVE_CHROMIUM_BUILD) | ||
+ BraveGenerateContentSettingImageModels(result); | ||
+#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above function is static so this seemed like the most minimally invasive way to hook the list of content setting image models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just had a few minor comments.
app/brave_generated_resources.grd
Outdated
<message name="IDS_WIDEVINE_NOT_INSTALLED_MESSAGE" desc="Tooltip on the icon when Wideivne is not installed. 'Widevine' is the name of a plugin and should not be translated."> | ||
Widevine is not installed. | ||
</message> | ||
<message name="IDS_INSTALL_AND_RUN_WIDEVINE" desc="Button to install register Widevine with the component updater. 'Widevine' is the name of a plugin and should not be translated."> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a word is missing in the description "Button to install register Widevine [...]"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, "and" thx.
// ContentSettingSubresourceFilterImageModel - deceptive content | ||
// ContentSettingFramebustBlockImageModel - blocked framebust | ||
|
||
+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to remember comments that we should try to avoid adding/removing whitespace in patch files, but maybe it doesn't matter for simple cases like this? Anyway, just pointing it out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, will fix.
content::WebContents* web_contents, | ||
Profile* profile); | ||
BraveBrowserContentSettingBubbleModelDelegate* brave_content_settings_delegate() const { | ||
return (BraveBrowserContentSettingBubbleModelDelegate*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cast on the return value is necessary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems not anymore, left over from a previous refactoring. Will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#include "chrome/app/vector_icons/vector_icons.h" | ||
#include "chrome/browser/browser_process.h" | ||
@@ -737,6 +738,9 @@ ContentSettingImageModel::GenerateContentSettingImageModels() { | ||
std::vector<std::unique_ptr<ContentSettingImageModel>> result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't this be done with an override like RegisterWidevineCdmComponent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so because I'd have to patch the header file to add another definition.
This patches to generate Brave content setting image models for the navigation URL bar
…omponent_installer.cc This overrides the RegisterWidevineCdmComponent to first check if Widevine has been opted in before proceeding
The pref is a boolean pref by the name: brave.widevine_opted_in
Because there are 2 different component updatears now, and each has its own configuration.
Using Brave Beta, 0.56.6 Chromium: 70.0.3538.67 on MacOS 10.14.1 |
Thanks for the feedback @George9000 The current URL based method isn't enough. |
Fix brave/brave-browser#31
Summary
What is looks like
This slides in and then back out collapsing to a normal icon:
After clicking it looks like this:
Clicking on the ? loads this page:
https://policies.google.com/terms
Clicking on install and run hides the url bar icon and the bubble and installs it. Future starts will always register the widevine plugin so if it failed to install, the next startup would try it.
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist: