Skip to content

Commit

Permalink
linux: Remove namespace for DesktopBrowserLauncher
Browse files Browse the repository at this point in the history
Update the function name to be more descriptive so we don't need a
namespace wrapping a single function.

Signed-off-by: Open592 Developer <[email protected]>
  • Loading branch information
cfrank committed Feb 25, 2024
1 parent fee9952 commit 5843292
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/platform/linux/BrowserHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bool BrowserHandler::OnBeforePopup(CefRefPtr<CefBrowser> browser, CefRefPtr<CefF
CEF_REQUIRE_UI_THREAD()

// Best effort call
DesktopBrowserLauncher::Open(target_url);
tryOpenUrlInDesktopBrowser(target_url);

// Block popups
return true;
Expand Down
6 changes: 1 addition & 5 deletions src/platform/linux/DesktopBrowserLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ const std::optional<std::string> g_desktopBrowserCommand = resolveBrowserCommand

}

namespace DesktopBrowserLauncher {

bool Open(const std::string& URL)
bool tryOpenUrlInDesktopBrowser(const std::string& URL)
{
if (!g_desktopBrowserCommand.has_value()) {
return false;
Expand All @@ -116,5 +114,3 @@ bool Open(const std::string& URL)

return false;
}

}
6 changes: 1 addition & 5 deletions src/platform/linux/DesktopBrowserLauncher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@

#include <string>

namespace DesktopBrowserLauncher {

bool Open(const std::string&);

}
bool tryOpenUrlInDesktopBrowser(const std::string& URL);

0 comments on commit 5843292

Please sign in to comment.