cef/libcef/utility/printing_handler.h
Marshall Greenblatt 2ba756d3e1 Update to Chromium revision b0aa1fb5 (#296183).
- Restore CefRenderHandler::OnScrollOffsetChanged.
- Add new RT_PING and RT_SERVICE_WORKER resource type values.
- The resource type for image sub-resource loads has changed from RT_IMAGE to RT_PREFETCH (this is a regression, see http://crbug.com/415253#c23).
- Add a patch to fix a crash in Scheduler::swapQueuesRunPendingTasks* (http://crbug.com/415478).
- Add documentation for cef_key_event_type_t values.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1846 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-09-26 23:48:19 +00:00

58 lines
1.6 KiB
C++

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef LIBCEF_UTILITY_PRINTING_HANDLER_H_
#define LIBCEF_UTILITY_PRINTING_HANDLER_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "chrome/utility/utility_message_handler.h"
#include "ipc/ipc_platform_file.h"
#include "printing/pdf_render_settings.h"
#if !defined(OS_WIN)
#error "Must be building on Windows."
#endif
namespace printing {
class PdfRenderSettings;
struct PwgRasterSettings;
struct PageRange;
}
// Dispatches IPCs for printing.
class PrintingHandler : public UtilityMessageHandler {
public:
PrintingHandler();
virtual ~PrintingHandler();
static void PreSandboxStartup();
// IPC::Listener:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
// IPC message handlers.
#if defined(OS_WIN)
void OnRenderPDFPagesToMetafile(IPC::PlatformFileForTransit pdf_transit,
const printing::PdfRenderSettings& settings);
void OnRenderPDFPagesToMetafileGetPage(
int page_number,
IPC::PlatformFileForTransit output_file);
void OnRenderPDFPagesToMetafileStop();
int LoadPDF(base::File pdf_file);
bool RenderPdfPageToMetafile(int page_number,
base::File output_file,
double* scale_factor);
std::vector<char> pdf_data_;
printing::PdfRenderSettings pdf_rendering_settings_;
#endif // defined(OS_WIN)
DISALLOW_COPY_AND_ASSIGN(PrintingHandler);
};
#endif // LIBCEF_UTILITY_PRINTING_HANDLER_H_