1 // Copyright 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "printing/printed_document.h"
7 #include "base/logging.h"
8 #include "printing/printing_context_android.h"
12 bool PrintedDocument::RenderPrintedDocument(PrintingContext* context) {
15 if (context->NewPage() != PrintingContext::OK)
18 base::AutoLock lock(lock_);
19 const MetafilePlayer* metafile = GetMetafile();
21 static_cast<PrintingContextAndroid*>(context)->PrintDocument(*metafile);
23 return context->PageDone() == PrintingContext::OK;
26 } // namespace printing