[Cast Convergence] Re-Land "Remove is_chromecast from misc places"
This Cl re-lands commit 52026271db
.
Further comments were added after that CL landed which needed to be addressed.
Original change's description:
> [Cast Convergence] Remove is_chromecast from misc places
>
> This CL updates misc code to remove `is_chromecast` and replace it
> with new `is_castos` and `enable_cast_receiver` flags as appropriate,
> which signify either "a chromecast-hardware device" or "a platform
> which can act as a cast receiver" (such as ATV, Fuchsia, etc)
> respectively
>
> Bug: b/217624595
> Change-Id: Ic578114f6d019146369b7c7c5a12a45971284811
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3632828
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
> Reviewed-by: Matt Menke <mmenke@chromium.org>
> Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
> Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
> Commit-Queue: Ryan Keane <rwkeane@google.com>
> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1001779}
Bug: 1219802, 1293594
Change-Id: If2bbcca9e80363c47c19e35c7a17307520fff890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3687578
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Eric Orth <ericorth@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Ryan Keane <rwkeane@google.com>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Daniel Nicoara <dnicoara@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1012636}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
9c7d29fe63
commit
2a3aa8e99d
device
extensions
gpu
command_buffer
config
ipc
service
mojo/public/tools/bindings
net
@ -291,29 +291,27 @@ test("device_unittests") {
|
||||
}
|
||||
}
|
||||
|
||||
if (is_linux || is_chromeos) {
|
||||
if (is_chromecast) {
|
||||
# Cast does not support GATT server mode.
|
||||
sources -= [
|
||||
"bluetooth/bluetooth_local_gatt_characteristic_unittest.cc",
|
||||
"bluetooth/bluetooth_local_gatt_descriptor_unittest.cc",
|
||||
"bluetooth/bluetooth_local_gatt_service_unittest.cc",
|
||||
]
|
||||
if (is_castos) {
|
||||
# Cast does not support GATT server mode.
|
||||
sources -= [
|
||||
"bluetooth/bluetooth_local_gatt_characteristic_unittest.cc",
|
||||
"bluetooth/bluetooth_local_gatt_descriptor_unittest.cc",
|
||||
"bluetooth/bluetooth_local_gatt_service_unittest.cc",
|
||||
]
|
||||
|
||||
sources += [
|
||||
"bluetooth/cast/bluetooth_adapter_cast_unittest.cc",
|
||||
"bluetooth/cast/bluetooth_utils_unittest.cc",
|
||||
"bluetooth/test/bluetooth_test_cast.cc",
|
||||
"bluetooth/test/bluetooth_test_cast.h",
|
||||
]
|
||||
sources += [
|
||||
"bluetooth/cast/bluetooth_adapter_cast_unittest.cc",
|
||||
"bluetooth/cast/bluetooth_utils_unittest.cc",
|
||||
"bluetooth/test/bluetooth_test_cast.cc",
|
||||
"bluetooth/test/bluetooth_test_cast.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//chromecast/device/bluetooth:util",
|
||||
"//chromecast/device/bluetooth/le",
|
||||
"//chromecast/device/bluetooth/le:test_support",
|
||||
"//chromecast/device/bluetooth/shlib:mock_shlib",
|
||||
]
|
||||
}
|
||||
deps += [
|
||||
"//chromecast/device/bluetooth:util",
|
||||
"//chromecast/device/bluetooth/le",
|
||||
"//chromecast/device/bluetooth/le:test_support",
|
||||
"//chromecast/device/bluetooth/shlib:mock_shlib",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
|
@ -8,7 +8,7 @@ import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/gclient_args.gni")
|
||||
|
||||
declare_args() {
|
||||
enable_gvr_services = is_android && !is_chromecast &&
|
||||
enable_gvr_services = is_android && !is_cast_android &&
|
||||
(current_cpu == "arm" || current_cpu == "arm64")
|
||||
|
||||
use_command_buffer = is_win
|
||||
@ -22,9 +22,9 @@ declare_args() {
|
||||
# Enable VR device support whenever VR device SDK(s) are supported.
|
||||
# We enable VR on Linux even though VR features aren't usable because
|
||||
# the binary size impact is small and allows many VR tests to run on Linux
|
||||
enable_vr = enable_gvr_services || enable_openxr ||
|
||||
(is_linux && (current_cpu == "x64" || current_cpu == "x86") &&
|
||||
!is_chromeos_lacros && !is_chromecast)
|
||||
enable_vr =
|
||||
enable_gvr_services || enable_openxr ||
|
||||
(is_linux && !is_castos && (current_cpu == "x64" || current_cpu == "x86"))
|
||||
|
||||
# Whether to include VR extras like test APKs in non-VR-specific targets
|
||||
include_vr_data = false
|
||||
@ -35,6 +35,6 @@ declare_args() {
|
||||
# Once crbug.com/920424 is resolved, this will exactly control whether ARCore
|
||||
# is supported.
|
||||
# TODO(crbug.com/843374): AR should not depend on |enable_vr|.
|
||||
enable_arcore = enable_vr && is_android && !is_chromecast &&
|
||||
enable_arcore = enable_vr && is_android && !is_cast_android &&
|
||||
(current_cpu == "arm" || current_cpu == "arm64")
|
||||
}
|
||||
|
@ -62,7 +62,6 @@ grit("extensions_browser_resources") {
|
||||
|
||||
grit("extensions_renderer_resources") {
|
||||
source = "renderer/resources/extensions_renderer_resources.grd"
|
||||
defines = [ "is_chromecast=$is_chromecast" ]
|
||||
outputs = [
|
||||
"grit/extensions_renderer_resources.h",
|
||||
"extensions_renderer_resources.pak",
|
||||
|
@ -123,13 +123,14 @@ const int kUnknownTabId = -1;
|
||||
const int kUnknownWindowId = -1;
|
||||
const int kCurrentWindowId = -2;
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMECAST)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// The extension id for the built-in component extension.
|
||||
const char kChromeVoxExtensionId[] = "mndnfokpggljbaajbnioimlmbfngpief";
|
||||
#else
|
||||
// The extension id for the web store extension.
|
||||
const char kChromeVoxExtensionId[] = "kgejglhpjiefppelpmljglcjbhoiplfn";
|
||||
#endif
|
||||
|
||||
const char kPdfExtensionId[] = "mhjfbmdgcfjbbpaeojofohoefgiehjai";
|
||||
const char kQuickOfficeComponentExtensionId[] =
|
||||
"bpmcpldpdmajfigpchkicefoigmkfalc";
|
||||
|
@ -8,14 +8,12 @@
|
||||
|
||||
@namespace "http://www.w3.org/1999/xhtml";
|
||||
|
||||
<if expr="not is_chromecast">
|
||||
body {
|
||||
-webkit-user-select: none;
|
||||
cursor: default;
|
||||
font-family: $FONTFAMILY;
|
||||
font-size: $FONTSIZE;
|
||||
}
|
||||
</if>
|
||||
|
||||
webview, appview {
|
||||
display: inline-block;
|
||||
|
@ -194,7 +194,7 @@ FeatureInfo::FeatureInfo(
|
||||
.status_values[GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL] ==
|
||||
gpu::kGpuFeatureStatusEnabled;
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMECAST)
|
||||
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CAST_ANDROID)
|
||||
feature_flags_.chromium_image_ycbcr_420v = base::Contains(
|
||||
gpu_feature_info.supported_buffer_formats_for_allocation_and_texturing,
|
||||
gfx::BufferFormat::YUV_420_BIPLANAR);
|
||||
|
@ -84,14 +84,12 @@
|
||||
|
||||
namespace gpu {
|
||||
|
||||
#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \
|
||||
!BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CHROMECAST) && \
|
||||
BUILDFLAG(ENABLE_VULKAN)
|
||||
|
||||
namespace {
|
||||
|
||||
#if defined(USE_OZONE) && BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)
|
||||
|
||||
bool ShouldUseExternalVulkanImageFactory() {
|
||||
#if defined(USE_OZONE)
|
||||
#if BUILDFLAG(ENABLE_VULKAN)
|
||||
return ui::OzonePlatform::GetInstance()
|
||||
->GetPlatformProperties()
|
||||
.uses_external_vulkan_image_factory;
|
||||
@ -100,11 +98,7 @@ bool ShouldUseExternalVulkanImageFactory() {
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
#endif // defined(USE_OZONE) && BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)
|
||||
|
||||
bool ShouldUseOzoneFactory() {
|
||||
#if defined(USE_OZONE)
|
||||
@ -387,8 +381,7 @@ SharedImageFactory::SharedImageFactory(
|
||||
factories_.push_back(std::move(external_vk_image_factory));
|
||||
}
|
||||
#elif defined(USE_OZONE)
|
||||
#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \
|
||||
!BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CHROMECAST)
|
||||
#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)
|
||||
// Desktop Linux, not ChromeOS.
|
||||
if (ShouldUseOzoneFactory()) {
|
||||
auto ozone_factory =
|
||||
|
@ -15,12 +15,12 @@ bool CollectContextGraphicsInfo(GPUInfo* gpu_info) {
|
||||
|
||||
TRACE_EVENT0("gpu", "gpu_info_collector::CollectGraphicsInfo");
|
||||
|
||||
#if BUILDFLAG(IS_CHROMECAST)
|
||||
#if BUILDFLAG(IS_CASTOS)
|
||||
// Chromecast doesn't go through CollectBasicGraphicsInfo() step, so
|
||||
// this is the only place we need to set machine model.
|
||||
// TODO(zmo): maybe distinguish different Chromecast products.
|
||||
gpu_info->machine_model_name = "Chromecast";
|
||||
#endif // IS_CHROMECAST
|
||||
#endif // BUILDFLAG(IS_CASTOS)
|
||||
|
||||
return CollectGraphicsInfoGL(gpu_info);
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_info,
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMECAST)
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CASTOS)
|
||||
bool CanAccessDeviceFile(const GPUInfo& gpu_info) {
|
||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
if (gpu_info.gpu.vendor_id != 0x10de || // NVIDIA
|
||||
@ -138,7 +138,7 @@ bool CanAccessDeviceFile(const GPUInfo& gpu_info) {
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMECAST)
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CASTOS)
|
||||
|
||||
class GpuWatchdogInit {
|
||||
public:
|
||||
@ -205,7 +205,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
|
||||
// SwiftShader needs to wait until creating a context.
|
||||
bool needs_more_info = true;
|
||||
uint64_t system_device_id = 0;
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMECAST)
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CASTOS)
|
||||
needs_more_info = false;
|
||||
if (!PopGPUInfoCache(&gpu_info_)) {
|
||||
CollectBasicGraphicsInfo(command_line, &gpu_info_);
|
||||
@ -275,7 +275,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
|
||||
}
|
||||
#endif // USE_EGL
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMECAST)
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CASTOS)
|
||||
|
||||
gpu_info_.in_process_gpu = false;
|
||||
gl_use_swiftshader_ = false;
|
||||
@ -787,7 +787,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* command_line,
|
||||
ui::OzonePlatform::InitializeForGPU(params);
|
||||
#endif
|
||||
bool needs_more_info = true;
|
||||
#if !BUILDFLAG(IS_CHROMECAST)
|
||||
#if !BUILDFLAG(IS_CASTOS) && !BUILDFLAG(IS_CAST_ANDROID)
|
||||
needs_more_info = false;
|
||||
if (!PopGPUInfoCache(&gpu_info_)) {
|
||||
CollectBasicGraphicsInfo(command_line, &gpu_info_);
|
||||
@ -805,7 +805,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* command_line,
|
||||
InitializeSwitchableGPUs(
|
||||
gpu_feature_info_.enabled_gpu_driver_bug_workarounds);
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_CHROMECAST)
|
||||
#endif // !BUILDFLAG(IS_CASTOS) && !BUILDFLAG(IS_CAST_ANDROID)
|
||||
|
||||
gl::GLDisplay* gl_display = nullptr;
|
||||
|
||||
|
@ -69,7 +69,7 @@ declare_args() {
|
||||
# lacros-chrome switches to target_os="chromeos"
|
||||
enable_scrambled_message_ids =
|
||||
enable_mojom_message_id_scrambling &&
|
||||
(is_mac || is_win || (is_linux && !is_chromecast) ||
|
||||
(is_mac || is_win || (is_linux && !is_castos) ||
|
||||
((enable_nacl || is_nacl) &&
|
||||
(target_os != "chromeos" && !chromeos_is_browser_only)))
|
||||
|
||||
|
@ -41,8 +41,8 @@ enable_unix_sockets = is_posix && !is_ios
|
||||
|
||||
# x86/x64 cast_shell builds run on regular trybots and can use python runtime
|
||||
# and remote test server. ARM cast_shell builds don't have python runtime.
|
||||
is_arm_cast_shell_build =
|
||||
is_chromecast && (current_cpu == "arm" || current_cpu == "arm64")
|
||||
is_arm_cast_shell_build = (is_castos || is_cast_android) &&
|
||||
(current_cpu == "arm" || current_cpu == "arm64")
|
||||
|
||||
# Python works only on Linux, MacOS and Windows so exclude the others,
|
||||
# chromecast, android, fuchsia, ios.
|
||||
@ -1415,7 +1415,7 @@ component("net") {
|
||||
"third_party/nss/ssl/cmpcert.cc",
|
||||
"third_party/nss/ssl/cmpcert.h",
|
||||
]
|
||||
if (!is_chromecast) {
|
||||
if (!is_castos) {
|
||||
sources += [
|
||||
"ssl/client_cert_store_nss.cc",
|
||||
"ssl/client_cert_store_nss.h",
|
||||
@ -4565,7 +4565,7 @@ test("net_unittests") {
|
||||
"cert/nss_cert_database_unittest.cc",
|
||||
"cert/x509_util_nss_unittest.cc",
|
||||
]
|
||||
if (!is_chromecast) {
|
||||
if (!is_castos) {
|
||||
sources += [
|
||||
"ssl/client_cert_store_nss_unittest.cc",
|
||||
"ssl/ssl_platform_key_nss_unittest.cc",
|
||||
|
@ -16,7 +16,7 @@ declare_args() {
|
||||
# and Chromecast, at least for now. This feature needs configuration
|
||||
# (krb5.conf and so on).
|
||||
# TODO(fuchsia): Enable kerberos on Fuchsia when it's implemented there.
|
||||
use_kerberos = !is_ios && !is_chromecast && !is_fuchsia
|
||||
use_kerberos = !is_ios && !is_fuchsia && !is_castos && !is_cast_android
|
||||
|
||||
# Do not disable brotli filter by default.
|
||||
disable_brotli_filter = false
|
||||
|
Reference in New Issue
Block a user