mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 651622 - Remove WinCE code from browser/*; r=dolske
This commit is contained in:
parent
f1dbe7df75
commit
7136395d5d
@ -84,7 +84,7 @@ include $(topsrcdir)/config/rules.mk
|
|||||||
else
|
else
|
||||||
# Build a binary bootstrapping with XRE_main
|
# Build a binary bootstrapping with XRE_main
|
||||||
|
|
||||||
ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
|
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
||||||
PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
|
PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||||
else
|
else
|
||||||
PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
|
PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
|
||||||
@ -161,16 +161,8 @@ include $(topsrcdir)/config/config.mk
|
|||||||
ifdef _MSC_VER
|
ifdef _MSC_VER
|
||||||
# Always enter a Windows program through wmain, whether or not we're
|
# Always enter a Windows program through wmain, whether or not we're
|
||||||
# a console application.
|
# a console application.
|
||||||
ifdef WINCE
|
|
||||||
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
|
|
||||||
else
|
|
||||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef WINCE
|
|
||||||
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,corelibc)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef BUILD_STATIC_LIBS
|
ifdef BUILD_STATIC_LIBS
|
||||||
include $(topsrcdir)/config/static-config.mk
|
include $(topsrcdir)/config/static-config.mk
|
||||||
@ -189,7 +181,7 @@ OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 v
|
|||||||
OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
|
OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
ifeq ($(OS_ARCH),WINNT)
|
||||||
RCINCLUDE = splash.rc
|
RCINCLUDE = splash.rc
|
||||||
ifndef GNU_CC
|
ifndef GNU_CC
|
||||||
RCFLAGS += -DMOZ_PHOENIX -I$(srcdir)
|
RCFLAGS += -DMOZ_PHOENIX -I$(srcdir)
|
||||||
@ -248,7 +240,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter-out OS2 WINNT WINCE,$(OS_ARCH)))
|
ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
|
||||||
|
|
||||||
$(MOZ_APP_NAME):: $(topsrcdir)/build/unix/mozilla.in $(GLOBAL_DEPS)
|
$(MOZ_APP_NAME):: $(topsrcdir)/build/unix/mozilla.in $(GLOBAL_DEPS)
|
||||||
cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \
|
cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \
|
||||||
@ -290,13 +282,6 @@ libs::
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef WINCE
|
|
||||||
ifdef MOZ_FASTSTART
|
|
||||||
libs::
|
|
||||||
cp -f $(DIST)/bin/faststartstub.exe $(DIST)/bin/$(MOZ_APP_NAME)faststart.exe
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
libs:: $(srcdir)/profile/prefs.js
|
libs:: $(srcdir)/profile/prefs.js
|
||||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
|
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
|
||||||
|
|
||||||
|
@ -308,12 +308,7 @@ pref("browser.download.saveLinkAsFilenameTimeout", 1000);
|
|||||||
|
|
||||||
pref("browser.download.useDownloadDir", true);
|
pref("browser.download.useDownloadDir", true);
|
||||||
|
|
||||||
#ifdef WINCE
|
|
||||||
pref("browser.download.folderList", 2);
|
|
||||||
pref("browser.download.dir", "\\Storage Card");
|
|
||||||
#else
|
|
||||||
pref("browser.download.folderList", 1);
|
pref("browser.download.folderList", 1);
|
||||||
#endif
|
|
||||||
pref("browser.download.manager.showAlertOnComplete", true);
|
pref("browser.download.manager.showAlertOnComplete", true);
|
||||||
pref("browser.download.manager.showAlertInterval", 2000);
|
pref("browser.download.manager.showAlertInterval", 2000);
|
||||||
pref("browser.download.manager.retention", 2);
|
pref("browser.download.manager.retention", 2);
|
||||||
@ -371,11 +366,7 @@ pref("browser.link.open_newwindow", 3);
|
|||||||
pref("browser.link.open_newwindow.restriction", 2);
|
pref("browser.link.open_newwindow.restriction", 2);
|
||||||
|
|
||||||
// Tabbed browser
|
// Tabbed browser
|
||||||
#ifndef WINCE
|
|
||||||
pref("browser.tabs.autoHide", false);
|
pref("browser.tabs.autoHide", false);
|
||||||
#else
|
|
||||||
pref("browser.tabs.autoHide", true);
|
|
||||||
#endif
|
|
||||||
pref("browser.tabs.closeWindowWithLastTab", true);
|
pref("browser.tabs.closeWindowWithLastTab", true);
|
||||||
pref("browser.tabs.insertRelatedAfterCurrent", true);
|
pref("browser.tabs.insertRelatedAfterCurrent", true);
|
||||||
pref("browser.tabs.warnOnClose", true);
|
pref("browser.tabs.warnOnClose", true);
|
||||||
@ -425,11 +416,6 @@ pref("javascript.options.showInConsole", true);
|
|||||||
pref("general.warnOnAboutConfig", false);
|
pref("general.warnOnAboutConfig", false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WINCE
|
|
||||||
// Set the threshold higher to avoid some slow script warnings
|
|
||||||
pref("dom.max_script_run_time", 20);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// This is the pref to control the location bar, change this to true to
|
// This is the pref to control the location bar, change this to true to
|
||||||
// force this - this makes the origin of popup windows more obvious to avoid
|
// force this - this makes the origin of popup windows more obvious to avoid
|
||||||
// spoofing. We would rather not do it by default because it affects UE for web
|
// spoofing. We would rather not do it by default because it affects UE for web
|
||||||
@ -775,11 +761,7 @@ pref("browser.rights.3.shown", false);
|
|||||||
pref("browser.rights.override", true);
|
pref("browser.rights.override", true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WINCE
|
|
||||||
pref("browser.sessionstore.resume_from_crash", false);
|
|
||||||
#else
|
|
||||||
pref("browser.sessionstore.resume_from_crash", true);
|
pref("browser.sessionstore.resume_from_crash", true);
|
||||||
#endif
|
|
||||||
pref("browser.sessionstore.resume_session_once", false);
|
pref("browser.sessionstore.resume_session_once", false);
|
||||||
|
|
||||||
// minimal interval between two save operations in milliseconds
|
// minimal interval between two save operations in milliseconds
|
||||||
@ -899,39 +881,6 @@ pref("browser.bookmarks.editDialog.firstEditField", "namePicker");
|
|||||||
pref("geo.wifi.uri", "https://www.google.com/loc/json");
|
pref("geo.wifi.uri", "https://www.google.com/loc/json");
|
||||||
pref("geo.wifi.protocol", 0);
|
pref("geo.wifi.protocol", 0);
|
||||||
|
|
||||||
#ifdef WINCE
|
|
||||||
|
|
||||||
// tweak awesomebar -- increase the delay until a search happens.
|
|
||||||
pref("browser.urlbar.delay", 250);
|
|
||||||
|
|
||||||
// disable safe browsing, due to perf hit
|
|
||||||
pref("browser.safebrowsing.enabled", false);
|
|
||||||
pref("browser.safebrowsing.malware.enabled", false);
|
|
||||||
|
|
||||||
// don't check for default browser
|
|
||||||
pref("browser.shell.checkDefaultBrowser", false);
|
|
||||||
|
|
||||||
// disable bfcache for memory
|
|
||||||
pref("browser.sessionhistory.max_total_viewers", 0);
|
|
||||||
|
|
||||||
pref("browser.sessionhistory.optimize_eviction", false);
|
|
||||||
|
|
||||||
// tweak default content sink prefs
|
|
||||||
pref("content.sink.interactive_deflect_count", 10); /* default 0 */
|
|
||||||
pref("content.sink.perf_deflect_count", 50); /* default 200 */
|
|
||||||
pref("content.sink.interactive_parse_time", 5000); /* default 3000 */
|
|
||||||
pref("content.sink.perf_parse_time", 150000); /* default 360000 */
|
|
||||||
pref("content.sink.pending_event_mode", 0); /* default 1 */
|
|
||||||
pref("content.sink.event_probe_rate", 1); /* default 1 */
|
|
||||||
pref("content.sink.interactive_time", 750000); /* default 750000 */
|
|
||||||
pref("content.sink.initial_perf_time", 500000); /* default 2000000 */
|
|
||||||
pref("content.sink.enable_perf_mode", 0); /* default 0; 0 == switch, 1 == stay interactive, 2 == stay perf */
|
|
||||||
|
|
||||||
// Write sessionstore.js less often
|
|
||||||
pref("browser.sessionstore.interval", 60000);
|
|
||||||
|
|
||||||
#endif /* WINCE */
|
|
||||||
|
|
||||||
// Whether to use a panel that looks like an OS X sheet for customization
|
// Whether to use a panel that looks like an OS X sheet for customization
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
pref("toolbar.customization.usesheet", true);
|
pref("toolbar.customization.usesheet", true);
|
||||||
@ -954,7 +903,6 @@ pref("dom.ipc.plugins.enabled", true);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
#ifndef WINCE
|
|
||||||
pref("browser.taskbar.previews.enable", false);
|
pref("browser.taskbar.previews.enable", false);
|
||||||
pref("browser.taskbar.previews.max", 20);
|
pref("browser.taskbar.previews.max", 20);
|
||||||
pref("browser.taskbar.previews.cachetime", 5);
|
pref("browser.taskbar.previews.cachetime", 5);
|
||||||
@ -965,7 +913,6 @@ pref("browser.taskbar.lists.maxListItemCount", 7);
|
|||||||
pref("browser.taskbar.lists.tasks.enabled", true);
|
pref("browser.taskbar.lists.tasks.enabled", true);
|
||||||
pref("browser.taskbar.lists.refreshInSeconds", 120);
|
pref("browser.taskbar.lists.refreshInSeconds", 120);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOZ_SERVICES_SYNC
|
#ifdef MOZ_SERVICES_SYNC
|
||||||
// The sync engines to use.
|
// The sync engines to use.
|
||||||
|
@ -75,10 +75,8 @@ DEFINES += -DHAVE_SHELL_SERVICE=1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||||
ifneq ($(OS_ARCH),WINCE)
|
|
||||||
DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
|
DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (,$(filter windows, $(MOZ_WIDGET_TOOLKIT)))
|
ifneq (,$(filter windows, $(MOZ_WIDGET_TOOLKIT)))
|
||||||
DEFINES += -DCAN_DRAW_IN_TITLEBAR=1
|
DEFINES += -DCAN_DRAW_IN_TITLEBAR=1
|
||||||
|
@ -91,7 +91,6 @@
|
|||||||
accesskey="&sendPageCmd.accesskey;"
|
accesskey="&sendPageCmd.accesskey;"
|
||||||
command="Browser:SendLink"/>
|
command="Browser:SendLink"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
#ifndef WINCE
|
|
||||||
<menuitem id="menu_printSetup"
|
<menuitem id="menu_printSetup"
|
||||||
label="&printSetupCmd.label;"
|
label="&printSetupCmd.label;"
|
||||||
accesskey="&printSetupCmd.accesskey;"
|
accesskey="&printSetupCmd.accesskey;"
|
||||||
@ -114,7 +113,6 @@
|
|||||||
oncommand="BrowserImport();"/>
|
oncommand="BrowserImport();"/>
|
||||||
#ifndef XP_MACOSX
|
#ifndef XP_MACOSX
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
<menuitem id="goOfflineMenuitem"
|
<menuitem id="goOfflineMenuitem"
|
||||||
label="&goOfflineCmd.label;"
|
label="&goOfflineCmd.label;"
|
||||||
|
@ -188,7 +188,6 @@ let gInitialPages = [
|
|||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "Win7Features", function () {
|
XPCOMUtils.defineLazyGetter(this, "Win7Features", function () {
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
#ifndef WINCE
|
|
||||||
const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
|
const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
|
||||||
if (WINTASKBAR_CONTRACTID in Cc &&
|
if (WINTASKBAR_CONTRACTID in Cc &&
|
||||||
Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
|
Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
|
||||||
@ -204,7 +203,6 @@ XPCOMUtils.defineLazyGetter(this, "Win7Features", function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
@ -467,11 +467,7 @@
|
|||||||
|
|
||||||
<toolbox id="navigator-toolbox"
|
<toolbox id="navigator-toolbox"
|
||||||
defaultmode="icons" mode="icons"
|
defaultmode="icons" mode="icons"
|
||||||
#ifdef WINCE
|
|
||||||
defaulticonsize="small" iconsize="small"
|
|
||||||
#else
|
|
||||||
iconsize="large"
|
iconsize="large"
|
||||||
#endif
|
|
||||||
tabsontop="true"
|
tabsontop="true"
|
||||||
persist="tabsontop">
|
persist="tabsontop">
|
||||||
<!-- Menu -->
|
<!-- Menu -->
|
||||||
@ -499,13 +495,8 @@
|
|||||||
<toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
|
<toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
|
||||||
toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
|
toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
|
||||||
fullscreentoolbar="true" mode="icons" customizable="true"
|
fullscreentoolbar="true" mode="icons" customizable="true"
|
||||||
#ifdef WINCE
|
|
||||||
iconsize="small" defaulticonsize="small"
|
|
||||||
defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,navigator-throbber,fullscreenflex,window-controls"
|
|
||||||
#else
|
|
||||||
iconsize="large"
|
iconsize="large"
|
||||||
defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,fullscreenflex,window-controls"
|
defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,fullscreenflex,window-controls"
|
||||||
#endif
|
|
||||||
context="toolbar-context-menu">
|
context="toolbar-context-menu">
|
||||||
|
|
||||||
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
||||||
|
@ -70,17 +70,12 @@ PARALLEL_DIRS = \
|
|||||||
sessionstore \
|
sessionstore \
|
||||||
shell \
|
shell \
|
||||||
sidebar \
|
sidebar \
|
||||||
|
migration \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifndef WINCE
|
|
||||||
PARALLEL_DIRS += migration
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
||||||
ifndef WINCE
|
|
||||||
PARALLEL_DIRS += wintaskbar
|
PARALLEL_DIRS += wintaskbar
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef MOZ_SAFE_BROWSING
|
ifdef MOZ_SAFE_BROWSING
|
||||||
PARALLEL_DIRS += safebrowsing
|
PARALLEL_DIRS += safebrowsing
|
||||||
|
@ -54,13 +54,10 @@ endif
|
|||||||
|
|
||||||
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib)
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib)
|
||||||
|
|
||||||
# migration requires mozreg, which doesn't build on WINCE; only include
|
# migration requires mozreg
|
||||||
# it on non-CE
|
|
||||||
ifndef WINCE
|
|
||||||
LOCAL_INCLUDES += -I$(srcdir)/../migration/src
|
LOCAL_INCLUDES += -I$(srcdir)/../migration/src
|
||||||
SHARED_LIBRARY_LIBS += ../migration/src/$(LIB_PREFIX)migration_s.$(LIB_SUFFIX)
|
SHARED_LIBRARY_LIBS += ../migration/src/$(LIB_PREFIX)migration_s.$(LIB_SUFFIX)
|
||||||
EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX)
|
EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX)
|
||||||
endif
|
|
||||||
|
|
||||||
# This has to come after the above chunk, because mozreg_s has dependencies on
|
# This has to come after the above chunk, because mozreg_s has dependencies on
|
||||||
# stuff in MOZ_COMPONENT_LIBS.
|
# stuff in MOZ_COMPONENT_LIBS.
|
||||||
|
@ -49,8 +49,6 @@
|
|||||||
#include "nsGNOMEShellService.h"
|
#include "nsGNOMEShellService.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
|
|
||||||
#include "nsProfileMigrator.h"
|
#include "nsProfileMigrator.h"
|
||||||
#include "nsDogbertProfileMigrator.h"
|
#include "nsDogbertProfileMigrator.h"
|
||||||
#if !defined(XP_OS2)
|
#if !defined(XP_OS2)
|
||||||
@ -68,8 +66,6 @@
|
|||||||
#include "nsICabProfileMigrator.h"
|
#include "nsICabProfileMigrator.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WINCE
|
|
||||||
|
|
||||||
#include "rdf.h"
|
#include "rdf.h"
|
||||||
#include "nsFeedSniffer.h"
|
#include "nsFeedSniffer.h"
|
||||||
#include "AboutRedirector.h"
|
#include "AboutRedirector.h"
|
||||||
@ -91,8 +87,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
|
|||||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDogbertProfileMigrator)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDogbertProfileMigrator)
|
||||||
#if !defined(XP_OS2)
|
#if !defined(XP_OS2)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
|
||||||
@ -110,8 +104,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsCaminoProfileMigrator)
|
|||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsICabProfileMigrator)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsICabProfileMigrator)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
|
||||||
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrivateBrowsingServiceWrapper, Init)
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrivateBrowsingServiceWrapper, Init)
|
||||||
@ -124,7 +116,6 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
|
|||||||
#endif
|
#endif
|
||||||
NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID);
|
NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID);
|
||||||
NS_DEFINE_NAMED_CID(NS_BROWSER_ABOUT_REDIRECTOR_CID);
|
NS_DEFINE_NAMED_CID(NS_BROWSER_ABOUT_REDIRECTOR_CID);
|
||||||
#ifndef WINCE
|
|
||||||
NS_DEFINE_NAMED_CID(NS_FIREFOX_PROFILEMIGRATOR_CID);
|
NS_DEFINE_NAMED_CID(NS_FIREFOX_PROFILEMIGRATOR_CID);
|
||||||
#if defined(XP_WIN) && !defined(__MINGW32__)
|
#if defined(XP_WIN) && !defined(__MINGW32__)
|
||||||
NS_DEFINE_NAMED_CID(NS_WINIEPROFILEMIGRATOR_CID);
|
NS_DEFINE_NAMED_CID(NS_WINIEPROFILEMIGRATOR_CID);
|
||||||
@ -142,7 +133,6 @@ NS_DEFINE_NAMED_CID(NS_OPERAPROFILEMIGRATOR_CID);
|
|||||||
NS_DEFINE_NAMED_CID(NS_DOGBERTPROFILEMIGRATOR_CID);
|
NS_DEFINE_NAMED_CID(NS_DOGBERTPROFILEMIGRATOR_CID);
|
||||||
NS_DEFINE_NAMED_CID(NS_PHOENIXPROFILEMIGRATOR_CID);
|
NS_DEFINE_NAMED_CID(NS_PHOENIXPROFILEMIGRATOR_CID);
|
||||||
NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEMIGRATOR_CID);
|
NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEMIGRATOR_CID);
|
||||||
#endif /* WINCE */
|
|
||||||
NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
|
NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
|
||||||
|
|
||||||
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
||||||
@ -154,7 +144,6 @@ static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
|||||||
#endif
|
#endif
|
||||||
{ &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
|
{ &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
|
||||||
{ &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
|
{ &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
|
||||||
#ifndef WINCE
|
|
||||||
{ &kNS_FIREFOX_PROFILEMIGRATOR_CID, false, NULL, nsProfileMigratorConstructor },
|
{ &kNS_FIREFOX_PROFILEMIGRATOR_CID, false, NULL, nsProfileMigratorConstructor },
|
||||||
#if defined(XP_WIN) && !defined(__MINGW32__)
|
#if defined(XP_WIN) && !defined(__MINGW32__)
|
||||||
{ &kNS_WINIEPROFILEMIGRATOR_CID, false, NULL, nsIEProfileMigratorConstructor },
|
{ &kNS_WINIEPROFILEMIGRATOR_CID, false, NULL, nsIEProfileMigratorConstructor },
|
||||||
@ -172,7 +161,6 @@ static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
|||||||
{ &kNS_DOGBERTPROFILEMIGRATOR_CID, false, NULL, nsDogbertProfileMigratorConstructor },
|
{ &kNS_DOGBERTPROFILEMIGRATOR_CID, false, NULL, nsDogbertProfileMigratorConstructor },
|
||||||
{ &kNS_PHOENIXPROFILEMIGRATOR_CID, false, NULL, nsPhoenixProfileMigratorConstructor },
|
{ &kNS_PHOENIXPROFILEMIGRATOR_CID, false, NULL, nsPhoenixProfileMigratorConstructor },
|
||||||
{ &kNS_SEAMONKEYPROFILEMIGRATOR_CID, false, NULL, nsSeamonkeyProfileMigratorConstructor },
|
{ &kNS_SEAMONKEYPROFILEMIGRATOR_CID, false, NULL, nsSeamonkeyProfileMigratorConstructor },
|
||||||
#endif /* WINCE */
|
|
||||||
{ &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID, false, NULL, nsPrivateBrowsingServiceWrapperConstructor },
|
{ &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID, false, NULL, nsPrivateBrowsingServiceWrapperConstructor },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
@ -198,7 +186,6 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
|||||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "sync-tabs", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "sync-tabs", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||||
#endif
|
#endif
|
||||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||||
#ifndef WINCE
|
|
||||||
{ NS_PROFILEMIGRATOR_CONTRACTID, &kNS_FIREFOX_PROFILEMIGRATOR_CID },
|
{ NS_PROFILEMIGRATOR_CONTRACTID, &kNS_FIREFOX_PROFILEMIGRATOR_CID },
|
||||||
#if defined(XP_WIN) && !defined(__MINGW32__)
|
#if defined(XP_WIN) && !defined(__MINGW32__)
|
||||||
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "ie", &kNS_WINIEPROFILEMIGRATOR_CID },
|
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "ie", &kNS_WINIEPROFILEMIGRATOR_CID },
|
||||||
@ -216,7 +203,6 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
|||||||
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "dogbert", &kNS_DOGBERTPROFILEMIGRATOR_CID },
|
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "dogbert", &kNS_DOGBERTPROFILEMIGRATOR_CID },
|
||||||
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "phoenix", &kNS_PHOENIXPROFILEMIGRATOR_CID },
|
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "phoenix", &kNS_PHOENIXPROFILEMIGRATOR_CID },
|
||||||
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey", &kNS_SEAMONKEYPROFILEMIGRATOR_CID },
|
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey", &kNS_SEAMONKEYPROFILEMIGRATOR_CID },
|
||||||
#endif /* WINCE */
|
|
||||||
{ NS_PRIVATE_BROWSING_SERVICE_CONTRACTID, &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID },
|
{ NS_PRIVATE_BROWSING_SERVICE_CONTRACTID, &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
@ -370,7 +370,6 @@ BrowserGlue.prototype = {
|
|||||||
// the first browser window has finished initializing
|
// the first browser window has finished initializing
|
||||||
_onFirstWindowLoaded: function BG__onFirstWindowLoaded() {
|
_onFirstWindowLoaded: function BG__onFirstWindowLoaded() {
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
#ifndef WINCE
|
|
||||||
// For windows seven, initialize the jump list module.
|
// For windows seven, initialize the jump list module.
|
||||||
const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
|
const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
|
||||||
if (WINTASKBAR_CONTRACTID in Cc &&
|
if (WINTASKBAR_CONTRACTID in Cc &&
|
||||||
@ -379,26 +378,11 @@ BrowserGlue.prototype = {
|
|||||||
Cu.import("resource://gre/modules/WindowsJumpLists.jsm", temp);
|
Cu.import("resource://gre/modules/WindowsJumpLists.jsm", temp);
|
||||||
temp.WinTaskbarJumpList.startup();
|
temp.WinTaskbarJumpList.startup();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
|
||||||
// profile shutdown handler (contains profile cleanup routines)
|
// profile shutdown handler (contains profile cleanup routines)
|
||||||
_onProfileShutdown: function BG__onProfileShutdown() {
|
_onProfileShutdown: function BG__onProfileShutdown() {
|
||||||
#ifdef MOZ_UPDATER
|
|
||||||
#ifdef WINCE
|
|
||||||
// If there's a pending update, clear cache to free up disk space.
|
|
||||||
try {
|
|
||||||
let um = Cc["@mozilla.org/updates/update-manager;1"].
|
|
||||||
getService(Ci.nsIUpdateManager);
|
|
||||||
if (um.activeUpdate && um.activeUpdate.state == "pending") {
|
|
||||||
let cacheService = Cc["@mozilla.org/network/cache-service;1"].
|
|
||||||
getService(Ci.nsICacheService);
|
|
||||||
cacheService.evictEntries(Ci.nsICache.STORE_ANYWHERE);
|
|
||||||
}
|
|
||||||
} catch (e) { }
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
this._shutdownPlaces();
|
this._shutdownPlaces();
|
||||||
this._sanitizer.onShutdown();
|
this._sanitizer.onShutdown();
|
||||||
},
|
},
|
||||||
|
@ -77,9 +77,7 @@
|
|||||||
<menupopup>
|
<menupopup>
|
||||||
<menuitem label="¢er.label;" value="CENTER"/>
|
<menuitem label="¢er.label;" value="CENTER"/>
|
||||||
<menuitem label="&tile.label;" value="TILE"/>
|
<menuitem label="&tile.label;" value="TILE"/>
|
||||||
#ifndef WINCE
|
|
||||||
<menuitem label="&stretch.label;" value="STRETCH"/>
|
<menuitem label="&stretch.label;" value="STRETCH"/>
|
||||||
#endif
|
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menulist>
|
</menulist>
|
||||||
<spacer flex="1"/>
|
<spacer flex="1"/>
|
||||||
|
@ -47,7 +47,7 @@ XPIDL_MODULE = shellservice
|
|||||||
|
|
||||||
XPIDLSRCS = nsIShellService.idl
|
XPIDLSRCS = nsIShellService.idl
|
||||||
|
|
||||||
ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
|
ifeq ($(OS_ARCH),WINNT)
|
||||||
XPIDLSRCS += nsIWindowsShellService.idl
|
XPIDLSRCS += nsIWindowsShellService.idl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ USE_STATIC_LIBS = 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
|
ifeq ($(OS_ARCH),WINNT)
|
||||||
CPPSRCS = nsWindowsShellService.cpp
|
CPPSRCS = nsWindowsShellService.cpp
|
||||||
else
|
else
|
||||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||||
|
@ -91,11 +91,7 @@
|
|||||||
|
|
||||||
#define NS_TASKBAR_CONTRACTID "@mozilla.org/windows-taskbar;1"
|
#define NS_TASKBAR_CONTRACTID "@mozilla.org/windows-taskbar;1"
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
NS_IMPL_ISUPPORTS2(nsWindowsShellService, nsIWindowsShellService, nsIShellService)
|
NS_IMPL_ISUPPORTS2(nsWindowsShellService, nsIWindowsShellService, nsIShellService)
|
||||||
#else
|
|
||||||
NS_IMPL_ISUPPORTS1(nsWindowsShellService, nsIShellService)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static nsresult
|
static nsresult
|
||||||
OpenKeyForReading(HKEY aKeyRoot, const nsAString& aKeyName, HKEY* aKey)
|
OpenKeyForReading(HKEY aKeyRoot, const nsAString& aKeyName, HKEY* aKey)
|
||||||
@ -115,33 +111,6 @@ OpenKeyForReading(HKEY aKeyRoot, const nsAString& aKeyName, HKEY* aKey)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WINCE
|
|
||||||
static nsresult
|
|
||||||
OpenKeyForWriting(HKEY aStartKey, const nsAString& aKeyName, HKEY* aKey)
|
|
||||||
{
|
|
||||||
const nsString &flatName = PromiseFlatString(aKeyName);
|
|
||||||
|
|
||||||
DWORD dwDisp = 0;
|
|
||||||
DWORD res = ::RegCreateKeyExW(aStartKey, flatName.get(), 0, NULL,
|
|
||||||
0, KEY_READ | KEY_WRITE, NULL, aKey,
|
|
||||||
&dwDisp);
|
|
||||||
switch (res) {
|
|
||||||
case ERROR_SUCCESS:
|
|
||||||
break;
|
|
||||||
case ERROR_ACCESS_DENIED:
|
|
||||||
return NS_ERROR_FILE_ACCESS_DENIED;
|
|
||||||
case ERROR_FILE_NOT_FOUND:
|
|
||||||
res = ::RegCreateKeyExW(aStartKey, flatName.get(), 0, NULL,
|
|
||||||
0, KEY_READ | KEY_WRITE, NULL, aKey,
|
|
||||||
NULL);
|
|
||||||
if (res != ERROR_SUCCESS)
|
|
||||||
return NS_ERROR_FILE_ACCESS_DENIED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Default Browser Registry Settings
|
// Default Browser Registry Settings
|
||||||
//
|
//
|
||||||
@ -217,23 +186,15 @@ typedef struct {
|
|||||||
char* valueData;
|
char* valueData;
|
||||||
} SETTING;
|
} SETTING;
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
#define APP_REG_NAME L"Firefox"
|
#define APP_REG_NAME L"Firefox"
|
||||||
#define CLS_HTML "FirefoxHTML"
|
#define CLS_HTML "FirefoxHTML"
|
||||||
#define CLS_URL "FirefoxURL"
|
#define CLS_URL "FirefoxURL"
|
||||||
#define CPL_DESKTOP L"Control Panel\\Desktop"
|
#define CPL_DESKTOP L"Control Panel\\Desktop"
|
||||||
#define VAL_OPEN "\"%APPPATH%\" -requestPending -osint -url \"%1\""
|
#define VAL_OPEN "\"%APPPATH%\" -requestPending -osint -url \"%1\""
|
||||||
#define VAL_FILE_ICON "%APPPATH%,1"
|
#define VAL_FILE_ICON "%APPPATH%,1"
|
||||||
#else
|
|
||||||
#define CPL_DESKTOP L"ControlPanel\\Desktop"
|
|
||||||
#define VAL_OPEN "\"%APPPATH%\" -osint -url \"%1\""
|
|
||||||
#define VAL_FILE_ICON "%APPPATH%,-2"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DI "\\DefaultIcon"
|
#define DI "\\DefaultIcon"
|
||||||
#define SOP "\\shell\\open\\command"
|
#define SOP "\\shell\\open\\command"
|
||||||
|
|
||||||
|
|
||||||
#define MAKE_KEY_NAME1(PREFIX, MID) \
|
#define MAKE_KEY_NAME1(PREFIX, MID) \
|
||||||
PREFIX MID
|
PREFIX MID
|
||||||
|
|
||||||
@ -243,28 +204,11 @@ typedef struct {
|
|||||||
// Handlers. see http://msdn2.microsoft.com/en-us/library/aa969357.aspx for
|
// Handlers. see http://msdn2.microsoft.com/en-us/library/aa969357.aspx for
|
||||||
// more info.
|
// more info.
|
||||||
static SETTING gSettings[] = {
|
static SETTING gSettings[] = {
|
||||||
#ifndef WINCE
|
|
||||||
// File Handler Class
|
// File Handler Class
|
||||||
{ MAKE_KEY_NAME1(CLS_HTML, SOP), "", VAL_OPEN },
|
{ MAKE_KEY_NAME1(CLS_HTML, SOP), "", VAL_OPEN },
|
||||||
|
|
||||||
// Protocol Handler Class - for Vista and above
|
// Protocol Handler Class - for Vista and above
|
||||||
{ MAKE_KEY_NAME1(CLS_URL, SOP), "", VAL_OPEN },
|
{ MAKE_KEY_NAME1(CLS_URL, SOP), "", VAL_OPEN },
|
||||||
#else
|
|
||||||
{ MAKE_KEY_NAME1("FTP", DI), "", VAL_FILE_ICON },
|
|
||||||
{ MAKE_KEY_NAME1("FTP", SOP), "", VAL_OPEN },
|
|
||||||
|
|
||||||
// File handlers for Windows CE
|
|
||||||
{ MAKE_KEY_NAME1("bmpfile", DI), "", VAL_FILE_ICON },
|
|
||||||
{ MAKE_KEY_NAME1("bmpfile", SOP), "", VAL_OPEN },
|
|
||||||
{ MAKE_KEY_NAME1("giffile", DI), "", VAL_FILE_ICON },
|
|
||||||
{ MAKE_KEY_NAME1("giffile", SOP), "", VAL_OPEN },
|
|
||||||
{ MAKE_KEY_NAME1("jpegfile", DI), "", VAL_FILE_ICON },
|
|
||||||
{ MAKE_KEY_NAME1("jpegfile", SOP), "", VAL_OPEN },
|
|
||||||
{ MAKE_KEY_NAME1("pngfile", DI), "", VAL_FILE_ICON },
|
|
||||||
{ MAKE_KEY_NAME1("pngfile", SOP), "", VAL_OPEN },
|
|
||||||
{ MAKE_KEY_NAME1("htmlfile", DI), "", VAL_FILE_ICON },
|
|
||||||
{ MAKE_KEY_NAME1("htmlfile", SOP), "", VAL_OPEN },
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Protocol Handlers
|
// Protocol Handlers
|
||||||
{ MAKE_KEY_NAME1("HTTP", DI), "", VAL_FILE_ICON },
|
{ MAKE_KEY_NAME1("HTTP", DI), "", VAL_FILE_ICON },
|
||||||
@ -273,7 +217,6 @@ static SETTING gSettings[] = {
|
|||||||
{ MAKE_KEY_NAME1("HTTPS", SOP), "", VAL_OPEN }
|
{ MAKE_KEY_NAME1("HTTPS", SOP), "", VAL_OPEN }
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(WINCE)
|
|
||||||
nsresult
|
nsresult
|
||||||
GetHelperPath(nsAutoString& aPath)
|
GetHelperPath(nsAutoString& aPath)
|
||||||
{
|
{
|
||||||
@ -313,12 +256,10 @@ LaunchHelper(nsAutoString& aPath)
|
|||||||
CloseHandle(pi.hThread);
|
CloseHandle(pi.hThread);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
#endif // !defined(WINCE)
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWindowsShellService::ShortcutMaintenance()
|
nsWindowsShellService::ShortcutMaintenance()
|
||||||
{
|
{
|
||||||
#if !defined(WINCE)
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
// Launch helper.exe so it can update the application user model ids on
|
// Launch helper.exe so it can update the application user model ids on
|
||||||
@ -388,13 +329,8 @@ nsWindowsShellService::ShortcutMaintenance()
|
|||||||
appHelperPath.AppendLiteral(" /UpdateShortcutAppUserModelIds");
|
appHelperPath.AppendLiteral(" /UpdateShortcutAppUserModelIds");
|
||||||
|
|
||||||
return LaunchHelper(appHelperPath);
|
return LaunchHelper(appHelperPath);
|
||||||
#else
|
|
||||||
NS_NOTREACHED("ShortcutMaintenance not implemented on wince!");
|
|
||||||
return NS_OK;
|
|
||||||
#endif // !defined(WINCE)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
PRBool
|
PRBool
|
||||||
nsWindowsShellService::IsDefaultBrowserVista(PRBool* aIsDefaultBrowser)
|
nsWindowsShellService::IsDefaultBrowserVista(PRBool* aIsDefaultBrowser)
|
||||||
{
|
{
|
||||||
@ -418,7 +354,6 @@ nsWindowsShellService::IsDefaultBrowserVista(PRBool* aIsDefaultBrowser)
|
|||||||
#endif
|
#endif
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck,
|
nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck,
|
||||||
@ -439,12 +374,10 @@ nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck,
|
|||||||
if (!::GetModuleFileNameW(0, exePath, MAX_BUF))
|
if (!::GetModuleFileNameW(0, exePath, MAX_BUF))
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
// Convert the path to a long path since GetModuleFileNameW returns the path
|
// Convert the path to a long path since GetModuleFileNameW returns the path
|
||||||
// that was used to launch Firefox which is not necessarily a long path.
|
// that was used to launch Firefox which is not necessarily a long path.
|
||||||
if (!::GetLongPathNameW(exePath, exePath, MAX_BUF))
|
if (!::GetLongPathNameW(exePath, exePath, MAX_BUF))
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
#endif
|
|
||||||
|
|
||||||
nsAutoString appLongPath(exePath);
|
nsAutoString appLongPath(exePath);
|
||||||
|
|
||||||
@ -478,12 +411,10 @@ nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
// Only check if Firefox is the default browser on Vista if the previous
|
// Only check if Firefox is the default browser on Vista if the previous
|
||||||
// checks show that Firefox is the default browser.
|
// checks show that Firefox is the default browser.
|
||||||
if (*aIsDefaultBrowser)
|
if (*aIsDefaultBrowser)
|
||||||
IsDefaultBrowserVista(aIsDefaultBrowser);
|
IsDefaultBrowserVista(aIsDefaultBrowser);
|
||||||
#endif
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -491,7 +422,6 @@ nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck,
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWindowsShellService::SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers)
|
nsWindowsShellService::SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers)
|
||||||
{
|
{
|
||||||
#ifndef WINCE
|
|
||||||
nsAutoString appHelperPath;
|
nsAutoString appHelperPath;
|
||||||
if (NS_FAILED(GetHelperPath(appHelperPath)))
|
if (NS_FAILED(GetHelperPath(appHelperPath)))
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
@ -503,91 +433,8 @@ nsWindowsShellService::SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUs
|
|||||||
}
|
}
|
||||||
|
|
||||||
return LaunchHelper(appHelperPath);
|
return LaunchHelper(appHelperPath);
|
||||||
#else
|
|
||||||
SETTING* settings;
|
|
||||||
SETTING* end = gSettings + sizeof(gSettings)/sizeof(SETTING);
|
|
||||||
|
|
||||||
PRUnichar exePath[MAX_BUF];
|
|
||||||
if (!::GetModuleFileNameW(0, exePath, MAX_BUF))
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
nsAutoString appLongPath(exePath);
|
|
||||||
|
|
||||||
// The .png registry key isn't present by default so also add Content Type.
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".png"), EmptyString(),
|
|
||||||
NS_LITERAL_STRING("pngfile"));
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".png"), NS_LITERAL_STRING("Content Type"),
|
|
||||||
NS_LITERAL_STRING("image/png"));
|
|
||||||
|
|
||||||
// Set these keys to their default value for a clean install in case another
|
|
||||||
// app has changed these keys.
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".htm"), EmptyString(),
|
|
||||||
NS_LITERAL_STRING("htmlfile"));
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".html"), EmptyString(),
|
|
||||||
NS_LITERAL_STRING("htmlfile"));
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".bmp"), EmptyString(),
|
|
||||||
NS_LITERAL_STRING("bmpfile"));
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".gif"), EmptyString(),
|
|
||||||
NS_LITERAL_STRING("giffile"));
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".jpe"), EmptyString(),
|
|
||||||
NS_LITERAL_STRING("jpegfile"));
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".jpg"), EmptyString(),
|
|
||||||
NS_LITERAL_STRING("jpegfile"));
|
|
||||||
SetRegKey(NS_LITERAL_STRING(".jpeg"), EmptyString(),
|
|
||||||
NS_LITERAL_STRING("jpegfile"));
|
|
||||||
|
|
||||||
for (settings = gSettings; settings < end; ++settings) {
|
|
||||||
NS_ConvertUTF8toUTF16 dataLongPath(settings->valueData);
|
|
||||||
NS_ConvertUTF8toUTF16 key(settings->keyName);
|
|
||||||
NS_ConvertUTF8toUTF16 value(settings->valueName);
|
|
||||||
PRInt32 offset = dataLongPath.Find("%APPPATH%");
|
|
||||||
dataLongPath.Replace(offset, 9, appLongPath);
|
|
||||||
SetRegKey(key, value, dataLongPath);
|
|
||||||
}
|
|
||||||
// On Windows CE RegFlushKey can negatively impact performance if there are a
|
|
||||||
// lot of pending writes to the HKEY_CLASSES_ROOT registry hive but it is
|
|
||||||
// necessary to save the values in the case where the user performs a hard
|
|
||||||
// power off of the device.
|
|
||||||
::RegFlushKey(HKEY_CLASSES_ROOT);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WINCE
|
|
||||||
void
|
|
||||||
nsWindowsShellService::SetRegKey(const nsString& aKeyName,
|
|
||||||
const nsString& aValueName,
|
|
||||||
const nsString& aValue)
|
|
||||||
{
|
|
||||||
PRUnichar buf[MAX_BUF];
|
|
||||||
DWORD len = sizeof buf;
|
|
||||||
|
|
||||||
HKEY theKey;
|
|
||||||
nsresult rv = OpenKeyForWriting(HKEY_CLASSES_ROOT, aKeyName, &theKey);
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Get the current value.
|
|
||||||
DWORD res = ::RegQueryValueExW(theKey, PromiseFlatString(aValueName).get(),
|
|
||||||
NULL, NULL, (LPBYTE)buf, &len);
|
|
||||||
|
|
||||||
// Set the new value if it doesn't exist or it is different than the current
|
|
||||||
// value.
|
|
||||||
nsAutoString current(buf);
|
|
||||||
if (REG_FAILED(res) || !current.Equals(aValue)) {
|
|
||||||
const nsString &flatValue = PromiseFlatString(aValue);
|
|
||||||
|
|
||||||
::RegSetValueExW(theKey, PromiseFlatString(aValueName).get(),
|
|
||||||
0, REG_SZ, (const BYTE *)flatValue.get(),
|
|
||||||
(flatValue.Length() + 1) * sizeof(PRUnichar));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close the key we opened.
|
|
||||||
::RegCloseKey(theKey);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWindowsShellService::GetShouldCheckDefaultBrowser(PRBool* aResult)
|
nsWindowsShellService::GetShouldCheckDefaultBrowser(PRBool* aResult)
|
||||||
{
|
{
|
||||||
@ -768,7 +615,6 @@ nsWindowsShellService::SetDesktopBackground(nsIDOMElement* aElement,
|
|||||||
0, NULL, REG_OPTION_NON_VOLATILE,
|
0, NULL, REG_OPTION_NON_VOLATILE,
|
||||||
KEY_WRITE, NULL, &key, &dwDisp);
|
KEY_WRITE, NULL, &key, &dwDisp);
|
||||||
if (REG_SUCCEEDED(res)) {
|
if (REG_SUCCEEDED(res)) {
|
||||||
#ifndef WINCE
|
|
||||||
PRUnichar tile[2], style[2];
|
PRUnichar tile[2], style[2];
|
||||||
switch (aPosition) {
|
switch (aPosition) {
|
||||||
case BACKGROUND_TILE:
|
case BACKGROUND_TILE:
|
||||||
@ -795,25 +641,9 @@ nsWindowsShellService::SetDesktopBackground(nsIDOMElement* aElement,
|
|||||||
0, REG_SZ, (const BYTE *)style, size);
|
0, REG_SZ, (const BYTE *)style, size);
|
||||||
::SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, (PVOID)path.get(),
|
::SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, (PVOID)path.get(),
|
||||||
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
||||||
#else
|
|
||||||
DWORD tile = (aPosition == BACKGROUND_TILE);
|
|
||||||
::RegSetValueExW(key, L"Tile",
|
|
||||||
0, REG_DWORD, (const BYTE *)&tile, sizeof(DWORD));
|
|
||||||
// On WinCE SPI_SETDESKWALLPAPER isn't available, so set the registry
|
|
||||||
// entry ourselves and then broadcast UI change
|
|
||||||
PRInt32 size = (path.Length() + 1) * sizeof(PRUnichar);
|
|
||||||
::RegSetValueExW(key, L"Wallpaper",
|
|
||||||
0, REG_SZ, (const BYTE *)path.get(), size);
|
|
||||||
::SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, NULL, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Close the key we opened.
|
// Close the key we opened.
|
||||||
::RegCloseKey(key);
|
::RegCloseKey(key);
|
||||||
|
|
||||||
#ifdef WINCE
|
|
||||||
// Ensure that the writes are flushed in case of hard reboot
|
|
||||||
::RegFlushKey(HKEY_CURRENT_USER);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
@ -939,9 +769,6 @@ nsWindowsShellService::SetDesktopBackgroundColor(PRUint32 aColor)
|
|||||||
|
|
||||||
::SetSysColors(sizeof(aParameters) / sizeof(int), aParameters, colors);
|
::SetSysColors(sizeof(aParameters) / sizeof(int), aParameters, colors);
|
||||||
|
|
||||||
// SetSysColors is persisting across sessions on Windows CE, so no need to
|
|
||||||
// write to registry
|
|
||||||
#ifndef WINCE
|
|
||||||
PRBool result = PR_FALSE;
|
PRBool result = PR_FALSE;
|
||||||
DWORD dwDisp = 0;
|
DWORD dwDisp = 0;
|
||||||
HKEY key;
|
HKEY key;
|
||||||
@ -963,11 +790,9 @@ nsWindowsShellService::SetDesktopBackgroundColor(PRUint32 aColor)
|
|||||||
|
|
||||||
// Close the key we opened.
|
// Close the key we opened.
|
||||||
::RegCloseKey(key);
|
::RegCloseKey(key);
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWindowsShellService::GetUnreadMailCount(PRUint32* aCount)
|
nsWindowsShellService::GetUnreadMailCount(PRUint32* aCount)
|
||||||
{
|
{
|
||||||
@ -1027,7 +852,6 @@ nsWindowsShellService::GetMailAccountKey(HKEY* aResult)
|
|||||||
::RegCloseKey(mailKey);
|
::RegCloseKey(mailKey);
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWindowsShellService::OpenApplicationWithURI(nsILocalFile* aApplication,
|
nsWindowsShellService::OpenApplicationWithURI(nsILocalFile* aApplication,
|
||||||
|
@ -46,11 +46,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ole2.h>
|
#include <ole2.h>
|
||||||
|
|
||||||
#ifndef WINCE
|
|
||||||
class nsWindowsShellService : public nsIWindowsShellService
|
class nsWindowsShellService : public nsIWindowsShellService
|
||||||
#else
|
|
||||||
class nsWindowsShellService : public nsIShellService
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsWindowsShellService() : mCheckedThisSession(PR_FALSE) {};
|
nsWindowsShellService() : mCheckedThisSession(PR_FALSE) {};
|
||||||
@ -58,20 +54,12 @@ public:
|
|||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSISHELLSERVICE
|
NS_DECL_NSISHELLSERVICE
|
||||||
#ifndef WINCE
|
|
||||||
NS_DECL_NSIWINDOWSSHELLSERVICE
|
NS_DECL_NSIWINDOWSSHELLSERVICE
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifndef WINCE
|
|
||||||
PRBool IsDefaultBrowserVista(PRBool* aIsDefaultBrowser);
|
PRBool IsDefaultBrowserVista(PRBool* aIsDefaultBrowser);
|
||||||
|
|
||||||
PRBool GetMailAccountKey(HKEY* aResult);
|
PRBool GetMailAccountKey(HKEY* aResult);
|
||||||
#else
|
|
||||||
void SetRegKey(const nsString& aKeyName,
|
|
||||||
const nsString& aValueName,
|
|
||||||
const nsString& aValue);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PRBool mCheckedThisSession;
|
PRBool mCheckedThisSession;
|
||||||
|
@ -37,10 +37,8 @@
|
|||||||
@BINPATH@/updater.ini
|
@BINPATH@/updater.ini
|
||||||
@BINPATH@/dictionaries/*
|
@BINPATH@/dictionaries/*
|
||||||
#ifdef XP_WIN32
|
#ifdef XP_WIN32
|
||||||
#ifndef WINCE
|
|
||||||
@BINPATH@/uninstall/helper.exe
|
@BINPATH@/uninstall/helper.exe
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
[xpcom]
|
[xpcom]
|
||||||
@BINPATH@/dependentlibs.list
|
@BINPATH@/dependentlibs.list
|
||||||
@ -62,9 +60,7 @@
|
|||||||
#else
|
#else
|
||||||
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
|
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
|
||||||
#endif
|
#endif
|
||||||
#ifdef WINCE
|
#ifdef XP_WIN32
|
||||||
@BINPATH@/mozce_shunt.dll
|
|
||||||
#elifdef XP_WIN32
|
|
||||||
#ifndef MOZ_MEMORY
|
#ifndef MOZ_MEMORY
|
||||||
#if _MSC_VER == 1400
|
#if _MSC_VER == 1400
|
||||||
@BINPATH@/Microsoft.VC80.CRT.manifest
|
@BINPATH@/Microsoft.VC80.CRT.manifest
|
||||||
@ -200,9 +196,7 @@
|
|||||||
@BINPATH@/components/layout_xul.xpt
|
@BINPATH@/components/layout_xul.xpt
|
||||||
@BINPATH@/components/locale.xpt
|
@BINPATH@/components/locale.xpt
|
||||||
@BINPATH@/components/lwbrk.xpt
|
@BINPATH@/components/lwbrk.xpt
|
||||||
#ifndef WINCE
|
|
||||||
@BINPATH@/components/migration.xpt
|
@BINPATH@/components/migration.xpt
|
||||||
#endif
|
|
||||||
@BINPATH@/components/mimetype.xpt
|
@BINPATH@/components/mimetype.xpt
|
||||||
@BINPATH@/components/mozfind.xpt
|
@BINPATH@/components/mozfind.xpt
|
||||||
@BINPATH@/components/necko_about.xpt
|
@BINPATH@/components/necko_about.xpt
|
||||||
@ -563,25 +557,6 @@ bin/libfreebl_32int64_3.so
|
|||||||
bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
|
bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
; [ActiveX]
|
|
||||||
#ifdef WINCE
|
|
||||||
#ifndef MOZ_NO_ACTIVEX_SUPPORT
|
|
||||||
@BINPATH@/components/nsAxSecurityPolicy.js
|
|
||||||
@BINPATH@/@PREF_DIR@/activex.js
|
|
||||||
@BINPATH@/plugins/npmozax.dll
|
|
||||||
@BINPATH@/plugins/nsIMozAxPlugin.xpt
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
; [FastStart]
|
|
||||||
#ifdef WINCE
|
|
||||||
#ifdef MOZ_FASTSTART
|
|
||||||
@BINPATH@/firefoxfaststart.exe
|
|
||||||
@BINPATH@/components/FastStartup.manifest
|
|
||||||
@BINPATH@/components/FastStartup.js
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
; [OS/2]
|
; [OS/2]
|
||||||
#ifdef XP_OS2
|
#ifdef XP_OS2
|
||||||
@BINPATH@/MozSounds.cmd
|
@BINPATH@/MozSounds.cmd
|
||||||
|
Loading…
Reference in New Issue
Block a user