# Copyright 2014 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")

# See //content/BUILD.gn for how this works.
group("browser") {
  if (is_component_build) {
    public_deps = [
      "//content",
    ]
  } else {
    public_deps = [
      ":browser_sources",
    ]
  }
}

source_set("browser_sources") {
  # External code should depend on via ":browser" above.
  visibility = [ "//content/*" ]

  sources = [
    "android/app_web_message_port_service.h",
    "android/browser_media_player_manager_register.cc",
    "android/browser_media_player_manager_register.h",
    "android/compositor.h",
    "android/compositor_client.h",
    "android/content_protocol_handler.h",
    "android/content_view_core.h",
    "android/content_view_layer_renderer.h",
    "android/devtools_auth.h",
    "android/java_interfaces.h",
    "android/synchronous_compositor.cc",
    "android/synchronous_compositor.h",
    "android/synchronous_compositor_client.h",
    "appcache_service.h",
    "ax_event_notification_details.cc",
    "ax_event_notification_details.h",
    "background_sync_controller.h",
    "background_sync_parameters.cc",
    "background_sync_parameters.h",
    "background_tracing_config.cc",
    "background_tracing_config.h",
    "background_tracing_manager.h",
    "blob_handle.h",
    "bluetooth_chooser.cc",
    "bluetooth_chooser.h",
    "browser_accessibility_state.h",
    "browser_associated_interface.h",
    "browser_child_process_host.h",
    "browser_child_process_host_delegate.cc",
    "browser_child_process_host_delegate.h",
    "browser_child_process_host_iterator.cc",
    "browser_child_process_host_iterator.h",
    "browser_child_process_observer.cc",
    "browser_child_process_observer.h",
    "browser_context.h",
    "browser_ipc_logging.h",
    "browser_main_parts.cc",
    "browser_main_parts.h",
    "browser_main_runner.h",
    "browser_message_filter.cc",
    "browser_message_filter.h",
    "browser_plugin_guest_delegate.cc",
    "browser_plugin_guest_delegate.h",
    "browser_plugin_guest_manager.cc",
    "browser_plugin_guest_manager.h",
    "browser_ppapi_host.h",
    "browser_thread.h",
    "browser_thread_delegate.h",
    "browser_url_handler.h",
    "cache_storage_context.h",
    "cache_storage_usage_info.h",
    "certificate_request_result_type.h",
    "child_process_data.h",
    "child_process_security_policy.h",
    "client_certificate_delegate.h",
    "color_chooser.h",
    "content_browser_client.cc",
    "content_browser_client.h",
    "context_factory.h",
    "cookie_store_factory.h",
    "desktop_media_id.cc",
    "desktop_media_id.h",
    "desktop_notification_delegate.h",
    "devtools_agent_host.h",
    "devtools_agent_host_client.h",
    "devtools_agent_host_observer.cc",
    "devtools_agent_host_observer.h",
    "devtools_external_agent_proxy.h",
    "devtools_external_agent_proxy_delegate.h",
    "devtools_frontend_host.h",
    "devtools_manager_delegate.cc",
    "devtools_manager_delegate.h",
    "devtools_socket_factory.h",
    "dom_storage_context.h",
    "download_danger_type.h",
    "download_interrupt_reason_values.h",
    "download_interrupt_reasons.h",
    "download_item.h",
    "download_manager.h",
    "download_manager_delegate.cc",
    "download_manager_delegate.h",
    "download_save_info.cc",
    "download_save_info.h",
    "download_url_parameters.cc",
    "download_url_parameters.h",
    "favicon_status.cc",
    "favicon_status.h",
    "file_descriptor_info.h",
    "focused_node_details.h",
    "font_list_async.h",
    "global_request_id.h",
    "gpu_data_manager.h",
    "gpu_data_manager_observer.h",
    "gpu_service_registry.cc",
    "gpu_service_registry.h",
    "gpu_utils.cc",
    "gpu_utils.h",
    "guest_mode.cc",
    "guest_mode.h",
    "histogram_fetcher.h",
    "host_zoom_map.h",
    "indexed_db_context.h",
    "indexed_db_info.h",
    "interstitial_page.h",
    "interstitial_page_delegate.cc",
    "interstitial_page_delegate.h",
    "invalidate_type.h",
    "javascript_dialog_manager.cc",
    "javascript_dialog_manager.h",
    "load_notification_details.h",
    "local_storage_usage_info.h",
    "media_capture_devices.h",
    "media_device_id.cc",
    "media_device_id.h",
    "media_session.h",
    "media_session_observer.cc",
    "media_session_observer.h",
    "memory_coordinator_delegate.h",
    "memory_pressure_controller.cc",
    "memory_pressure_controller.h",
    "message_port_delegate.h",
    "message_port_provider.h",
    "native_web_keyboard_event.h",
    "navigation_controller.cc",
    "navigation_controller.h",
    "navigation_data.h",
    "navigation_details.cc",
    "navigation_details.h",
    "navigation_entry.h",
    "navigation_handle.cc",
    "navigation_handle.h",
    "navigation_throttle.cc",
    "navigation_throttle.h",
    "navigation_type.h",
    "navigation_ui_data.h",
    "notification_database_data.cc",
    "notification_database_data.h",
    "notification_details.h",
    "notification_event_dispatcher.h",
    "notification_observer.h",
    "notification_registrar.cc",
    "notification_registrar.h",
    "notification_service.h",
    "notification_source.h",
    "notification_types.h",
    "overscroll_configuration.h",
    "page_navigator.cc",
    "page_navigator.h",
    "pepper_flash_settings_helper.h",
    "pepper_vpn_provider_resource_host_proxy.h",
    "permission_manager.h",
    "permission_type.h",
    "platform_notification_context.h",
    "platform_notification_service.h",
    "plugin_data_remover.h",
    "plugin_service.h",
    "plugin_service_filter.h",
    "presentation_screen_availability_listener.h",
    "presentation_service_delegate.h",
    "presentation_session.cc",
    "presentation_session.h",
    "presentation_session_message.cc",
    "presentation_session_message.h",
    "profiler_controller.h",
    "profiler_subscriber.h",
    "provision_fetcher_factory.h",
    "provision_fetcher_impl.cc",
    "provision_fetcher_impl.h",
    "push_messaging_service.cc",
    "push_messaging_service.h",
    "quota_permission_context.h",
    "readback_types.h",
    "render_frame_host.h",
    "render_process_host.h",
    "render_process_host_factory.h",
    "render_process_host_observer.h",
    "render_view_host.h",
    "render_widget_host.h",
    "render_widget_host_view.h",
    "render_widget_host_view_frame_subscriber.h",
    "render_widget_host_view_mac_delegate.h",
    "renderer_unresponsive_type.h",
    "resource_context.h",
    "resource_controller.h",
    "resource_dispatcher_host.cc",
    "resource_dispatcher_host.h",
    "resource_dispatcher_host_delegate.cc",
    "resource_dispatcher_host_delegate.h",
    "resource_dispatcher_host_login_delegate.h",
    "resource_hints.h",
    "resource_request_details.cc",
    "resource_request_details.h",
    "resource_request_info.h",
    "resource_throttle.cc",
    "resource_throttle.h",
    "save_page_type.h",
    "screen_orientation_delegate.h",
    "screen_orientation_dispatcher_host.h",
    "screen_orientation_provider.cc",
    "screen_orientation_provider.h",
    "security_style_explanation.h",
    "security_style_explanations.cc",
    "security_style_explanations.h",
    "service_worker_context.h",
    "service_worker_usage_info.cc",
    "service_worker_usage_info.h",
    "session_storage_namespace.h",
    "session_storage_usage_info.h",
    "site_instance.h",
    "speech_recognition_event_listener.h",
    "speech_recognition_manager.h",
    "speech_recognition_manager_delegate.h",
    "speech_recognition_session_config.cc",
    "speech_recognition_session_config.h",
    "speech_recognition_session_context.cc",
    "speech_recognition_session_context.h",
    "speech_recognition_session_preamble.cc",
    "speech_recognition_session_preamble.h",
    "ssl_host_state_delegate.h",
    "ssl_status.cc",
    "ssl_status.h",
    "storage_partition.h",
    "stream_handle.h",
    "stream_info.cc",
    "stream_info.h",
    "trace_uploader.h",
    "tracing_controller.h",
    "tracing_delegate.cc",
    "tracing_delegate.h",
    "url_data_source.cc",
    "url_data_source.h",
    "user_metrics.h",
    "utility_process_host.h",
    "utility_process_mojo_client.h",
    "vpn_service_proxy.h",
    "web_contents.cc",
    "web_contents.h",
    "web_contents_binding_set.cc",
    "web_contents_binding_set.h",
    "web_contents_delegate.cc",
    "web_contents_delegate.h",
    "web_contents_media_capture_id.cc",
    "web_contents_media_capture_id.h",
    "web_contents_observer.cc",
    "web_contents_observer.h",
    "web_contents_unresponsive_state.cc",
    "web_contents_unresponsive_state.h",
    "web_contents_user_data.h",
    "web_contents_view_delegate.cc",
    "web_contents_view_delegate.h",
    "web_drag_dest_delegate.h",
    "web_ui.h",
    "web_ui_controller.cc",
    "web_ui_controller.h",
    "web_ui_controller_factory.h",
    "web_ui_data_source.h",
    "web_ui_message_handler.h",
    "websocket_handshake_request_info.h",
    "worker_service.h",
    "worker_service_observer.h",
    "zoom_level_delegate.h",
    "zygote_handle_linux.h",
    "zygote_host_linux.h",
  ]
  configs += [
    "//build/config:precompiled_headers",
    "//build/config/compiler:wexit_time_destructors",
    "//content:content_implementation",
  ]

  public_deps = [
    "//mojo/public/cpp/bindings",
    "//mojo/public/cpp/system",
    "//services/service_manager/public/cpp",

    # We expose skia headers in the public API.
    "//skia",
    "//third_party/WebKit/public:mojo_bindings",
  ]
  deps = [
    "//cc",
    "//content/browser",  # Must not be public_deps!
    "//content/public/common:common_sources",
    "//device/geolocation",
    "//device/power_save_blocker",
    "//gpu",
    "//media",
    "//net",
    "//ppapi/c",
    "//storage/browser",
    "//ui/accessibility",
    "//ui/base",
    "//ui/events",
    "//ui/gl",
    "//ui/surface",
  ]

  allow_circular_includes_from = [
    # This target is a pair with content/browser. They always go together and
    # include headers from each other.
    "//content/browser",
  ]

  if (is_android) {
    deps += [ "//ui/android" ]
  }

  if (use_aura) {
    sources -= [ "context_factory.h" ]
    deps += [ "//ui/aura" ]
  }
}
