Bug 1655463 - Convert callers of nsIWindowWatcher.openWindow to use const nsACString&. rs=bustage-fix DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D85103

--HG--
extra : rebase_source : a5e62155ba25c3a49b1fd0aadc6936b67d7b7958
extra : amend_source : fd5e668c657d860ba1daf39665c7c9e24a811c1e
This commit is contained in:
Geoff Lankow 2020-07-28 15:27:12 +12:00
Родитель 60e930023a
Коммит 306ca78c3d
8 изменённых файлов: 36 добавлений и 28 удалений

Просмотреть файл

@ -29,8 +29,8 @@
NS_IMPL_ISUPPORTS(nsProfileMigrator, nsIProfileMigrator) NS_IMPL_ISUPPORTS(nsProfileMigrator, nsIProfileMigrator)
#define MIGRATION_WIZARD_FE_URL \ #define MIGRATION_WIZARD_FE_URL \
"chrome://messenger/content/migration/migration.xhtml" "chrome://messenger/content/migration/migration.xhtml"_ns
#define MIGRATION_WIZARD_FE_FEATURES "chrome,dialog,modal,centerscreen" #define MIGRATION_WIZARD_FE_FEATURES "chrome,dialog,modal,centerscreen"_ns
NS_IMETHODIMP NS_IMETHODIMP
nsProfileMigrator::Migrate(nsIProfileStartup* aStartup, const nsACString& aKey, nsProfileMigrator::Migrate(nsIProfileStartup* aStartup, const nsACString& aKey,
@ -57,7 +57,7 @@ nsProfileMigrator::Migrate(nsIProfileStartup* aStartup, const nsACString& aKey,
params->AppendElement(aStartup); params->AppendElement(aStartup);
nsCOMPtr<mozIDOMWindowProxy> migrateWizard; nsCOMPtr<mozIDOMWindowProxy> migrateWizard;
return ww->OpenWindow(nullptr, MIGRATION_WIZARD_FE_URL, "_blank", return ww->OpenWindow(nullptr, MIGRATION_WIZARD_FE_URL, "_blank"_ns,
MIGRATION_WIZARD_FE_FEATURES, params, MIGRATION_WIZARD_FE_FEATURES, params,
getter_AddRefs(migrateWizard)); getter_AddRefs(migrateWizard));
} }

Просмотреть файл

@ -78,7 +78,7 @@ NS_IMETHODIMP nsMessengerBootstrap::OpenMessengerWindowWithUri(
// we need to use the "mailnews.reuse_thread_window2" pref // we need to use the "mailnews.reuse_thread_window2" pref
// to determine if we should open a new window, or use an existing one. // to determine if we should open a new window, or use an existing one.
nsCOMPtr<mozIDOMWindowProxy> newWindow; nsCOMPtr<mozIDOMWindowProxy> newWindow;
return wwatch->OpenWindow(0, chromeUrl.get(), "_blank", return wwatch->OpenWindow(0, chromeUrl, "_blank"_ns,
"chrome,all,dialog=no", argsArray, "chrome,all,dialog=no"_ns, argsArray,
getter_AddRefs(newWindow)); getter_AddRefs(newWindow));
} }

Просмотреть файл

@ -85,7 +85,8 @@ nsresult nsMessengerContentHandler::OpenWindow(nsIURI* aURI) {
if (!wwatch) return NS_ERROR_FAILURE; if (!wwatch) return NS_ERROR_FAILURE;
nsCOMPtr<mozIDOMWindowProxy> newWindow; nsCOMPtr<mozIDOMWindowProxy> newWindow;
return wwatch->OpenWindow(0, "chrome://messenger/content/messageWindow.xhtml", return wwatch->OpenWindow(
"_blank", "all,chrome,dialog=no,status,toolbar", 0, "chrome://messenger/content/messageWindow.xhtml"_ns, "_blank"_ns,
aURI, getter_AddRefs(newWindow)); "all,chrome,dialog=no,status,toolbar"_ns, aURI,
getter_AddRefs(newWindow));
} }

Просмотреть файл

@ -98,8 +98,8 @@ static void openMailWindow(const nsCString& aUri) {
// bug 507593 is implemented. // bug 507593 is implemented.
#ifdef MOZ_SUITE #ifdef MOZ_SUITE
nsCOMPtr<mozIDOMWindowProxy> newWindow; nsCOMPtr<mozIDOMWindowProxy> newWindow;
wwatch->OpenWindow(0, "chrome://messenger/content/messageWindow.xhtml", "_blank", wwatch->OpenWindow(0, "chrome://messenger/content/messageWindow.xhtml"_ns, "_blank"_ns,
"all,chrome,dialog=no,status,toolbar", msgUri, "all,chrome,dialog=no,status,toolbar"_ns, msgUri,
getter_AddRefs(newWindow)); getter_AddRefs(newWindow));
#else #else
nsCOMPtr<nsIMessenger> messenger(do_CreateInstance(NS_MESSENGER_CONTRACTID, &rv)); nsCOMPtr<nsIMessenger> messenger(do_CreateInstance(NS_MESSENGER_CONTRACTID, &rv));
@ -109,8 +109,8 @@ static void openMailWindow(const nsCString& aUri) {
messenger->MsgHdrFromURI(aUri, getter_AddRefs(msgHdr)); messenger->MsgHdrFromURI(aUri, getter_AddRefs(msgHdr));
if (msgHdr) { if (msgHdr) {
nsCOMPtr<mozIDOMWindowProxy> newWindow; nsCOMPtr<mozIDOMWindowProxy> newWindow;
wwatch->OpenWindow(0, "chrome://messenger/content/messageWindow.xhtml", "_blank", wwatch->OpenWindow(0, "chrome://messenger/content/messageWindow.xhtml"_ns, "_blank"_ns,
"all,chrome,dialog=no,status,toolbar", msgHdr, "all,chrome,dialog=no,status,toolbar"_ns, msgHdr,
getter_AddRefs(newWindow)); getter_AddRefs(newWindow));
} }
#endif #endif

Просмотреть файл

@ -50,7 +50,7 @@
#include "mozilla/Services.h" #include "mozilla/Services.h"
#include "mozilla/mailnews/MimeHeaderParser.h" #include "mozilla/mailnews/MimeHeaderParser.h"
#define ALERT_CHROME_URL "chrome://messenger/content/newmailalert.xhtml" #define ALERT_CHROME_URL "chrome://messenger/content/newmailalert.xhtml"_ns
#define NEW_MAIL_ALERT_ICON "chrome://messenger/skin/icons/new-mail-alert.png" #define NEW_MAIL_ALERT_ICON "chrome://messenger/skin/icons/new-mail-alert.png"
#define SHOW_ALERT_PREF "mail.biff.show_alert" #define SHOW_ALERT_PREF "mail.biff.show_alert"
#define SHOW_ALERT_PREVIEW_LENGTH "mail.biff.alert.preview_length" #define SHOW_ALERT_PREVIEW_LENGTH "mail.biff.alert.preview_length"
@ -366,9 +366,9 @@ nsresult nsMessengerUnixIntegration::ShowNewAlertNotification(
nsCOMPtr<mozIDOMWindowProxy> newWindow; nsCOMPtr<mozIDOMWindowProxy> newWindow;
mAlertInProgress = true; mAlertInProgress = true;
rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank", rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank"_ns,
"chrome,dialog=yes,titlebar=no,popup=yes", argsArray, "chrome,dialog=yes,titlebar=no,popup=yes"_ns,
getter_AddRefs(newWindow)); argsArray, getter_AddRefs(newWindow));
if (NS_FAILED(rv)) AlertFinished(); if (NS_FAILED(rv)) AlertFinished();

Просмотреть файл

@ -60,7 +60,7 @@
#define MAIL_COMMANDLINE_ARG u" -mail" #define MAIL_COMMANDLINE_ARG u" -mail"
#define IDI_MAILBIFF 32576 #define IDI_MAILBIFF 32576
#define UNREAD_UPDATE_INTERVAL (20 * 1000) // 20 seconds #define UNREAD_UPDATE_INTERVAL (20 * 1000) // 20 seconds
#define ALERT_CHROME_URL "chrome://messenger/content/newmailalert.xhtml" #define ALERT_CHROME_URL "chrome://messenger/content/newmailalert.xhtml"_ns
#define NEW_MAIL_ALERT_ICON "chrome://messenger/skin/icons/new-mail-alert.png" #define NEW_MAIL_ALERT_ICON "chrome://messenger/skin/icons/new-mail-alert.png"
#define SHOW_ALERT_PREF "mail.biff.show_alert" #define SHOW_ALERT_PREF "mail.biff.show_alert"
#define SHOW_TRAY_ICON_PREF "mail.biff.show_tray_icon" #define SHOW_TRAY_ICON_PREF "mail.biff.show_tray_icon"
@ -510,8 +510,8 @@ nsresult nsMessengerWinIntegration::ShowNewAlertNotification(
nsCOMPtr<nsIWindowWatcher> wwatch( nsCOMPtr<nsIWindowWatcher> wwatch(
do_GetService(NS_WINDOWWATCHER_CONTRACTID)); do_GetService(NS_WINDOWWATCHER_CONTRACTID));
nsCOMPtr<mozIDOMWindowProxy> newWindow; nsCOMPtr<mozIDOMWindowProxy> newWindow;
rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank", rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank"_ns,
"chrome,dialog=yes,titlebar=no,popup=yes", "chrome,dialog=yes,titlebar=no,popup=yes"_ns,
argsArray, getter_AddRefs(newWindow)); argsArray, getter_AddRefs(newWindow));
mAlertInProgress = true; mAlertInProgress = true;

Просмотреть файл

@ -72,7 +72,7 @@
#endif #endif
#define DEFAULT_CHROME \ #define DEFAULT_CHROME \
"chrome://messenger/content/messengercompose/messengercompose.xhtml" "chrome://messenger/content/messengercompose/messengercompose.xhtml"_ns
#define PREF_MAILNEWS_REPLY_QUOTING_SELECTION "mailnews.reply_quoting_selection" #define PREF_MAILNEWS_REPLY_QUOTING_SELECTION "mailnews.reply_quoting_selection"
#define PREF_MAILNEWS_REPLY_QUOTING_SELECTION_MULTI_WORD \ #define PREF_MAILNEWS_REPLY_QUOTING_SELECTION_MULTI_WORD \
@ -177,8 +177,14 @@ nsMsgComposeService::OpenComposeWindowWithParams(const char* chrome,
msgParamsWrapper->SetDataIID(&NS_GET_IID(nsIMsgComposeParams)); msgParamsWrapper->SetDataIID(&NS_GET_IID(nsIMsgComposeParams));
nsCOMPtr<mozIDOMWindowProxy> newWindow; nsCOMPtr<mozIDOMWindowProxy> newWindow;
rv = wwatch->OpenWindow(0, chrome && *chrome ? chrome : DEFAULT_CHROME, nsAutoCString chromeURL;
"_blank", "all,chrome,dialog=no,status,toolbar", if (chrome && *chrome) {
chromeURL = nsDependentCString(chrome);
} else {
chromeURL = DEFAULT_CHROME;
}
rv = wwatch->OpenWindow(0, chromeURL, "_blank"_ns,
"all,chrome,dialog=no,status,toolbar"_ns,
msgParamsWrapper, getter_AddRefs(newWindow)); msgParamsWrapper, getter_AddRefs(newWindow));
return rv; return rv;
@ -1388,8 +1394,8 @@ nsMsgComposeService::Handle(nsICommandLine* aCmdLine) {
if (arg) arg->SetData(uristr); if (arg) arg->SetData(uristr);
nsCOMPtr<mozIDOMWindowProxy> opened; nsCOMPtr<mozIDOMWindowProxy> opened;
wwatch->OpenWindow(nullptr, DEFAULT_CHROME, "_blank", wwatch->OpenWindow(nullptr, DEFAULT_CHROME, "_blank"_ns,
"chrome,dialog=no,all", arg, getter_AddRefs(opened)); "chrome,dialog=no,all"_ns, arg, getter_AddRefs(opened));
aCmdLine->SetPreventDefault(true); aCmdLine->SetPreventDefault(true);
} }

Просмотреть файл

@ -1526,8 +1526,8 @@ nsNntpService::Handle(nsICommandLine* aCmdLine) {
nsCOMPtr<mozIDOMWindowProxy> opened; nsCOMPtr<mozIDOMWindowProxy> opened;
wwatch->OpenWindow( wwatch->OpenWindow(
nullptr, "chrome://messenger/content/messenger.xhtml", "_blank", nullptr, "chrome://messenger/content/messenger.xhtml"_ns, "_blank"_ns,
"chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar"_ns,
nullptr, getter_AddRefs(opened)); nullptr, getter_AddRefs(opened));
aCmdLine->SetPreventDefault(true); aCmdLine->SetPreventDefault(true);
} }
@ -1596,8 +1596,9 @@ nsNntpService::HandleContent(const char* aContentType,
nsCOMPtr<mozIDOMWindowProxy> newWindow; nsCOMPtr<mozIDOMWindowProxy> newWindow;
rv = wwatcher->OpenWindow( rv = wwatcher->OpenWindow(
nullptr, "chrome://messenger/content/messenger.xhtml", "_blank", nullptr, "chrome://messenger/content/messenger.xhtml"_ns,
"chome,all,dialog=no", arg, getter_AddRefs(newWindow)); "_blank"_ns, "chome,all,dialog=no"_ns, arg,
getter_AddRefs(newWindow));
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
} }
} }