Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Commit

Permalink
Bug 1496327 - Remove MOZ_ENABLE_XREMOTE r=froydnj
Browse files Browse the repository at this point in the history
Depends on D7691

Differential Revision: https://phabricator.services.mozilla.com/D7692
  • Loading branch information
glandium committed Oct 4, 2018
1 parent 5aae8ad commit e1e9530
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 26 deletions.
2 changes: 1 addition & 1 deletion toolkit/components/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ with Files('**'):
BUG_COMPONENT = ('Toolkit', 'General')

# These component dirs are built for all apps (including suite)
if CONFIG['MOZ_ENABLE_XREMOTE']:
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
DIRS += ['remote']

DIRS += [
Expand Down
2 changes: 0 additions & 2 deletions toolkit/moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ def toolkit_define(toolkit):
set_define(toolkit_define, True)


set_config('MOZ_ENABLE_XREMOTE', True, when=toolkit_gtk)
set_define('MOZ_ENABLE_XREMOTE', True, when=toolkit_gtk)
set_config('MOZ_X11', True, when=toolkit_gtk)
set_define('MOZ_X11', True, when=toolkit_gtk)
add_old_configure_assignment('MOZ_X11', True, when=toolkit_gtk)
Expand Down
8 changes: 4 additions & 4 deletions toolkit/toolkit.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ DIRS += [
'/tools/profiler',
]

if CONFIG['MOZ_ENABLE_XREMOTE']:
DIRS += ['/widget/xremoteclient']

if CONFIG['MOZ_SPELLCHECK']:
DIRS += ['/extensions/spellcheck']

Expand All @@ -157,7 +154,10 @@ DIRS += [
]

if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
DIRS += ['/toolkit/system/gnome']
DIRS += [
'/toolkit/system/gnome',
'/widget/xremoteclient',
]

if CONFIG['ENABLE_MARIONETTE']:
DIRS += [
Expand Down
8 changes: 3 additions & 5 deletions toolkit/xre/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,15 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
'/widget/cocoa',
]

if CONFIG['MOZ_ENABLE_XREMOTE']:
LOCAL_INCLUDES += [
'/widget/xremoteclient',
]

CXXFLAGS += CONFIG['TK_CFLAGS']
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']

if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
LOCAL_INCLUDES += [
'/widget/xremoteclient',
]

DEFINES['TOPOBJDIR'] = TOPOBJDIR
FINAL_TARGET_PP_FILES += [
Expand Down
26 changes: 12 additions & 14 deletions toolkit/xre/nsAppRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
#endif

// for X remote support
#ifdef MOZ_ENABLE_XREMOTE
#if defined(MOZ_WIDGET_GTK)
#include "XRemoteClient.h"
#include "nsIRemoteService.h"
#include "nsProfileLock.h"
Expand Down Expand Up @@ -1659,7 +1659,7 @@ DumpVersion()
printf("\n");
}

#ifdef MOZ_ENABLE_XREMOTE
#if defined(MOZ_WIDGET_GTK)
static RemoteResult
ParseRemoteCommandLine(nsCString& program,
const char** profile,
Expand Down Expand Up @@ -1729,7 +1729,7 @@ StartRemoteClient(const char* aDesktopStartupID,

return REMOTE_FOUND;
}
#endif // MOZ_ENABLE_XREMOTE
#endif // MOZ_WIDGET_GTK

void
XRE_InitOmnijar(nsIFile* greOmni, nsIFile* appOmni)
Expand Down Expand Up @@ -3019,10 +3019,8 @@ class XREMain
XREMain() :
mStartOffline(false)
, mShuttingDown(false)
#ifdef MOZ_ENABLE_XREMOTE
, mDisableRemote(false)
#endif
#if defined(MOZ_WIDGET_GTK)
, mDisableRemote(false)
, mGdkDisplay(nullptr)
#endif
{};
Expand All @@ -3044,7 +3042,7 @@ class XREMain
nsCOMPtr<nsIFile> mProfD;
nsCOMPtr<nsIFile> mProfLD;
nsCOMPtr<nsIProfileLock> mProfileLock;
#ifdef MOZ_ENABLE_XREMOTE
#if defined(MOZ_WIDGET_GTK)
nsCOMPtr<nsIRemoteService> mRemoteService;
nsProfileLock mRemoteLock;
nsCOMPtr<nsIFile> mRemoteLockDir;
Expand All @@ -3059,7 +3057,7 @@ class XREMain

bool mStartOffline;
bool mShuttingDown;
#ifdef MOZ_ENABLE_XREMOTE
#if defined(MOZ_WIDGET_GTK)
bool mDisableRemote;
#endif

Expand Down Expand Up @@ -3911,7 +3909,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
#endif /* XP_WIN */

#if defined(MOZ_WIDGET_GTK) || defined(MOZ_ENABLE_XREMOTE)
#if defined(MOZ_WIDGET_GTK)
// Stash DESKTOP_STARTUP_ID in malloc'ed memory because gtk_init will clear it.
#define HAVE_DESKTOP_STARTUP_ID
const char* desktopStartupIDEnv = PR_GetEnv("DESKTOP_STARTUP_ID");
Expand Down Expand Up @@ -4041,7 +4039,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
mDisableRemote = true;
}
#endif
#ifdef MOZ_ENABLE_XREMOTE
#if defined(MOZ_WIDGET_GTK)
// handle --remote now that xpcom is fired up
bool newInstance;
{
Expand Down Expand Up @@ -4724,7 +4722,7 @@ XREMain::XRE_mainRun()
}

if (!mShuttingDown) {
#ifdef MOZ_ENABLE_XREMOTE
#if defined(MOZ_WIDGET_GTK)
// if we have X remote support, start listening for requests on the
// proxy window.
if (!mDisableRemote)
Expand All @@ -4736,7 +4734,7 @@ XREMain::XRE_mainRun()
mRemoteLock.Cleanup();
mRemoteLockDir->Remove(false);
}
#endif /* MOZ_ENABLE_XREMOTE */
#endif /* MOZ_WIDGET_GTK */

mNativeApp->Enable();
}
Expand Down Expand Up @@ -4941,12 +4939,12 @@ XREMain::XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig)
}

if (!mShuttingDown) {
#ifdef MOZ_ENABLE_XREMOTE
#if defined(MOZ_WIDGET_GTK)
// shut down the x remote proxy window
if (mRemoteService) {
mRemoteService->Shutdown();
}
#endif /* MOZ_ENABLE_XREMOTE */
#endif /* MOZ_WIDGET_GTK */
}

mScopedXPCOM = nullptr;
Expand Down

0 comments on commit e1e9530

Please sign in to comment.