diff options
author | Pale Moon <git-repo@palemoon.org> | 2017-01-02 17:15:45 +0100 |
---|---|---|
committer | Pale Moon <git-repo@palemoon.org> | 2017-01-02 17:15:45 +0100 |
commit | fe4797de943f1f9350a332e4baa8b181b5062f7b (patch) | |
tree | 1f6758fd50b2ee977655c00d5a37277ecf2375f6 /toolkit/components | |
parent | c2e68c5c2591116dbd0e7da0aadf9f27dd910dc7 (diff) | |
download | palemoon-gre-fe4797de943f1f9350a332e4baa8b181b5062f7b.tar.gz |
Remove Windows Metro/WinRT code.
Diffstat (limited to 'toolkit/components')
-rw-r--r-- | toolkit/components/crashmonitor/CrashMonitor.jsm | 11 | ||||
-rw-r--r-- | toolkit/components/downloads/nsDownloadManager.cpp | 7 | ||||
-rw-r--r-- | toolkit/components/jsdownloads/src/DownloadIntegration.jsm | 8 | ||||
-rw-r--r-- | toolkit/components/startup/nsAppStartup.cpp | 22 | ||||
-rw-r--r-- | toolkit/components/startup/nsAppStartup.h | 1 | ||||
-rw-r--r-- | toolkit/components/startup/public/nsIAppStartup.idl | 18 |
6 files changed, 7 insertions, 60 deletions
diff --git a/toolkit/components/crashmonitor/CrashMonitor.jsm b/toolkit/components/crashmonitor/CrashMonitor.jsm index 17e0ddfb7..b23508c61 100644 --- a/toolkit/components/crashmonitor/CrashMonitor.jsm +++ b/toolkit/components/crashmonitor/CrashMonitor.jsm @@ -84,13 +84,9 @@ let CrashMonitorInternal = { * Path to checkpoint file. * * Each time a new notification is received, this file is written to - * disc to reflect the information in |checkpoints|. Although Firefox for - * Desktop and Metro share the same profile, they need to keep record of - * crashes separately. + * disc to reflect the information in |checkpoints|. */ - path: (Services.metro && Services.metro.immersive) ? - OS.Path.join(OS.Constants.Path.profileDir, "metro", "sessionCheckpoints.json"): - OS.Path.join(OS.Constants.Path.profileDir, "sessionCheckpoints.json"), + path: OS.Path.join(OS.Constants.Path.profileDir, "sessionCheckpoints.json"), /** * Load checkpoints from previous session asynchronously. @@ -178,9 +174,6 @@ this.CrashMonitor = { ); CrashMonitorInternal.initialized = true; - if (Services.metro && Services.metro.immersive) { - OS.File.makeDir(OS.Path.join(OS.Constants.Path.profileDir, "metro")); - } return promise; }, diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp index df256a0cb..8c63f1392 100644 --- a/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp @@ -947,13 +947,8 @@ nsDownloadManager::Init() // When MOZ_JSDOWNLOADS is undefined, we still check the preference that can // be used to enable the JavaScript API during the migration process. mUseJSTransfer = Preferences::GetBool(PREF_BD_USEJSTRANSFER, false); -#elif defined(XP_WIN) - // When MOZ_JSDOWNLOADS is defined on Windows, this component is disabled - // unless we are running in Windows Metro. The conversion of Windows Metro - // to use the JavaScript API for downloads is tracked in bug 906042. - mUseJSTransfer = !IsRunningInWindowsMetro(); #else - mUseJSTransfer = true; + mUseJSTransfer = true; #endif if (mUseJSTransfer) diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm index 7e9a6348f..2ed769371 100644 --- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm +++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm @@ -457,13 +457,7 @@ this.DownloadIntegration = { #elifdef MOZ_WIDGET_GONK directoryPath = yield this.getSystemDownloadsDirectory(); #else - // For Metro mode on Windows 8, we want searchability for documents - // that the user chose to open with an external application. - if (Services.metro && Services.metro.immersive) { - directoryPath = yield this.getSystemDownloadsDirectory(); - } else { - directoryPath = this._getDirectory("TmpD"); - } + directoryPath = this._getDirectory("TmpD"); #endif throw new Task.Result(directoryPath); }.bind(this)); diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp index 5b32ebcf4..629240add 100644 --- a/toolkit/components/startup/nsAppStartup.cpp +++ b/toolkit/components/startup/nsAppStartup.cpp @@ -143,7 +143,6 @@ nsAppStartup::nsAppStartup() : mInterrupted(false), mIsSafeModeNecessary(false), mStartupCrashTrackingEnded(false), - mRestartTouchEnvironment(false), mRestartNotSameProfile(false) { } @@ -284,9 +283,7 @@ nsAppStartup::Run(void) } nsresult retval = NS_OK; - if (mRestartTouchEnvironment) { - retval = NS_SUCCESS_RESTART_METRO_APP; - } else if (mRestart) { + if (mRestart) { retval = NS_SUCCESS_RESTART_APP; } else if (mRestartNotSameProfile) { retval = NS_SUCCESS_RESTART_APP_NOT_SAME_PROFILE; @@ -384,17 +381,12 @@ nsAppStartup::Quit(uint32_t aMode) gRestartMode = (aMode & 0xF0); } - if (!mRestartTouchEnvironment) { - mRestartTouchEnvironment = (aMode & eRestartTouchEnvironment) != 0; - gRestartMode = (aMode & 0xF0); - } - if (!mRestartNotSameProfile) { mRestartNotSameProfile = (aMode & eRestartNotSameProfile) != 0; gRestartMode = (aMode & 0xF0); } - if (mRestart || mRestartTouchEnvironment || mRestartNotSameProfile) { + if (mRestart || mRestartNotSameProfile) { // Mark the next startup as a restart. PR_SetEnv("MOZ_APP_RESTART=1"); @@ -464,7 +456,7 @@ nsAppStartup::Quit(uint32_t aMode) NS_NAMED_LITERAL_STRING(shutdownStr, "shutdown"); NS_NAMED_LITERAL_STRING(restartStr, "restart"); obsService->NotifyObservers(nullptr, "quit-application", - (mRestart || mRestartTouchEnvironment || mRestartNotSameProfile) ? + (mRestart || mRestartNotSameProfile) ? restartStr.get() : shutdownStr.get()); } @@ -591,14 +583,6 @@ nsAppStartup::GetWasRestarted(bool *aResult) } NS_IMETHODIMP -nsAppStartup::GetRestartingTouchEnvironment(bool *aResult) -{ - NS_ENSURE_ARG_POINTER(aResult); - *aResult = mRestartTouchEnvironment; - return NS_OK; -} - -NS_IMETHODIMP nsAppStartup::SetInterrupted(bool aInterrupted) { mInterrupted = aInterrupted; diff --git a/toolkit/components/startup/nsAppStartup.h b/toolkit/components/startup/nsAppStartup.h index 7b586040c..7f8b9bd61 100644 --- a/toolkit/components/startup/nsAppStartup.h +++ b/toolkit/components/startup/nsAppStartup.h @@ -62,7 +62,6 @@ private: bool mInterrupted; // Was startup interrupted by an interactive prompt? bool mIsSafeModeNecessary; // Whether safe mode is necessary bool mStartupCrashTrackingEnded; // Whether startup crash tracking has already ended - bool mRestartTouchEnvironment; // Quit (eRestartTouchEnvironment) bool mRestartNotSameProfile; // Quit(eRestartNotSameProfile) #if defined(XP_WIN) diff --git a/toolkit/components/startup/public/nsIAppStartup.idl b/toolkit/components/startup/public/nsIAppStartup.idl index 8edf6b026..b6c899798 100644 --- a/toolkit/components/startup/public/nsIAppStartup.idl +++ b/toolkit/components/startup/public/nsIAppStartup.idl @@ -32,11 +32,6 @@ interface nsIAppStartup : nsISupports * This return code indicates that the application should be * restarted because quit was called with the eRestart flag. - * @returnCode NS_SUCCESS_RESTART_METRO_APP - * This return code indicates that the application should be - * restarted in metro because quit was called with the - * eRestartTouchEnviroment flag. - * @returnCode NS_SUCCESS_RESTART_APP_NOT_SAME_PROFILE * This return code indicates that the application should be * restarted without necessarily using the same profile because @@ -133,13 +128,6 @@ interface nsIAppStartup : nsISupports const uint32_t eRestartx86_64 = 0x40; /** - * Restart the application in a touch-optimized environment (such as Metro) - * after quitting. The application will be restarted with the same profile - * and an empty command line. - */ - const uint32_t eRestartTouchEnvironment = 0x80; - - /** * Restart the application after quitting. The application will be * restarted with an empty command line and the normal profile selection * process will take place on startup. @@ -185,12 +173,6 @@ interface nsIAppStartup : nsISupports */ readonly attribute boolean wasRestarted; - /** - * True if the application is being restarted in a touch-optimized - * environment (such as Metro). - */ - readonly attribute boolean restartingTouchEnvironment; - /** * Returns an object with main, process, firstPaint, sessionRestored properties. * Properties may not be available depending on platform or application |