chromium / vs-chromium

A Visual Studio extension containing a collection of tools to help contributing code to the Chromium project.
BSD 3-Clause "New" or "Revised" License
310 stars 88 forks source link

Add support for other browser vendors #62

Open mohamedmansour opened 4 years ago

mohamedmansour commented 4 years ago

Other browser vendors use different assembly name and profile paths, for example in Microsoft Edge Chromium, we use msedge.exe and Edge SxS.

By doing the following, VsChromium could work with any major vendor like Brave, Chrome, Edge, Opera, Vivaldi,

Here are the areas that require modification:

Booleans

Examples:

file.Equals("chrome.exe", StringComparison.CurrentCultureIgnoreCase)
InstallationPath.HasComponent("Chrome SxS")
InstallationPath.HasComponent("Chrome")

Potential Solution: Utility class that takes a lambda, and it will transform that to N browser vendors.

Strings

Examples:

Path.Combine(location, "chrome.exe")
Path.Combine(_installationData.InstallationPath.Value, "chrome.exe")

Potential Solutions: Utility class that takes a folder, and makes sure from N browser vendors it exists. Then returns the path.

Arrays

Examples:

Process.GetProcessesByName("chrome")

Potential Solution: Return all processes from all vendors.

Renaming them to Chromium

Examples:

this.Text = "Attach to Chrome";
[Category("Chrome Debugging")]

Potential Solution: Just to signify its Chromium and not Chrome