0

Move components/pdf/common/pdf.mojom to pdf/mojom/pdf.mojom.

Actually move the entire components/pdf/common/ directory, as everything
there is to support pdf.mojom. This helps make dependencies always go
from components/pdf/ to pdf/, and not the other way around. The pdf/
directory is the lowest layer of code that uses PdfService from
pdf.mojom, so that is where the mojom file should live. After PPAPI goes
away, it will also be the only user of PdfService.

Along the way, change some GN dependencies on pdf/mojom public, since
pdf/mojom/pdf.mojom.h is often included in header files.

Bug: 1220865
Change-Id: Ia50fcabe4e59280f84d3aa0b562350b9c4f510cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2966319
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#893660}
This commit is contained in:
Lei Zhang
2021-06-18 02:24:19 +00:00
committed by Chromium LUCI CQ
parent a19e62d9e3
commit 2ccd46fe1b
14 changed files with 14 additions and 13 deletions

@ -15,13 +15,15 @@ static_library("browser") {
deps = [
"//base",
"//components/pdf/common:interfaces",
"//content/public/browser",
"//ui/base",
"//ui/touch_selection",
]
public_deps = [ "//ipc" ]
public_deps = [
"//ipc",
"//pdf/mojom",
]
}
if (enable_pdf) {

@ -2,6 +2,7 @@ include_rules = [
"+content/public/browser",
"+extensions/common/constants.h",
"+mojo/public/cpp/bindings",
"+pdf/mojom/pdf.mojom.h",
"+pdf/pdf_features.h",
"+services/network/public/cpp",
"+ui/base",

@ -8,13 +8,13 @@
#include <memory>
#include "base/macros.h"
#include "components/pdf/common/pdf.mojom.h"
#include "content/public/browser/touch_selection_controller_client_manager.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_receiver_set.h"
#include "content/public/browser/web_contents_user_data.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "pdf/mojom/pdf.mojom.h"
#include "ui/touch_selection/selection_event_type.h"
#include "ui/touch_selection/touch_selection_controller.h"
#include "ui/touch_selection/touch_selection_menu_runner.h"

@ -19,7 +19,6 @@ static_library("renderer") {
deps = [
"//base",
"//components/pdf/common:interfaces",
"//components/resources:components_resources",
"//components/resources:components_scaled_resources",
"//components/strings",
@ -40,6 +39,7 @@ static_library("renderer") {
public_deps = [
"//content/public/renderer",
"//pdf/mojom",
"//ui/accessibility",
"//ui/gfx/geometry",
]
@ -51,7 +51,7 @@ source_set("unit_tests") {
deps = [
":renderer",
"//components/pdf/common:interfaces",
"//pdf/mojom",
"//testing/gtest",
]
}

@ -4,9 +4,9 @@ include_rules = [
"+components/strings/grit/components_strings.h",
"+mojo/public/cpp/bindings",
"+pdf/buildflags.h",
"+pdf/mojom/pdf.mojom.h",
"+pdf/pdf_features.h",
"+ppapi",
"+skia/ext",
"+third_party/blink/public",
"+ui/accessibility",
"+ui/base",

@ -13,11 +13,11 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "components/pdf/common/pdf.mojom.h"
#include "ipc/ipc_platform_file.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "pdf/buildflags.h"
#include "pdf/mojom/pdf.mojom.h"
#include "ppapi/c/ppb_image_data.h"
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/host/resource_host.h"

@ -352,7 +352,7 @@ if (enable_pdf) {
public = [ "pdf_view_web_plugin.h" ]
public_deps = [ "//components/pdf/common:interfaces" ]
public_deps = [ "//pdf/mojom" ]
deps = [
":accessibility_structs",

@ -1,6 +1,5 @@
include_rules = [
"+cc/paint",
"+components/pdf/common",
"+content/public/renderer",
"+gin",
"+mojo/core/embedder",

@ -5,7 +5,7 @@
import("//build/config/features.gni")
import("//mojo/public/tools/bindings/mojom.gni")
mojom("interfaces") {
mojom("mojom") {
sources = [ "pdf.mojom" ]
public_deps = [

@ -26,10 +26,10 @@
#include "cc/paint/paint_flags.h"
#include "cc/paint/paint_image.h"
#include "cc/paint/paint_image_builder.h"
#include "components/pdf/common/pdf.mojom.h"
#include "content/public/renderer/render_frame.h"
#include "net/cookies/site_for_cookies.h"
#include "pdf/accessibility_structs.h"
#include "pdf/mojom/pdf.mojom.h"
#include "pdf/parsed_params.h"
#include "pdf/pdf_engine.h"
#include "pdf/pdf_init.h"

@ -10,8 +10,8 @@
#include "base/memory/weak_ptr.h"
#include "cc/paint/paint_image.h"
#include "components/pdf/common/pdf.mojom.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "pdf/mojom/pdf.mojom.h"
#include "pdf/pdf_view_plugin_base.h"
#include "pdf/post_message_receiver.h"
#include "pdf/post_message_sender.h"

@ -4,7 +4,6 @@ include_rules = [
"+components/guest_view/common",
"+components/nacl/common",
"+components/password_manager/content/common",
"+components/pdf/common",
"+components/safe_browsing",
"+components/spellcheck/common",
"+components/subresource_filter",