michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #include "nsPrintOptionsAndroid.h" michael@0: michael@0: #include "nsPrintSettingsImpl.h" michael@0: michael@0: class nsPrintSettingsAndroid : public nsPrintSettings { michael@0: public: michael@0: nsPrintSettingsAndroid() michael@0: { michael@0: // The aim here is to set up the objects enough that silent printing works michael@0: SetOutputFormat(nsIPrintSettings::kOutputFormatPDF); michael@0: SetPrinterName(MOZ_UTF16("PDF printer")); michael@0: michael@0: } michael@0: }; michael@0: michael@0: nsPrintOptionsAndroid::nsPrintOptionsAndroid() michael@0: { michael@0: } michael@0: michael@0: nsPrintOptionsAndroid::~nsPrintOptionsAndroid() michael@0: { michael@0: } michael@0: michael@0: NS_IMETHODIMP nsPrintOptionsAndroid::CreatePrintSettings(nsIPrintSettings **_retval) michael@0: { michael@0: nsPrintSettings * printSettings = new nsPrintSettingsAndroid(); michael@0: NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY); michael@0: NS_ADDREF(*_retval = printSettings); michael@0: (void)InitPrintSettingsFromPrefs(*_retval, false, michael@0: nsIPrintSettings::kInitSaveAll); michael@0: return NS_OK; michael@0: }