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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
|
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/ui.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/repack.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
static_library("webui_examples_lib") {
testonly = true
sources = [
"app/mac_init.h",
"app/mac_init.mm",
"app/main_delegate.cc",
"app/main_delegate.h",
"browser/browser_context.cc",
"browser/browser_context.h",
"browser/browser_main_parts.cc",
"browser/browser_main_parts.h",
"browser/content_browser_client.cc",
"browser/content_browser_client.h",
"browser/devtools/devtools_frontend.cc",
"browser/devtools/devtools_frontend.h",
"browser/devtools/devtools_manager_delegate.cc",
"browser/devtools/devtools_manager_delegate.h",
"browser/devtools/devtools_server.cc",
"browser/devtools/devtools_server.h",
"browser/ui/web/browser.cc",
"browser/ui/web/browser.h",
"browser/ui/web/browser_page_handler.cc",
"browser/ui/web/browser_page_handler.h",
"browser/ui/web/webui.cc",
"browser/ui/web/webui.h",
"browser/webui_controller_factory.cc",
"browser/webui_controller_factory.h",
"common/content_client.cc",
"common/content_client.h",
"renderer/content_renderer_client.cc",
"renderer/content_renderer_client.h",
"renderer/render_frame_observer.cc",
"renderer/render_frame_observer.h",
]
deps = [
":browser_mojo_bindings",
":pak",
":resources_grit",
"resources/browser:resources",
"//base",
"//chrome/browser/resources/webui_gallery:resources",
"//components/embedder_support:user_agent",
"//components/guest_contents/browser",
"//components/guest_contents/renderer",
"//content/public/app",
"//content/public/browser",
"//content/public/renderer",
"//ipc",
"//mojo/public/cpp/bindings",
"//net",
"//third_party/blink/public:blink",
"//ui/base",
"//ui/display",
"//ui/platform_window",
"//ui/webui",
"//url",
"//v8:v8_headers",
]
data_deps = [ "//tools/v8_context_snapshot" ]
if (use_aura) {
sources += [
"browser/browser_main_parts_aura.cc",
"browser/ui/aura/aura_context.cc",
"browser/ui/aura/aura_context.h",
"browser/ui/aura/content_window.cc",
"browser/ui/aura/content_window.h",
"browser/ui/aura/fill_layout.cc",
"browser/ui/aura/fill_layout.h",
]
deps += [
"//ui/aura",
"//ui/aura:test_support",
"//ui/wm",
"//ui/wm/public",
]
}
if (is_mac) {
sources += [
"browser/browser_main_parts_mac.mm",
"browser/ui/cocoa/content_ns_window.h",
"browser/ui/cocoa/content_ns_window.mm",
]
frameworks = [
"AppKit.framework",
"Cocoa.framework",
]
}
}
grit("resources") {
testonly = true
source = "resources/webui_examples_resources.grd"
outputs = [
"grit/webui_examples_resources.h",
"webui_examples_resources.pak",
]
}
repack("pak") {
testonly = true
sources = [
"$root_gen_dir/chrome/webui_gallery_resources.pak",
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_100_percent.pak",
"$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak",
"$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
"$root_gen_dir/ui/strings/ui_strings_en-US.pak",
"$root_gen_dir/ui/webui/examples/resources/browser/webui_examples_browser_resources.pak",
"$root_gen_dir/ui/webui/resources/webui_resources.pak",
"$target_gen_dir/webui_examples_resources.pak",
]
deps = [
":resources",
"resources/browser:resources",
"//chrome/browser/resources/webui_gallery:resources",
"//content/browser/devtools:devtools_resources",
"//mojo/public/js:resources",
"//third_party/blink/public:devtools_inspector_resources",
"//third_party/blink/public:resources",
"//third_party/blink/public:scaled_resources_100_percent",
"//ui/strings",
"//ui/webui/resources",
]
output = "$root_out_dir/webui_examples.pak"
}
mojom("browser_mojo_bindings") {
sources = [ "browser/ui/web/browser.mojom" ]
public_deps = [
"//mojo/public/mojom/base",
"//url/mojom:url_mojom_gurl",
]
webui_module_path = "/"
}
executable("webui_examples") {
testonly = true
sources = [ "app/main.cc" ]
deps = [
":webui_examples_lib",
"//base",
"//content/public/app",
]
if (is_win) {
configs += [ "//build/config/win:windowed" ]
deps += [
"//build/win:default_exe_manifest",
"//content:sandbox_helper_win",
"//sandbox/win:sandbox",
]
}
if (is_mac) {
deps += [ "//sandbox/mac:seatbelt" ]
}
}
|