#include "chrome/browser/ui/webui/print_preview/print_preview_ui_untrusted.h"
#include <memory>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_refptr.h"
#include "base/path_service.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/printing/print_preview_data_service.h"
#include "chrome/browser/ui/webui/print_preview/parse_data_path.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/webui_url_constants.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/common/url_constants.h"
namespace printing {
namespace {
bool ShouldHandleRequestCallback(const std::string& path) { … }
}
PrintPreviewUIUntrustedConfig::PrintPreviewUIUntrustedConfig()
: … { … }
PrintPreviewUIUntrustedConfig::~PrintPreviewUIUntrustedConfig() = default;
PrintPreviewUIUntrusted::PrintPreviewUIUntrusted(content::WebUI* web_ui)
: … { … }
PrintPreviewUIUntrusted::~PrintPreviewUIUntrusted() = default;
scoped_refptr<base::RefCountedMemory>
PrintPreviewUIUntrusted::GetPrintPreviewData(const std::string& path) { … }
void PrintPreviewUIUntrusted::HandleRequestCallback(
const std::string& path,
content::WebUIDataSource::GotDataCallback callback) { … }
scoped_refptr<base::RefCountedMemory>
PrintPreviewUIUntrusted::GetPrintPreviewDataForTest(const std::string& path) { … }
}