1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# 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.
assert(!is_ios)
import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
# GYP version: components/dom_distiller.gypi:dom_distiller_mojo_bindings
mojom("mojo_bindings") {
sources = [
"common/distiller_javascript_service.mojom",
"common/distiller_page_notifier_service.mojom",
]
}
# GYP version: components/dom_distiller.gypi:dom_distiller_content_browser
static_library("content_browser") {
sources = [
"browser/distillable_page_utils.cc",
"browser/distillable_page_utils.h",
"browser/distiller_javascript_service_impl.cc",
"browser/distiller_javascript_service_impl.h",
"browser/distiller_javascript_utils.cc",
"browser/distiller_javascript_utils.h",
"browser/distiller_page_web_contents.cc",
"browser/distiller_page_web_contents.h",
"browser/distiller_ui_handle.h",
"browser/dom_distiller_viewer_source.cc",
"browser/dom_distiller_viewer_source.h",
"browser/web_contents_main_frame_observer.cc",
"browser/web_contents_main_frame_observer.h",
]
public_deps = [
"//components/dom_distiller/core",
"//content/public/browser",
]
deps = [
":mojo_bindings",
"//base",
"//components/resources",
"//components/strings",
"//content/public/browser",
"//content/public/common",
"//mojo/environment:chromium",
"//net",
"//skia",
"//sync",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/WebKit/public:blink_headers",
"//ui/base",
"//ui/gfx",
"//url",
]
if (is_android) {
sources += [
"browser/distillable_page_utils_android.cc",
"browser/distillable_page_utils_android.h",
]
deps += [ ":jni_headers" ]
}
}
# GYP version: components/dom_distiller.gypi:dom_distiller_content_renderer
static_library("content_renderer") {
sources = [
"renderer/distiller_js_render_frame_observer.cc",
"renderer/distiller_js_render_frame_observer.h",
"renderer/distiller_native_javascript.cc",
"renderer/distiller_native_javascript.h",
"renderer/distiller_page_notifier_service_impl.cc",
"renderer/distiller_page_notifier_service_impl.h",
]
deps = [
":mojo_bindings",
"//base",
"//content/public/common",
"//content/public/renderer",
"//gin",
"//mojo/environment:chromium",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/WebKit/public:blink_headers",
"//v8",
]
}
if (is_android) {
import("//build/config/android/rules.gni")
generate_jni("jni_headers") {
sources = [
"../android/java/src/org/chromium/components/dom_distiller/content/DistillablePageUtils.java",
]
jni_package = "dom_distiller_content"
}
}
source_set("unit_tests") {
testonly = true
sources = [
"browser/dom_distiller_viewer_source_unittest.cc",
"browser/web_contents_main_frame_observer_unittest.cc",
]
deps = [
":content_browser",
"//content/test:test_support",
"//testing/gtest",
]
}
|