X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fprinting%2Fprinting_context_no_system_dialog.cc;h=7ae10ddaad06a6f15e326d087809ee3a801b4813;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=4768e4d3a3d65ffce2285fb8631bbc593dc0ad98;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/printing/printing_context_no_system_dialog.cc b/src/printing/printing_context_no_system_dialog.cc index 4768e4d..7ae10dd 100644 --- a/src/printing/printing_context_no_system_dialog.cc +++ b/src/printing/printing_context_no_system_dialog.cc @@ -15,13 +15,13 @@ namespace printing { // static -PrintingContext* PrintingContext::Create(const std::string& app_locale) { - return static_cast( - new PrintingContextNoSystemDialog(app_locale)); +scoped_ptr PrintingContext::Create(Delegate* delegate) { + return make_scoped_ptr( + new PrintingContextNoSystemDialog(delegate)); } -PrintingContextNoSystemDialog::PrintingContextNoSystemDialog( - const std::string& app_locale) : PrintingContext(app_locale) { +PrintingContextNoSystemDialog::PrintingContextNoSystemDialog(Delegate* delegate) + : PrintingContext(delegate) { } PrintingContextNoSystemDialog::~PrintingContextNoSystemDialog() { @@ -29,7 +29,6 @@ PrintingContextNoSystemDialog::~PrintingContextNoSystemDialog() { } void PrintingContextNoSystemDialog::AskUserForSettings( - gfx::NativeView parent_view, int max_pages, bool has_selection, const PrintSettingsCallback& callback) { @@ -54,7 +53,8 @@ gfx::Size PrintingContextNoSystemDialog::GetPdfPaperSizeDeviceUnits() { int32_t width = 0; int32_t height = 0; UErrorCode error = U_ZERO_ERROR; - ulocdata_getPaperSize(app_locale_.c_str(), &height, &width, &error); + ulocdata_getPaperSize( + delegate_->GetAppLocale().c_str(), &height, &width, &error); if (error > U_ZERO_ERROR) { // If the call failed, assume a paper size of 8.5 x 11 inches. LOG(WARNING) << "ulocdata_getPaperSize failed, using 8.5 x 11, error: " @@ -75,7 +75,9 @@ gfx::Size PrintingContextNoSystemDialog::GetPdfPaperSizeDeviceUnits() { } PrintingContext::Result PrintingContextNoSystemDialog::UpdatePrinterSettings( - bool external_preview) { + bool external_preview, + bool show_system_dialog) { + DCHECK(!show_system_dialog); if (settings_.dpi() == 0) UseDefaultSettings();