summaryrefslogtreecommitdiffstats
path: root/src/core/printing/pdf_stream_delegate_qt.h
blob: 47621576f6cd4e891bffa58d4628ef40d5225f2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef PDF_STREAM_DELEGATE_QT_H
#define PDF_STREAM_DELEGATE_QT_H

#include "components/pdf/browser/pdf_stream_delegate.h"

// based on chrome/browser/pdf/chrome_pdf_stream_delegate.h:
class PdfStreamDelegateQt : public pdf::PdfStreamDelegate
{
public:
    PdfStreamDelegateQt();
    PdfStreamDelegateQt(const PdfStreamDelegateQt &) = delete;
    PdfStreamDelegateQt operator=(const PdfStreamDelegateQt &) = delete;
    ~PdfStreamDelegateQt() override;

    // pdf::PdfStreamDelegate:
    absl::optional<GURL> MapToOriginalUrl(content::WebContents *contents, const GURL &stream_url) override;
    absl::optional<StreamInfo> GetStreamInfo(content::WebContents *contents) override;
};

#endif // PDF_STREAM_DELEGATE_QT_H