[mojo] Make HTML viewer load the blink resources from the generated pak file.
[chromium-blink-merge.git] / mojo / services / html_viewer / BUILD.gn
blob7537cafc310feac9b9c8b00438ac8b536d3f080f
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//mojo/public/mojo.gni")
6 import("//mojo/public/mojo_application.gni")
8 action("generate_blink_resource_map") {
9   script = "//mojo/services/html_viewer/generate_blink_resource_map.py"
10   args = [
11     "--pak-file",
12     rebase_path("$root_out_dir/gen/blink/public/resources/blink_resources.pak"),
13     "--header",
14     rebase_path("$target_gen_dir/blink_resource_map.h"),
15     "--cpp",
16     rebase_path("$target_gen_dir/blink_resource_map.cc"),
17   ]
18   outputs = [
19     "$target_gen_dir/blink_resource_map.cc",
20     "$target_gen_dir/blink_resource_map.h",
21   ]
22   public_deps = [
23     "//third_party/WebKit/public:resources",
24   ]
27 source_set("lib") {
28   sources = [
29     "$target_gen_dir/blink_resource_map.cc",
30     "$target_gen_dir/blink_resource_map.h",
31     "ax_provider_impl.cc",
32     "ax_provider_impl.h",
33     "blink_basic_type_converters.cc",
34     "blink_basic_type_converters.h",
35     "blink_input_events_type_converters.cc",
36     "blink_input_events_type_converters.h",
37     "blink_platform_impl.cc",
38     "blink_platform_impl.h",
39     "blink_resource_constants.h",
40     "blink_url_request_type_converters.cc",
41     "blink_url_request_type_converters.h",
42     "html_document.cc",
43     "html_document.h",
44     "mojo_blink_platform_impl.cc",
45     "mojo_blink_platform_impl.h",
46     "webclipboard_impl.cc",
47     "webclipboard_impl.h",
48     "webcookiejar_impl.cc",
49     "webcookiejar_impl.h",
50     "webmediaplayer_factory.cc",
51     "webmediaplayer_factory.h",
52     "webmimeregistry_impl.cc",
53     "webmimeregistry_impl.h",
54     "websockethandle_impl.cc",
55     "websockethandle_impl.h",
56     "webstoragenamespace_impl.cc",
57     "webstoragenamespace_impl.h",
58     "webthemeengine_impl.cc",
59     "webthemeengine_impl.h",
60     "webthread_impl.cc",
61     "webthread_impl.h",
62     "weburlloader_impl.cc",
63     "weburlloader_impl.h",
64     "weblayertreeview_impl.cc",
65     "weblayertreeview_impl.h",
66   ]
68   include_dirs = [ "third_party/WebKit" ]
70   deps = [
71     "//base",
72     "//base/third_party/dynamic_annotations",
73     "//cc",
74     "//cc/blink",
75     "//cc/surfaces",
76     "//gin",
77     "//media",
78     "//media/blink",
79     "//media/mojo",
80     "//mojo/application",
81     "//mojo/cc",
82     "//mojo/common",
83     "//mojo/converters/surfaces",
84     "//mojo/public/c/system:for_shared_library",
85     "//mojo/public/cpp/utility",
86     "//mojo/public/interfaces/application",
87     "//mojo/services/network/public/cpp",
88     "//mojo/services/view_manager/public/cpp",
89     "//mojo/services/accessibility/public/interfaces",
90     "//mojo/services/clipboard/public/interfaces",
91     "//mojo/services/content_handler/public/interfaces",
92     "//mojo/services/gpu/public/interfaces",
93     "//mojo/services/input_events/public/interfaces",
94     "//mojo/services/navigation/public/interfaces",
95     "//mojo/services/network/public/interfaces",
96     "//mojo/services/surfaces/public/interfaces",
97     "//net",
98     "//skia",
99     "//ui/native_theme",
100     "//url",
101   ]
103   public_deps = [
104     "//mojo/public/cpp/bindings",
105     "//third_party/WebKit/public:blink",
106     ":generate_blink_resource_map",
107   ]
110 mojo_native_application("html_viewer") {
111   sources = [
112     "html_viewer.cc",
113   ]
114   deps = [
115     ":lib",
116   ]
119 test("tests") {
120   output_name = "html_viewer_unittests"
121   sources = [
122     "ax_provider_impl_unittest.cc",
123   ]
124   deps = [
125     ":lib",
126     "//base/test:run_all_unittests",
127   ]