chromium/chrome/browser/ui/views/toolbar/BUILD.gn

# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(is_win || is_mac || is_linux || is_chromeos)

import("//build/config/ui.gni")
import("//ui/webui/webui_features.gni")

source_set("toolbar") {
  sources = [
    "app_menu.cc",
    "app_menu.h",
    "back_forward_button.cc",
    "back_forward_button.h",
    "browser_app_menu_button.cc",
    "browser_app_menu_button.h",
    "chrome_labs/chrome_labs_bubble_view.cc",
    "chrome_labs/chrome_labs_bubble_view.h",
    "chrome_labs/chrome_labs_button.cc",
    "chrome_labs/chrome_labs_button.h",
    "chrome_labs/chrome_labs_coordinator.cc",
    "chrome_labs/chrome_labs_coordinator.h",
    "chrome_labs/chrome_labs_item_view.cc",
    "chrome_labs/chrome_labs_item_view.h",
    "chrome_labs/chrome_labs_view_controller.cc",
    "chrome_labs/chrome_labs_view_controller.h",
    "home_button.cc",
    "home_button.h",
    "overflow_button.cc",
    "overflow_button.h",
    "pinned_action_toolbar_button.cc",
    "pinned_action_toolbar_button.h",
    "pinned_toolbar_actions_container.cc",
    "pinned_toolbar_actions_container.h",
    "pinned_toolbar_actions_container_layout.cc",
    "pinned_toolbar_actions_container_layout.h",
    "pinned_toolbar_button_status_indicator.cc",
    "pinned_toolbar_button_status_indicator.h",
    "reload_button.cc",
    "reload_button.h",
    "toolbar_action_hover_card_bubble_view.cc",
    "toolbar_action_hover_card_bubble_view.h",
    "toolbar_action_hover_card_controller.cc",
    "toolbar_action_hover_card_controller.h",
    "toolbar_action_view.cc",
    "toolbar_action_view.h",
    "toolbar_action_view_delegate_views.h",
    "toolbar_actions_bar_bubble_views.cc",
    "toolbar_actions_bar_bubble_views.h",
    "toolbar_button.cc",
    "toolbar_button.h",
    "toolbar_chip_button.cc",
    "toolbar_chip_button.h",
    "toolbar_controller.cc",
    "toolbar_controller.h",
    "toolbar_icon_container_view.cc",
    "toolbar_icon_container_view.h",
    "toolbar_ink_drop_util.cc",
    "toolbar_ink_drop_util.h",
    "toolbar_view.cc",
    "toolbar_view.h",
  ]
  public_deps = [
    "//base",
    "//build:buildflag_header_h",
    "//build:chromeos_buildflags",
    "//chrome/browser/ui:browser_element_identifiers",
    "//chrome/browser/ui/color:color_headers",
    "//chrome/browser/ui/views",
    "//components/bookmarks/browser",
    "//components/flags_ui",
    "//components/prefs",
    "//components/saved_tab_groups:model",
    "//components/user_education/common",
    "//skia",
    "//ui/actions:actions_headers",
    "//ui/base",
    "//ui/base:features",
    "//ui/base:types",
    "//ui/compositor",
    "//ui/gfx",
    "//ui/gfx/animation",
    "//ui/gfx/geometry",
    "//ui/views",
    "//url",
  ]
  deps = [
    "//base:i18n",
    "//build:branding_buildflags",
    "//cc/paint",
    "//chrome/app:branded_strings",
    "//chrome/app:branded_strings_grit",
    "//chrome/app:command_ids",
    "//chrome/app:generated_resources",
    "//chrome/app:generated_resources_grit",
    "//chrome/app/resources:locale_settings",
    "//chrome/app/resources:locale_settings_grit",
    "//chrome/app/theme:theme_resources",
    "//chrome/app/theme:theme_resources_grit",
    "//chrome/app/vector_icons",
    "//chrome/browser:browser_process",
    "//chrome/browser:primitives",
    "//chrome/browser/apps/link_capturing:features",
    "//chrome/browser/companion/core",
    "//chrome/browser/feedback",
    "//chrome/browser/media/router:media_router_feature",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/search",
    "//chrome/browser/sync",
    "//chrome/browser/sync:factories",
    "//chrome/browser/themes",
    "//chrome/browser/ui:ui_features",
    "//chrome/browser/ui/actions:actions_headers",
    "//chrome/browser/ui/browser_window",
    "//chrome/browser/ui/color:mixers",
    "//chrome/browser/ui/tabs:tab_enums",
    "//chrome/browser/ui/views/side_panel:side_panel_enums",
    "//chrome/common:buildflags",
    "//chrome/common:chrome_features",
    "//chrome/common:constants",
    "//components/autofill/core/common:features",
    "//components/feature_engagement/public",
    "//components/omnibox/browser",
    "//components/performance_manager",
    "//components/safe_browsing/core/common",
    "//components/send_tab_to_self",
    "//components/sessions",
    "//components/signin/public/base:signin_buildflags",
    "//components/signin/public/base:signin_switches",
    "//components/signin/public/identity_manager",
    "//components/strings:components_strings",
    "//components/strings:components_strings_grit",
    "//components/user_education/views",
    "//components/user_prefs",
    "//components/vector_icons",
    "//components/zoom",
    "//content/public/browser",
    "//extensions/browser/api/feedback_private",
    "//extensions/common",
    "//media",
    "//third_party/abseil-cpp:absl",
    "//ui/accessibility:ax_base",
    "//ui/accessibility:ax_enums_mojo",
    "//ui/base/dragdrop:types",
    "//ui/base/ime",
    "//ui/color:color_headers",
    "//ui/display",
    "//ui/events",
    "//ui/gfx:color_utils",
    "//ui/gfx/geometry:geometry_skia",
    "//ui/native_theme",
  ]
  if (enable_webui_tab_strip) {
    sources += [
      "webui_tab_counter_button.cc",
      "webui_tab_counter_button.h",
    ]
  }
  if (use_aura) {
    deps += [ "//ui/aura" ]
  }
  if (is_chromeos) {
    deps += [ "//chromeos/components/mgs" ]
  }
  if (is_chromeos_ash) {
    public_deps += [ "//components/arc" ]
    deps += [
      "//ash/constants",
      "//chrome/browser/ash/ownership",
      "//chrome/browser/ash/settings",
    ]
  }
}