mirror of
https://git.freebsd.org/ports.git
synced 2025-04-29 10:06:40 -04:00
Build cross platform desktop apps with JavaScript, HTML, and CSS. It's easier than you think. If you can build a website, you can build a desktop app. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It takes care of the hard parts so you can focus on the core of your application. WWW: https://electronjs.org/
118 lines
5.7 KiB
C++
118 lines
5.7 KiB
C++
--- chrome/browser/chrome_browser_main.cc.orig 2025-03-24 20:50:14 UTC
|
|
+++ chrome/browser/chrome_browser_main.cc
|
|
@@ -250,15 +250,15 @@
|
|
|
|
// TODO(crbug.com/40118868): Revisit the macro expression once build flag switch
|
|
// of lacros-chrome is complete.
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
|
|
#include "chrome/browser/first_run/upgrade_util_linux.h"
|
|
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
|
|
#include "components/crash/core/app/crashpad.h"
|
|
#endif
|
|
|
|
-#if BUILDFLAG(IS_LINUX)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
|
|
#include "base/nix/xdg_util.h"
|
|
#endif
|
|
|
|
@@ -290,14 +290,14 @@
|
|
// TODO(crbug.com/40118868): Revisit the macro expression once build flag switch
|
|
// of lacros-chrome is complete.
|
|
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
|
- BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
|
|
#include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h"
|
|
#include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h"
|
|
#include "chrome/browser/profiles/profile_activity_metrics_recorder.h"
|
|
#include "ui/base/pointer/touch_ui_controller.h"
|
|
#endif
|
|
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
|
|
#include "chrome/browser/headless/headless_mode_metrics.h" // nogncheck
|
|
#include "chrome/browser/headless/headless_mode_util.h" // nogncheck
|
|
#include "components/headless/select_file_dialog/headless_select_file_dialog.h"
|
|
@@ -365,14 +365,14 @@
|
|
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
|
|
|
|
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
|
|
- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
|
|
+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
|
|
#include "sql/database.h"
|
|
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
|
|
// BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
|
|
|
|
namespace {
|
|
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
|
|
- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
|
|
+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
|
|
constexpr base::FilePath::CharType kMediaHistoryDatabaseName[] =
|
|
FILE_PATH_LITERAL("Media History");
|
|
|
|
@@ -537,7 +537,7 @@ void ProcessSingletonNotificationCallbackImpl(
|
|
}
|
|
#endif
|
|
|
|
-#if BUILDFLAG(IS_LINUX)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
|
|
// Set the global activation token sent as a command line switch by another
|
|
// browser process. This also removes the switch after use to prevent any side
|
|
// effects of leaving it in the command line after this point.
|
|
@@ -1120,7 +1120,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
|
browser_creator_->AddFirstRunTabs(master_prefs_->new_tabs);
|
|
}
|
|
|
|
-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
|
+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
|
|
// Create directory for user-level Native Messaging manifest files. This
|
|
// makes it less likely that the directory will be created by third-party
|
|
// software with incorrect owner or permission. See crbug.com/725513 .
|
|
@@ -1168,7 +1168,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
|
// TODO(crbug.com/40118868): Revisit the macro expression once build flag switch
|
|
// of lacros-chrome is complete.
|
|
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
|
- BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
|
|
metrics::DesktopSessionDurationTracker::Initialize();
|
|
ProfileActivityMetricsRecorder::Initialize();
|
|
TouchModeStatsTracker::Initialize(
|
|
@@ -1364,7 +1364,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile*
|
|
#endif // BUILDFLAG(IS_WIN)
|
|
|
|
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
|
|
- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
|
|
+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
|
|
// Delete the media history database if it still exists.
|
|
// TODO(crbug.com/40177301): Remove this.
|
|
base::ThreadPool::PostTask(
|
|
@@ -1413,7 +1413,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile*
|
|
*UrlLanguageHistogramFactory::GetForBrowserContext(profile));
|
|
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
|
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
|
|
if (headless::IsHeadlessMode()) {
|
|
headless::ReportHeadlessActionMetrics();
|
|
}
|
|
@@ -1522,7 +1522,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl(
|
|
// In headless mode provide alternate SelectFileDialog factory overriding
|
|
// any platform specific SelectFileDialog implementation that may have been
|
|
// set.
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
|
|
if (headless::IsHeadlessMode()) {
|
|
headless::HeadlessSelectFileDialogFactory::SetUp();
|
|
}
|
|
@@ -2073,7 +2073,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat
|
|
|
|
// Drop the request if headless mode is in effect or the request is from
|
|
// a headless Chrome process.
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
|
|
if (headless::IsHeadlessMode() ||
|
|
command_line.HasSwitch(switches::kHeadless)) {
|
|
return false;
|