mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 16:26:10 +03:00
330 lines
9.2 KiB
Plaintext
330 lines
9.2 KiB
Plaintext
|
# Copyright 2015 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.
|
||
|
|
||
|
import("//build/config/ui.gni")
|
||
|
import("//chromecast/chromecast.gni")
|
||
|
import("//media/media_options.gni")
|
||
|
import("//services/service_manager/public/service_manifest.gni")
|
||
|
import("//testing/test.gni")
|
||
|
import("//tools/grit/grit_rule.gni")
|
||
|
|
||
|
if (is_android) {
|
||
|
import("//build/config/android/rules.gni")
|
||
|
}
|
||
|
|
||
|
cast_source_set("browser") {
|
||
|
sources = [
|
||
|
"cast_browser_context.cc",
|
||
|
"cast_browser_context.h",
|
||
|
"cast_browser_main_parts.cc",
|
||
|
"cast_browser_main_parts.h",
|
||
|
"cast_browser_process.cc",
|
||
|
"cast_browser_process.h",
|
||
|
"cast_content_browser_client.cc",
|
||
|
"cast_content_browser_client.h",
|
||
|
"cast_content_window.h",
|
||
|
"cast_download_manager_delegate.cc",
|
||
|
"cast_download_manager_delegate.h",
|
||
|
"cast_http_user_agent_settings.cc",
|
||
|
"cast_http_user_agent_settings.h",
|
||
|
"cast_media_blocker.cc",
|
||
|
"cast_media_blocker.h",
|
||
|
"cast_net_log.cc",
|
||
|
"cast_net_log.h",
|
||
|
"cast_network_delegate.cc",
|
||
|
"cast_network_delegate.h",
|
||
|
"cast_permission_manager.cc",
|
||
|
"cast_permission_manager.h",
|
||
|
"cast_quota_permission_context.cc",
|
||
|
"cast_quota_permission_context.h",
|
||
|
"cast_resource_dispatcher_host_delegate.cc",
|
||
|
"cast_resource_dispatcher_host_delegate.h",
|
||
|
"cast_web_contents_manager.cc",
|
||
|
"cast_web_contents_manager.h",
|
||
|
"cast_web_view.cc",
|
||
|
"cast_web_view.h",
|
||
|
"devtools/cast_devtools_manager_delegate.cc",
|
||
|
"devtools/cast_devtools_manager_delegate.h",
|
||
|
"devtools/remote_debugging_server.cc",
|
||
|
"devtools/remote_debugging_server.h",
|
||
|
"media/media_caps_impl.cc",
|
||
|
"media/media_caps_impl.h",
|
||
|
"media/supported_codec_finder.cc",
|
||
|
"media/supported_codec_finder.h",
|
||
|
"metrics/cast_metrics_prefs.cc",
|
||
|
"metrics/cast_metrics_prefs.h",
|
||
|
"metrics/cast_metrics_service_client.cc",
|
||
|
"metrics/cast_metrics_service_client.h",
|
||
|
"metrics/cast_stability_metrics_provider.cc",
|
||
|
"metrics/cast_stability_metrics_provider.h",
|
||
|
"pref_service_helper.cc",
|
||
|
"pref_service_helper.h",
|
||
|
"renderer_prelauncher.cc",
|
||
|
"renderer_prelauncher.h",
|
||
|
"service/cast_service_simple.cc",
|
||
|
"service/cast_service_simple.h",
|
||
|
"url_request_context_factory.cc",
|
||
|
"url_request_context_factory.h",
|
||
|
]
|
||
|
|
||
|
if (chromecast_branding == "public") {
|
||
|
sources += [
|
||
|
"cast_content_browser_client_simple.cc",
|
||
|
"cast_network_delegate_simple.cc",
|
||
|
"pref_service_helper_simple.cc",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//base:i18n",
|
||
|
"//cc",
|
||
|
"//chromecast:chromecast_features",
|
||
|
"//chromecast/app:cast_crash_client",
|
||
|
"//chromecast/app:chromecast_settings",
|
||
|
"//chromecast/app:resources",
|
||
|
"//chromecast/base",
|
||
|
"//chromecast/base:cast_sys_info",
|
||
|
"//chromecast/base:cast_version",
|
||
|
"//chromecast/browser:resources",
|
||
|
"//chromecast/common",
|
||
|
"//chromecast/common/media",
|
||
|
"//chromecast/common/media:interfaces",
|
||
|
"//chromecast/graphics",
|
||
|
"//chromecast/media",
|
||
|
"//chromecast/media:libcast_media",
|
||
|
"//chromecast/media/base:video_plane_controller",
|
||
|
"//chromecast/media/service",
|
||
|
"//chromecast/net",
|
||
|
"//chromecast/service",
|
||
|
"//components/metrics",
|
||
|
"//components/metrics:gpu",
|
||
|
"//components/metrics:net",
|
||
|
|
||
|
# TODO(gfhuang): Eliminate this dependency if ScreenInfoMetricsProvider
|
||
|
# isn't needed. crbug.com/541577
|
||
|
"//components/metrics:ui",
|
||
|
"//components/network_hints/browser",
|
||
|
"//components/network_session_configurator/common",
|
||
|
"//components/prefs",
|
||
|
"//components/proxy_config",
|
||
|
"//content",
|
||
|
"//content/public/browser",
|
||
|
"//content/public/common",
|
||
|
"//content/public/common:service_names",
|
||
|
"//content/public/utility",
|
||
|
"//device/geolocation",
|
||
|
"//gpu",
|
||
|
"//ipc",
|
||
|
"//media",
|
||
|
"//net",
|
||
|
"//ui/base",
|
||
|
"//ui/compositor",
|
||
|
"//ui/display",
|
||
|
"//ui/events",
|
||
|
"//ui/gl",
|
||
|
]
|
||
|
|
||
|
if (is_android) {
|
||
|
sources += [
|
||
|
"android/cast_content_window_android.cc",
|
||
|
"android/cast_content_window_android.h",
|
||
|
"android/cast_metrics_helper_android.cc",
|
||
|
"android/cast_web_contents_activity.cc",
|
||
|
"android/cast_web_contents_activity.h",
|
||
|
]
|
||
|
deps += [
|
||
|
":jni_headers",
|
||
|
"//components/cdm/browser",
|
||
|
]
|
||
|
} else {
|
||
|
sources += [
|
||
|
"cast_display_configurator.cc",
|
||
|
"cast_display_configurator.h",
|
||
|
]
|
||
|
|
||
|
deps += [
|
||
|
"//chromecast/common:interfaces",
|
||
|
"//mojo/public/cpp/bindings",
|
||
|
"//ui/aura",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (is_linux) {
|
||
|
sources += [
|
||
|
"cast_memory_pressure_monitor.cc",
|
||
|
"cast_memory_pressure_monitor.h",
|
||
|
"memory_pressure_controller_impl.cc",
|
||
|
"memory_pressure_controller_impl.h",
|
||
|
"metrics/external_metrics.cc",
|
||
|
"metrics/external_metrics.h",
|
||
|
]
|
||
|
|
||
|
deps += [
|
||
|
"//components/metrics:serialization",
|
||
|
"//third_party/fontconfig",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (use_aura) {
|
||
|
sources += [
|
||
|
"cast_content_window_aura.cc",
|
||
|
"cast_content_window_aura.h",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (!is_fuchsia) {
|
||
|
# TODO(crbug.com/753619): Enable crash reporting on Fuchsia.
|
||
|
deps += [
|
||
|
"//components/crash/content/app",
|
||
|
"//components/crash/content/browser",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (use_ozone) {
|
||
|
deps += [ "//ui/ozone" ]
|
||
|
}
|
||
|
|
||
|
if (enable_mojo_media) {
|
||
|
deps += [
|
||
|
"//media/mojo/interfaces:constants",
|
||
|
"//media/mojo/services",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
configs += [ "//media/audio:platform_config" ]
|
||
|
}
|
||
|
|
||
|
# This target generates an "overlay" interface spec, allowing the Cast build to
|
||
|
# declare specific behavior and requirements for the "content_browser" service.
|
||
|
# This is accomplished by generating a JSON file, which is packed into
|
||
|
# cast_shell.pak, and loaded at runtime. This can be used to host addtional
|
||
|
# interfaces in "content_browser".
|
||
|
#
|
||
|
# NOTE: Do not add packaged_services here! packaged_services should instead be
|
||
|
# added to "cast_content_packaged_services_manifest_overlay" below or
|
||
|
# its internal counterpart. Please see that target for more details.
|
||
|
service_manifest("cast_content_browser_manifest_overlay") {
|
||
|
source = "cast_content_browser_manifest_overlay.json"
|
||
|
|
||
|
if (chromecast_branding != "public") {
|
||
|
overlays = [ "//chromecast/internal/shell/browser:cast_content_browser_internal_manifest_overlay" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# This target is for packaged services that will run in the main (browser)
|
||
|
# process. To host an embedded service, add the service's manifest target to the
|
||
|
# list of "packaged_services" in this target, like so:
|
||
|
#
|
||
|
# package_services += [ "//path/to/foo/service:foo_manifest" ]
|
||
|
#
|
||
|
# You must also register the "foo" service with the content client. See
|
||
|
# CastContentBrowserClient::RegisterInProcessServices() for details.
|
||
|
#
|
||
|
# NOTE: If your service's manifest is in chromecast/internal, do not add it
|
||
|
# here! Instead, add the service to the internal counterpart, which is
|
||
|
# referenced below.
|
||
|
service_manifest("cast_content_packaged_services_manifest_overlay") {
|
||
|
source = "cast_content_packaged_services_manifest_overlay.json"
|
||
|
|
||
|
packaged_services = [ "//media/mojo/services:media_manifest" ]
|
||
|
|
||
|
if (chromecast_branding != "public") {
|
||
|
overlays = [ "//chromecast/internal/shell/browser:cast_content_packaged_services_internal_manifest_overlay" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
grit("resources") {
|
||
|
visibility = [
|
||
|
":browser",
|
||
|
"//chromecast:cast_shell_pak",
|
||
|
]
|
||
|
source = "cast_browser_resources.grd"
|
||
|
output_dir = "$root_gen_dir/chromecast/browser"
|
||
|
outputs = [
|
||
|
"grit/cast_browser_resources.h",
|
||
|
"cast_browser_resources.pak",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":cast_content_browser_manifest_overlay",
|
||
|
":cast_content_packaged_services_manifest_overlay",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
cast_source_set("test_support") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"test/cast_browser_test.cc",
|
||
|
"test/cast_browser_test.h",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
":browser",
|
||
|
"//content/test:test_support",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//chromecast/base",
|
||
|
"//content/public/browser",
|
||
|
"//content/public/common",
|
||
|
"//testing/gtest",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
cast_source_set("browsertests") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"cast_media_blocker_browsertest.cc",
|
||
|
"renderer_prelauncher_test.cc",
|
||
|
"test/cast_features_browsertest.cc",
|
||
|
"test/cast_navigation_browsertest.cc",
|
||
|
]
|
||
|
|
||
|
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
|
||
|
|
||
|
deps = [
|
||
|
":test_support",
|
||
|
"//chromecast:chromecast_features",
|
||
|
"//chromecast/base",
|
||
|
"//chromecast/base:chromecast_switches",
|
||
|
"//chromecast/base/metrics",
|
||
|
"//components/prefs",
|
||
|
"//media:test_support",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
cast_source_set("unittests") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"cast_media_blocker_unittest.cc",
|
||
|
"devtools/cast_devtools_manager_delegate_unittest.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":browser",
|
||
|
"//base",
|
||
|
"//chromecast/base",
|
||
|
"//content/public/browser",
|
||
|
"//content/test:test_support",
|
||
|
"//ui/gl:test_support",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (is_android) {
|
||
|
generate_jni("jni_headers") {
|
||
|
sources = [
|
||
|
"android/apk/src/org/chromium/chromecast/shell/CastContentWindowAndroid.java",
|
||
|
"android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java",
|
||
|
"android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java",
|
||
|
"android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java",
|
||
|
"android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java",
|
||
|
]
|
||
|
|
||
|
jni_package = "chromecast"
|
||
|
}
|
||
|
}
|