Commit a8487fd3 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

MB 80: Enable Mullvad Browser as a default browser

parent fb7f41a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ let ShellServiceInternal = {
      ) {
        if (this._shouldSetDefaultPDFHandler()) {
          lazy.log.info("Setting Firefox as default PDF handler");
          extraFileExtensions.push(".pdf", "FirefoxPDF");
          extraFileExtensions.push(".pdf", "MullvadBrowserPDF");
        } else {
          lazy.log.info("Not setting Firefox as default PDF handler");
        }
@@ -324,7 +324,7 @@ let ShellServiceInternal = {
      try {
        this.defaultAgent.setDefaultExtensionHandlersUserChoice(aumi, [
          ".pdf",
          "FirefoxPDF",
          "MullvadBrowserPDF",
        ]);
      } catch (err) {
        telemetryResult = "ErrOther";
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
#include <wchar.h>
#include <windows.h>

#define APP_REG_NAME_BASE L"Firefox-"
#define APP_REG_NAME_BASE L"MullvadBrowser-"

static bool IsWindowsLogonConnected() {
  WCHAR userName[UNLEN + 1];
+6 −4
Original line number Diff line number Diff line
@@ -361,10 +361,12 @@ nsWindowsShellService::CheckAllProgIDsExist(bool* aResult) {

    *aResult = result;
  } else {
    *aResult =
        CheckProgIDExists(FormatProgID(L"FirefoxURL", aumid.get()).get()) &&
        CheckProgIDExists(FormatProgID(L"FirefoxHTML", aumid.get()).get()) &&
        CheckProgIDExists(FormatProgID(L"FirefoxPDF", aumid.get()).get());
    *aResult = CheckProgIDExists(
                   FormatProgID(L"MullvadBrowserURL", aumid.get()).get()) &&
               CheckProgIDExists(
                   FormatProgID(L"MullvadBrowserHTML", aumid.get()).get()) &&
               CheckProgIDExists(
                   FormatProgID(L"MullvadBrowserPDF", aumid.get()).get());
  }

  return NS_OK;
+14 −0
Original line number Diff line number Diff line
CXXFLAGS=-Icityhash -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DCITYHASH_EXPORTS -DUNICODE
SRCS=Set.cpp
OBJS=$(subst .cpp,.o,$(SRCS))
LDFLAGS=-lole32 -lshlwapi -shared -Wl,--no-insert-timestamp
PLUGIN=ApplicationID.dll

all: $(PLUGIN)

$(PLUGIN): $(OBJS)
	$(CXX) $(OBJS) $(LDFLAGS) -o $@
	llvm-strip $@

clean:
	$(RM) $(OBJS) $(PLUGIN)
+2 −1
Original line number Diff line number Diff line
@@ -35,7 +35,8 @@ unsigned int g_stringsize;
TCHAR *g_variables;

// Indicates that an application supports dual desktop and immersive modes. In Windows 8, this property is only applicable for web browsers.
DEFINE_PROPERTYKEY(PKEY_AppUserModel_IsDualMode, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 11);
// mingw already defines this in propkey.h.
// DEFINE_PROPERTYKEY(PKEY_AppUserModel_IsDualMode, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 11);

int popstring(TCHAR *str, int len);
void pushstring(const TCHAR *str, int len);
Loading