0

Create pdf/ppapi_migration directory

Introduces a new directory for temporary code related to the PDF
viewer's PPAPI migration. Code in this directory should abstract away
usage of PPAPI, so it may easily be removed after the migration is done.

Also moves the existing pdf/geometry_conversions.{cc, h} files, as an
early example of the kind of code that should be in this directory.

Bug: 1061182
Change-Id: I01372843f4149a607ef1b6dab80277986c177d4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2261413
Commit-Queue: K Moon <kmoon@chromium.org>
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781536}
This commit is contained in:
K. Moon
2020-06-23 21:18:37 +00:00
committed by Commit Bot
parent 9b2a17c0bb
commit a45eb07cfc
5 changed files with 12 additions and 7 deletions

@ -62,8 +62,6 @@ if (enable_pdf) {
"draw_utils/coordinates.h",
"draw_utils/shadow.cc",
"draw_utils/shadow.h",
"geometry_conversions.cc",
"geometry_conversions.h",
"out_of_process_instance.cc",
"out_of_process_instance.h",
"page_orientation.cc",
@ -77,6 +75,8 @@ if (enable_pdf) {
"pdf_ppapi.cc",
"pdf_transform.cc",
"pdf_transform.h",
"ppapi_migration/geometry_conversions.cc",
"ppapi_migration/geometry_conversions.h",
"preview_mode_client.cc",
"preview_mode_client.h",
"range_set.cc",

@ -9,11 +9,11 @@
#include <utility>
#include "base/strings/string_number_conversions.h"
#include "pdf/geometry_conversions.h"
#include "pdf/pdf_transform.h"
#include "pdf/pdfium/pdfium_engine.h"
#include "pdf/pdfium/pdfium_mem_buffer_file_read.h"
#include "pdf/pdfium/pdfium_mem_buffer_file_write.h"
#include "pdf/ppapi_migration/geometry_conversions.h"
#include "ppapi/c/dev/ppp_printing_dev.h"
#include "ppapi/c/private/ppp_pdf.h"
#include "printing/nup_parameters.h"

@ -0,0 +1,5 @@
# PPAPI migration utilities
This directory contains utilities for bridging from legacy APIs during the PDF
viewer's [migration from Pepper](https://crbug.com/702993). The utilities should
be designed for easy removal once the migration is complete.

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "pdf/geometry_conversions.h"
#include "pdf/ppapi_migration/geometry_conversions.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_size.h"

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef PDF_GEOMETRY_CONVERSIONS_H_
#define PDF_GEOMETRY_CONVERSIONS_H_
#ifndef PDF_PPAPI_MIGRATION_GEOMETRY_CONVERSIONS_H_
#define PDF_PPAPI_MIGRATION_GEOMETRY_CONVERSIONS_H_
struct PP_Rect;
struct PP_Size;
@ -20,4 +20,4 @@ gfx::Size SizeFromPPSize(const PP_Size& pp_size);
} // namespace chrome_pdf
#endif // PDF_GEOMETRY_CONVERSIONS_H_
#endif // PDF_PPAPI_MIGRATION_GEOMETRY_CONVERSIONS_H_