Commit 549eb8a2 authored by slan's avatar slan Committed by Commit bot

[Chromecast] Correct some Cast dependencies in //chrome/browser/ui.

A recent CL introduced some new GN dependencies that broke internal Cast
variants:
  https://codereview.chromium.org/2354633002

Correct the dependencies here. Also put stronger asserts in x11 targets.

BUG=

Review-Url: https://codereview.chromium.org/2371583002
Cr-Commit-Position: refs/heads/master@{#422860}
parent 80da60ef
...@@ -1147,6 +1147,7 @@ split_static_library("ui") { ...@@ -1147,6 +1147,7 @@ split_static_library("ui") {
"//chrome/common:features", "//chrome/common:features",
"//components/feedback/proto", "//components/feedback/proto",
"//components/proximity_auth/webui", "//components/proximity_auth/webui",
"//components/web_modal",
"//device/bluetooth", "//device/bluetooth",
"//mash/public/interfaces", "//mash/public/interfaces",
] ]
...@@ -2969,7 +2970,12 @@ split_static_library("ui") { ...@@ -2969,7 +2970,12 @@ split_static_library("ui") {
] ]
} }
} else { # 'OS!="win" } else { # 'OS!="win"
if (toolkit_views) { # The Cast Linux build sets toolkit_views to false, but many files in this
# target include views-related files unconditionally, causing `gn check`
# to fail on this variant. Since this target is only referenced (but not
# compiled) on this variant, it's okay to add this "incorrect" dependency
# to Cast Linux builds so that `gn check` passes.
if (toolkit_views || (is_chromecast && is_linux)) {
public_deps += [ public_deps += [
"//ui/views", "//ui/views",
"//ui/views/controls/webview", "//ui/views/controls/webview",
...@@ -2986,17 +2992,9 @@ split_static_library("ui") { ...@@ -2986,17 +2992,9 @@ split_static_library("ui") {
"views/first_run_dialog.cc", "views/first_run_dialog.cc",
"views/first_run_dialog.h", "views/first_run_dialog.h",
"views/frame/browser_desktop_window_tree_host.h", "views/frame/browser_desktop_window_tree_host.h",
"views/frame/browser_desktop_window_tree_host_x11.cc",
"views/frame/browser_desktop_window_tree_host_x11.h",
"views/frame/desktop_browser_frame_auralinux.cc", "views/frame/desktop_browser_frame_auralinux.cc",
"views/frame/desktop_browser_frame_auralinux.h", "views/frame/desktop_browser_frame_auralinux.h",
"views/frame/global_menu_bar_registrar_x11.cc",
"views/frame/global_menu_bar_registrar_x11.h",
"views/frame/global_menu_bar_x11.cc",
"views/frame/global_menu_bar_x11.h",
"views/frame/native_browser_frame_factory_auralinux.cc", "views/frame/native_browser_frame_factory_auralinux.cc",
"views/javascript_app_modal_dialog_views_x11.cc",
"views/javascript_app_modal_dialog_views_x11.h",
"views/status_icons/status_icon_linux_wrapper.cc", "views/status_icons/status_icon_linux_wrapper.cc",
"views/status_icons/status_icon_linux_wrapper.h", "views/status_icons/status_icon_linux_wrapper.h",
"webui/help/version_updater_basic.cc", "webui/help/version_updater_basic.cc",
...@@ -3006,6 +3004,19 @@ split_static_library("ui") { ...@@ -3006,6 +3004,19 @@ split_static_library("ui") {
"//ui/base/ime", "//ui/base/ime",
"//ui/events:dom_keycode_converter", "//ui/events:dom_keycode_converter",
] ]
if (use_x11) {
sources += [
"views/frame/browser_desktop_window_tree_host_x11.cc",
"views/frame/browser_desktop_window_tree_host_x11.h",
"views/frame/global_menu_bar_registrar_x11.cc",
"views/frame/global_menu_bar_registrar_x11.h",
"views/frame/global_menu_bar_x11.cc",
"views/frame/global_menu_bar_x11.h",
"views/javascript_app_modal_dialog_views_x11.cc",
"views/javascript_app_modal_dialog_views_x11.h",
]
}
} }
if (is_linux) { # Both desktop Linux and ChromeOS. if (is_linux) { # Both desktop Linux and ChromeOS.
sources += [ sources += [
...@@ -3335,22 +3346,6 @@ split_static_library("ui") { ...@@ -3335,22 +3346,6 @@ split_static_library("ui") {
"webui/local_discovery/local_discovery_ui_handler.h", "webui/local_discovery/local_discovery_ui_handler.h",
] ]
} }
if (is_chromecast && is_linux) {
# The Chromecast build sets toolkit_views to false but some targets in the
# build still reference views. But this target is referenced on the Cast
# bot (though not currently compiled) but is configured as Linux. This
# necessitates these extra dependencies to pass "gn check".
deps += [
"//chrome/browser/media/router",
"//components/web_modal",
"//ui/base/x",
"//ui/events/devices/x11",
"//ui/events/keycodes:x11",
"//ui/views",
"//ui/views/controls/webview",
]
}
} }
# In GYP this is part of test_support_common. # In GYP this is part of test_support_common.
......
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
#include "ui/views/accessibility/ax_aura_obj_cache.h" #include "ui/views/accessibility/ax_aura_obj_cache.h"
#include "ui/views/accessibility/ax_aura_obj_wrapper.h" #include "ui/views/accessibility/ax_aura_obj_wrapper.h"
#include "ui/views/accessibility/ax_view_obj_wrapper.h" #include "ui/views/accessibility/ax_view_obj_wrapper.h"
#include "ui/views/controls/webview/webview.h"
#if defined(TOOLKIT_VIEWS)
#include "ui/views/controls/webview/webview.h" // nogncheck
#endif
using views::AXAuraObjCache; using views::AXAuraObjCache;
using views::AXAuraObjWrapper; using views::AXAuraObjWrapper;
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
#endif #endif
#if defined(ENABLE_MEDIA_ROUTER) #if defined(ENABLE_MEDIA_ROUTER)
#include "chrome/browser/media/router/media_router_dialog_controller.h" #include "chrome/browser/media/router/media_router_dialog_controller.h" // nogncheck
#endif #endif
namespace { namespace {
......
# Copyright 2016 The Chromium Authors. All rights reserved. # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/ui.gni")
import("//ui/ozone/ozone.gni")
assert(use_x11 || ozone_platform_x11)
component("x") { component("x") {
output_name = "ui_base_x" output_name = "ui_base_x"
......
# Copyright 2016 The Chromium Authors. All rights reserved. # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/ui.gni")
import("//ui/ozone/ozone.gni")
assert(use_x11 || ozone_platform_x11)
component("x11") { component("x11") {
output_name = "events_devices_x11" output_name = "events_devices_x11"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment