зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1088070 - Rename nsPrintingPromptServiceProxy to nsPrintingProxy. r=smaug.
--HG-- rename : embedding/components/printingui/ipc/nsPrintingPromptServiceProxy.cpp => embedding/components/printingui/ipc/nsPrintingProxy.cpp rename : embedding/components/printingui/ipc/nsPrintingPromptServiceProxy.h => embedding/components/printingui/ipc/nsPrintingProxy.h extra : rebase_source : 73d55966d1b1644f24ef3bfc841fc9fa22b42b48
This commit is contained in:
Родитель
7194b7f247
Коммит
a7e58aee92
|
@ -1544,11 +1544,10 @@ ContentChild::DeallocPNeckoChild(PNeckoChild* necko)
|
||||||
PPrintingChild*
|
PPrintingChild*
|
||||||
ContentChild::AllocPPrintingChild()
|
ContentChild::AllocPPrintingChild()
|
||||||
{
|
{
|
||||||
// The ContentParent should never attempt to allocate the
|
// The ContentParent should never attempt to allocate the nsPrintingProxy,
|
||||||
// nsPrintingPromptServiceProxy, which implements PPrintingChild. Instead,
|
// which implements PPrintingChild. Instead, the nsPrintingProxy service is
|
||||||
// the nsPrintingPromptServiceProxy service is requested and instantiated
|
// requested and instantiated via XPCOM, and the constructor of
|
||||||
// via XPCOM, and the constructor of nsPrintingPromptServiceProxy sets up
|
// nsPrintingProxy sets up the IPC connection.
|
||||||
// the IPC connection.
|
|
||||||
NS_NOTREACHED("Should never get here!");
|
NS_NOTREACHED("Should never get here!");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#ifdef NS_PRINTING
|
#ifdef NS_PRINTING
|
||||||
#include "nsPrintingPromptService.h"
|
#include "nsPrintingPromptService.h"
|
||||||
#include "nsPrintingPromptServiceProxy.h"
|
#include "nsPrintingProxy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock)
|
||||||
#ifdef NS_PRINTING
|
#ifdef NS_PRINTING
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init)
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init)
|
||||||
#ifdef PROXY_PRINTING
|
#ifdef PROXY_PRINTING
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptServiceProxy, Init)
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingProxy, Init)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -70,7 +70,7 @@ static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
|
||||||
#ifdef PROXY_PRINTING
|
#ifdef PROXY_PRINTING
|
||||||
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor,
|
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor,
|
||||||
mozilla::Module::MAIN_PROCESS_ONLY },
|
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||||
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceProxyConstructor,
|
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingProxyConstructor,
|
||||||
mozilla::Module::CONTENT_PROCESS_ONLY },
|
mozilla::Module::CONTENT_PROCESS_ONLY },
|
||||||
#else
|
#else
|
||||||
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor },
|
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor },
|
||||||
|
|
|
@ -10,7 +10,7 @@ EXPORTS.mozilla.embedding.printingui += [
|
||||||
|
|
||||||
if CONFIG['NS_PRINTING']:
|
if CONFIG['NS_PRINTING']:
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
'nsPrintingPromptServiceProxy.cpp',
|
'nsPrintingProxy.cpp',
|
||||||
'PrintDataUtils.cpp',
|
'PrintDataUtils.cpp',
|
||||||
'PrintingParent.cpp',
|
'PrintingParent.cpp',
|
||||||
'PrintProgressDialogChild.cpp',
|
'PrintProgressDialogChild.cpp',
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "nsIDocShellTreeOwner.h"
|
#include "nsIDocShellTreeOwner.h"
|
||||||
#include "nsIPrintingPromptService.h"
|
#include "nsIPrintingPromptService.h"
|
||||||
#include "nsPIDOMWindow.h"
|
#include "nsPIDOMWindow.h"
|
||||||
#include "nsPrintingPromptServiceProxy.h"
|
#include "nsPrintingProxy.h"
|
||||||
#include "nsPrintOptionsImpl.h"
|
#include "nsPrintOptionsImpl.h"
|
||||||
#include "PrintDataUtils.h"
|
#include "PrintDataUtils.h"
|
||||||
#include "PrintProgressDialogChild.h"
|
#include "PrintProgressDialogChild.h"
|
||||||
|
@ -20,25 +20,25 @@ using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
using namespace mozilla::embedding;
|
using namespace mozilla::embedding;
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(nsPrintingPromptServiceProxy, nsIPrintingPromptService)
|
NS_IMPL_ISUPPORTS(nsPrintingProxy, nsIPrintingPromptService)
|
||||||
|
|
||||||
nsPrintingPromptServiceProxy::nsPrintingPromptServiceProxy()
|
nsPrintingProxy::nsPrintingProxy()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nsPrintingPromptServiceProxy::~nsPrintingPromptServiceProxy()
|
nsPrintingProxy::~nsPrintingProxy()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsPrintingPromptServiceProxy::Init()
|
nsPrintingProxy::Init()
|
||||||
{
|
{
|
||||||
mozilla::unused << ContentChild::GetSingleton()->SendPPrintingConstructor(this);
|
mozilla::unused << ContentChild::GetSingleton()->SendPPrintingConstructor(this);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsPrintingPromptServiceProxy::ShowPrintDialog(nsIDOMWindow *parent,
|
nsPrintingProxy::ShowPrintDialog(nsIDOMWindow *parent,
|
||||||
nsIWebBrowserPrint *webBrowserPrint,
|
nsIWebBrowserPrint *webBrowserPrint,
|
||||||
nsIPrintSettings *printSettings)
|
nsIPrintSettings *printSettings)
|
||||||
{
|
{
|
||||||
|
@ -86,7 +86,7 @@ nsPrintingPromptServiceProxy::ShowPrintDialog(nsIDOMWindow *parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsPrintingPromptServiceProxy::ShowProgress(nsIDOMWindow* parent,
|
nsPrintingProxy::ShowProgress(nsIDOMWindow* parent,
|
||||||
nsIWebBrowserPrint* webBrowserPrint, // ok to be null
|
nsIWebBrowserPrint* webBrowserPrint, // ok to be null
|
||||||
nsIPrintSettings* printSettings, // ok to be null
|
nsIPrintSettings* printSettings, // ok to be null
|
||||||
nsIObserver* openDialogObserver, // ok to be null
|
nsIObserver* openDialogObserver, // ok to be null
|
||||||
|
@ -129,7 +129,7 @@ nsPrintingPromptServiceProxy::ShowProgress(nsIDOMWindow* parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsPrintingPromptServiceProxy::ShowPageSetup(nsIDOMWindow *parent,
|
nsPrintingProxy::ShowPageSetup(nsIDOMWindow *parent,
|
||||||
nsIPrintSettings *printSettings,
|
nsIPrintSettings *printSettings,
|
||||||
nsIObserver *aObs)
|
nsIObserver *aObs)
|
||||||
{
|
{
|
||||||
|
@ -137,7 +137,7 @@ nsPrintingPromptServiceProxy::ShowPageSetup(nsIDOMWindow *parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsPrintingPromptServiceProxy::ShowPrinterProperties(nsIDOMWindow *parent,
|
nsPrintingProxy::ShowPrinterProperties(nsIDOMWindow *parent,
|
||||||
const char16_t *printerName,
|
const char16_t *printerName,
|
||||||
nsIPrintSettings *printSettings)
|
nsIPrintSettings *printSettings)
|
||||||
{
|
{
|
||||||
|
@ -145,21 +145,21 @@ nsPrintingPromptServiceProxy::ShowPrinterProperties(nsIDOMWindow *parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
PPrintProgressDialogChild*
|
PPrintProgressDialogChild*
|
||||||
nsPrintingPromptServiceProxy::AllocPPrintProgressDialogChild()
|
nsPrintingProxy::AllocPPrintProgressDialogChild()
|
||||||
{
|
{
|
||||||
// The parent process will never initiate the PPrintProgressDialog
|
// The parent process will never initiate the PPrintProgressDialog
|
||||||
// protocol connection, so no need to provide an allocator here.
|
// protocol connection, so no need to provide an allocator here.
|
||||||
NS_NOTREACHED("Allocator for PPrintProgressDialogChild should not be "
|
NS_NOTREACHED("Allocator for PPrintProgressDialogChild should not be "
|
||||||
"called on nsPrintingPromptServiceProxy.");
|
"called on nsPrintingProxy.");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
nsPrintingPromptServiceProxy::DeallocPPrintProgressDialogChild(PPrintProgressDialogChild* aActor)
|
nsPrintingProxy::DeallocPPrintProgressDialogChild(PPrintProgressDialogChild* aActor)
|
||||||
{
|
{
|
||||||
// The parent process will never initiate the PPrintProgressDialog
|
// The parent process will never initiate the PPrintProgressDialog
|
||||||
// protocol connection, so no need to provide an deallocator here.
|
// protocol connection, so no need to provide an deallocator here.
|
||||||
NS_NOTREACHED("Deallocator for PPrintProgressDialogChild should not be "
|
NS_NOTREACHED("Deallocator for PPrintProgressDialogChild should not be "
|
||||||
"called on nsPrintingPromptServiceProxy.");
|
"called on nsPrintingProxy.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
|
@ -3,19 +3,19 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef __nsPrintingPromptServiceProxy_h
|
#ifndef __nsPrintingProxy_h
|
||||||
#define __nsPrintingPromptServiceProxy_h
|
#define __nsPrintingProxy_h
|
||||||
|
|
||||||
#include "nsIPrintingPromptService.h"
|
#include "nsIPrintingPromptService.h"
|
||||||
#include "mozilla/embedding/PPrintingChild.h"
|
#include "mozilla/embedding/PPrintingChild.h"
|
||||||
|
|
||||||
class nsPrintingPromptServiceProxy: public nsIPrintingPromptService,
|
class nsPrintingProxy: public nsIPrintingPromptService,
|
||||||
public mozilla::embedding::PPrintingChild
|
public mozilla::embedding::PPrintingChild
|
||||||
{
|
{
|
||||||
virtual ~nsPrintingPromptServiceProxy();
|
virtual ~nsPrintingProxy();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
nsPrintingPromptServiceProxy();
|
nsPrintingProxy();
|
||||||
|
|
||||||
nsresult Init();
|
nsresult Init();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче