chromium/chrome/browser/printing/print_preview_data_service.cc

// 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.

#include "chrome/browser/printing/print_preview_data_service.h"

#include <utility>

#include "base/containers/contains.h"
#include "base/dcheck_is_on.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/singleton.h"
#include "build/build_config.h"
#include "printing/print_job_constants.h"
#include "printing/printing_utils.h"

#if BUILDFLAG(IS_WIN)
#include "chrome/browser/printing/xps_features.h"
#endif

// PrintPreviewDataStore stores data for preview workflow and preview printing
// workflow.
//
// NOTE:
//   This class stores a list of PDFs. The list `index` is zero-based and can
// be `printing::COMPLETE_PREVIEW_DOCUMENT_INDEX` to represent complete preview
// document. The PDF stored at `printing::COMPLETE_PREVIEW_DOCUMENT_INDEX` is
// optimized with font subsetting, compression, etc. PDF's stored at all other
// indices are unoptimized.
//
// PrintPreviewDataStore owns the data and is responsible for freeing it when
// either:
//    a) There is a new data.
//    b) When PrintPreviewDataStore is destroyed.
//
class PrintPreviewDataStore {};

// static
PrintPreviewDataService* PrintPreviewDataService::GetInstance() {}

PrintPreviewDataService::PrintPreviewDataService() {}

PrintPreviewDataService::~PrintPreviewDataService() {}

void PrintPreviewDataService::GetDataEntry(
    int32_t preview_ui_id,
    int index,
    scoped_refptr<base::RefCountedMemory>* data_bytes) const {}

void PrintPreviewDataService::SetDataEntry(
    int32_t preview_ui_id,
    int index,
    scoped_refptr<base::RefCountedMemory> data_bytes) {}

void PrintPreviewDataService::RemoveEntry(int32_t preview_ui_id) {}