mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset a1c1f919b5b8 (bug 1088070)
This commit is contained in:
parent
c3dd8e3003
commit
f6512f020c
@ -1544,10 +1544,11 @@ ContentChild::DeallocPNeckoChild(PNeckoChild* necko)
|
||||
PPrintingChild*
|
||||
ContentChild::AllocPPrintingChild()
|
||||
{
|
||||
// The ContentParent should never attempt to allocate the nsPrintingProxy,
|
||||
// which implements PPrintingChild. Instead, the nsPrintingProxy service is
|
||||
// requested and instantiated via XPCOM, and the constructor of
|
||||
// nsPrintingProxy sets up the IPC connection.
|
||||
// The ContentParent should never attempt to allocate the
|
||||
// nsPrintingPromptServiceProxy, which implements PPrintingChild. Instead,
|
||||
// the nsPrintingPromptServiceProxy service is requested and instantiated
|
||||
// via XPCOM, and the constructor of nsPrintingPromptServiceProxy sets up
|
||||
// the IPC connection.
|
||||
NS_NOTREACHED("Should never get here!");
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#ifdef NS_PRINTING
|
||||
#include "nsPrintingPromptService.h"
|
||||
#include "nsPrintingProxy.h"
|
||||
#include "nsPrintingPromptServiceProxy.h"
|
||||
#endif
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock)
|
||||
#ifdef NS_PRINTING
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init)
|
||||
#ifdef PROXY_PRINTING
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingProxy, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptServiceProxy, Init)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@ -70,7 +70,7 @@ static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
|
||||
#ifdef PROXY_PRINTING
|
||||
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor,
|
||||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingProxyConstructor,
|
||||
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceProxyConstructor,
|
||||
mozilla::Module::CONTENT_PROCESS_ONLY },
|
||||
#else
|
||||
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor },
|
||||
|
@ -10,7 +10,7 @@ EXPORTS.mozilla.embedding.printingui += [
|
||||
|
||||
if CONFIG['NS_PRINTING']:
|
||||
UNIFIED_SOURCES += [
|
||||
'nsPrintingProxy.cpp',
|
||||
'nsPrintingPromptServiceProxy.cpp',
|
||||
'PrintDataUtils.cpp',
|
||||
'PrintingParent.cpp',
|
||||
'PrintProgressDialogChild.cpp',
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIPrintingPromptService.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsPrintingProxy.h"
|
||||
#include "nsPrintingPromptServiceProxy.h"
|
||||
#include "nsPrintOptionsImpl.h"
|
||||
#include "PrintDataUtils.h"
|
||||
#include "PrintProgressDialogChild.h"
|
||||
@ -20,27 +20,27 @@ using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::embedding;
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsPrintingProxy, nsIPrintingPromptService)
|
||||
NS_IMPL_ISUPPORTS(nsPrintingPromptServiceProxy, nsIPrintingPromptService)
|
||||
|
||||
nsPrintingProxy::nsPrintingProxy()
|
||||
nsPrintingPromptServiceProxy::nsPrintingPromptServiceProxy()
|
||||
{
|
||||
}
|
||||
|
||||
nsPrintingProxy::~nsPrintingProxy()
|
||||
nsPrintingPromptServiceProxy::~nsPrintingPromptServiceProxy()
|
||||
{
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPrintingProxy::Init()
|
||||
nsPrintingPromptServiceProxy::Init()
|
||||
{
|
||||
mozilla::unused << ContentChild::GetSingleton()->SendPPrintingConstructor(this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintingProxy::ShowPrintDialog(nsIDOMWindow *parent,
|
||||
nsIWebBrowserPrint *webBrowserPrint,
|
||||
nsIPrintSettings *printSettings)
|
||||
nsPrintingPromptServiceProxy::ShowPrintDialog(nsIDOMWindow *parent,
|
||||
nsIWebBrowserPrint *webBrowserPrint,
|
||||
nsIPrintSettings *printSettings)
|
||||
{
|
||||
NS_ENSURE_ARG(parent);
|
||||
NS_ENSURE_ARG(webBrowserPrint);
|
||||
@ -86,14 +86,14 @@ nsPrintingProxy::ShowPrintDialog(nsIDOMWindow *parent,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintingProxy::ShowProgress(nsIDOMWindow* parent,
|
||||
nsIWebBrowserPrint* webBrowserPrint, // ok to be null
|
||||
nsIPrintSettings* printSettings, // ok to be null
|
||||
nsIObserver* openDialogObserver, // ok to be null
|
||||
bool isForPrinting,
|
||||
nsIWebProgressListener** webProgressListener,
|
||||
nsIPrintProgressParams** printProgressParams,
|
||||
bool* notifyOnOpen)
|
||||
nsPrintingPromptServiceProxy::ShowProgress(nsIDOMWindow* parent,
|
||||
nsIWebBrowserPrint* webBrowserPrint, // ok to be null
|
||||
nsIPrintSettings* printSettings, // ok to be null
|
||||
nsIObserver* openDialogObserver, // ok to be null
|
||||
bool isForPrinting,
|
||||
nsIWebProgressListener** webProgressListener,
|
||||
nsIPrintProgressParams** printProgressParams,
|
||||
bool* notifyOnOpen)
|
||||
{
|
||||
NS_ENSURE_ARG(parent);
|
||||
NS_ENSURE_ARG(webProgressListener);
|
||||
@ -129,37 +129,37 @@ nsPrintingProxy::ShowProgress(nsIDOMWindow* parent,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintingProxy::ShowPageSetup(nsIDOMWindow *parent,
|
||||
nsIPrintSettings *printSettings,
|
||||
nsIObserver *aObs)
|
||||
nsPrintingPromptServiceProxy::ShowPageSetup(nsIDOMWindow *parent,
|
||||
nsIPrintSettings *printSettings,
|
||||
nsIObserver *aObs)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintingProxy::ShowPrinterProperties(nsIDOMWindow *parent,
|
||||
const char16_t *printerName,
|
||||
nsIPrintSettings *printSettings)
|
||||
nsPrintingPromptServiceProxy::ShowPrinterProperties(nsIDOMWindow *parent,
|
||||
const char16_t *printerName,
|
||||
nsIPrintSettings *printSettings)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
PPrintProgressDialogChild*
|
||||
nsPrintingProxy::AllocPPrintProgressDialogChild()
|
||||
nsPrintingPromptServiceProxy::AllocPPrintProgressDialogChild()
|
||||
{
|
||||
// The parent process will never initiate the PPrintProgressDialog
|
||||
// protocol connection, so no need to provide an allocator here.
|
||||
NS_NOTREACHED("Allocator for PPrintProgressDialogChild should not be "
|
||||
"called on nsPrintingProxy.");
|
||||
"called on nsPrintingPromptServiceProxy.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
nsPrintingProxy::DeallocPPrintProgressDialogChild(PPrintProgressDialogChild* aActor)
|
||||
nsPrintingPromptServiceProxy::DeallocPPrintProgressDialogChild(PPrintProgressDialogChild* aActor)
|
||||
{
|
||||
// The parent process will never initiate the PPrintProgressDialog
|
||||
// protocol connection, so no need to provide an deallocator here.
|
||||
NS_NOTREACHED("Deallocator for PPrintProgressDialogChild should not be "
|
||||
"called on nsPrintingProxy.");
|
||||
"called on nsPrintingPromptServiceProxy.");
|
||||
return false;
|
||||
}
|
@ -3,19 +3,19 @@
|
||||
* 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/. */
|
||||
|
||||
#ifndef __nsPrintingProxy_h
|
||||
#define __nsPrintingProxy_h
|
||||
#ifndef __nsPrintingPromptServiceProxy_h
|
||||
#define __nsPrintingPromptServiceProxy_h
|
||||
|
||||
#include "nsIPrintingPromptService.h"
|
||||
#include "mozilla/embedding/PPrintingChild.h"
|
||||
|
||||
class nsPrintingProxy: public nsIPrintingPromptService,
|
||||
public mozilla::embedding::PPrintingChild
|
||||
class nsPrintingPromptServiceProxy: public nsIPrintingPromptService,
|
||||
public mozilla::embedding::PPrintingChild
|
||||
{
|
||||
virtual ~nsPrintingProxy();
|
||||
virtual ~nsPrintingPromptServiceProxy();
|
||||
|
||||
public:
|
||||
nsPrintingProxy();
|
||||
nsPrintingPromptServiceProxy();
|
||||
|
||||
nsresult Init();
|
||||
|
Loading…
Reference in New Issue
Block a user