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

Move window.chrome.braveSkus to use gin #20437

Closed
Tracked by #21123
bsclifton opened this issue Jan 11, 2022 · 2 comments · Fixed by brave/brave-core#13645
Closed
Tracked by #21123

Move window.chrome.braveSkus to use gin #20437

bsclifton opened this issue Jan 11, 2022 · 2 comments · Fixed by brave/brave-core#13645

Comments

@bsclifton
Copy link
Member

Description

Follow up from brave/brave-core#10847
(similar to #19909)

Goal would be to eliminate the boiler plate code in brave/components/skus/renderer/skus_js_handler.cc by using gin::Wrappable

As an example:
NetErrorPageController
anything that includes object_template_builder.h

return gin::Wrappable<NetErrorPageController>::GetObjectTemplateBuilder(
             isolate)
      .SetMethod("downloadButtonClick",
                 &NetErrorPageController::DownloadButtonClick)
      .SetMethod("reloadButtonClick",
                 &NetErrorPageController::ReloadButtonClick)
      .SetMethod("detailsButtonClick",
                 &NetErrorPageController::DetailsButtonClick)
      .SetMethod("diagnoseErrorsButtonClick",
                 &NetErrorPageController::DiagnoseErrorsButtonClick)
      .SetMethod("trackEasterEgg", &NetErrorPageController::TrackEasterEgg)
      .SetMethod("updateEasterEggHighScore",
                 &NetErrorPageController::UpdateEasterEggHighScore)
      .SetMethod("resetEasterEggHighScore",
                 &NetErrorPageController::ResetEasterEggHighScore)
      .SetMethod("launchOfflineItem",
                 &NetErrorPageController::LaunchOfflineItem)
      .SetMethod("launchDownloadsPage",
                 &NetErrorPageController::LaunchDownloadsPage)
      .SetMethod("savePageForLater", &NetErrorPageController::SavePageForLater)
      .SetMethod("cancelSavePage", &NetErrorPageController::CancelSavePage)
      .SetMethod("listVisibilityChanged",
                 &NetErrorPageController::ListVisibilityChanged);
@stephendonner
Copy link

stephendonner commented Jul 13, 2022

Verified PASSED using

Brave 1.42.62 Chromium: 103.0.5060.114 (Official Build) beta (x86_64)
Revision a1c2360c5b02a6d4d6ab33796ad8a268a6128226-refs/branch-heads/5060@{#1124}
OS macOS Version 11.6.7 (Build 20G630)

Steps:

  1. installed 1.42.62
  2. launched Brave
  3. set the appropriate SKU SDK and VPN flags in brave://flags
  4. restarted Brave
  5. loaded account.brave.software (development)
  6. entered basic auth
  7. purchased VPN
  8. confirmed when prompted to add BraveVPN's config
  9. confirmed my BraveVPN connection was working
example example example example
Screen Shot 2022-07-12 at 5 21 33 PM Screen Shot 2022-07-12 at 5 22 34 PM Screen Shot 2022-07-12 at 5 22 54 PM Screen Shot 2022-07-12 at 5 23 00 PM

Verification PASSED on

Brave | 1.42.78 Chromium: 103.0.5060.134 (Official Build) beta (64-bit)
-- | --
Revision | 8ec6fce403b3feb0869b0732eda8bd95011d333c-refs/branch-heads/5060@{#1262}
OS | Windows 10 Version 21H2 (Build 19044.1826)

  • Verified till step 7, after purchasing the VPN we won't get prompt on window, screens which we get after VPN purchase and click on Refresh brave vpn are listed below:
  • After clicking on Refresh brave vpn VPN gets auto-connected to nearest host for my region
  • Click on VPN shows the connected host name
example example example example
image image image image

@LaurenWags
Copy link
Member

LaurenWags commented Aug 2, 2022

Updated label to release-notes/exclude after conferring with @rebron as Brave VPN is not part of the 1.42.x release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants