// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PRINTING_PRINTED_DOCUMENT_H_ #define PRINTING_PRINTED_DOCUMENT_H_ #include <map> #include <memory> #include <string> #include "base/files/file_path.h" #include "base/memory/ref_counted.h" #include "base/synchronization/lock.h" #include "build/build_config.h" #include "printing/mojom/print.mojom.h" #include "printing/print_settings.h" namespace base { class RefCountedMemory; } namespace printing { class MetafilePlayer; class PrintedPage; class PrintingContext; // A collection of rendered pages. The settings are immutable. If the print // settings are changed, a new PrintedDocument must be created. // Warning: May be accessed from many threads at the same time. Only one thread // will have write access. Sensible functions are protected by a lock. // Warning: Once a page is loaded, it cannot be replaced. Pages may be discarded // under low memory conditions. class COMPONENT_EXPORT(PRINTING) PrintedDocument : public base::RefCountedThreadSafe<PrintedDocument> { … }; } // namespace printing #endif // PRINTING_PRINTED_DOCUMENT_H_