1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
9 gypi_values = exec_script(
10 "//build/gypi_to_gn.py",
11 [ rebase_path("../../chrome_browser_extensions.gypi") ],
13 [ "../../chrome_browser_extensions.gypi" ])
15 # GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions
16 static_library("extensions") {
18 sources += rebase_path(
19 gypi_values.chrome_browser_extensions_enabled_sources,
24 # TODO(GYP) remove this when webrtc is ported.
25 configs += [ "//content:webrtc_stub_config" ]
27 # Since browser and browser_extensions actually depend on each other,
28 # we must omit the dependency from browser_extensions to browser.
29 # However, this means browser_extensions and browser should more or less
30 # have the same dependencies. Once browser_extensions is untangled from
31 # browser, then we can clean up these dependencies.
33 "//chrome:extra_resources",
36 "//chrome/app/resources:platform_locale_settings",
37 "//chrome/app/theme:theme_resources",
38 "//chrome/browser/history:in_memory_url_index_cache_proto",
39 "//chrome/browser/sync_file_system:sync_file_system_proto",
41 "//chrome/common/extensions/api",
42 "//chrome/common/net",
43 "//chrome/common/safe_browsing:proto",
45 "//components/strings",
46 "//components/url_matcher",
47 "//content/public/browser",
48 "//content/public/common",
50 "//extensions/common/api",
51 "//extensions/strings",
55 "//third_party/WebKit/public:resources",
56 "//third_party/cacheinvalidation",
58 "//third_party/leveldatabase",
60 "//ui/accessibility:ax_gen",
67 "//webkit/browser:storage",
68 "//webkit/common:storage",
69 "//webkit/glue/resources",
70 #"debugger", TODO(GYP)
71 #"installer_util", TODO(GYP)
72 #"../components/components.gyp:omaha_query_params", TODO(GYP)
73 #'../device/bluetooth/bluetooth.gyp:device_bluetooth', TODO(GYP)
74 #"../device/hid/hid.gyp:device_hid", TODO(GYP)
75 #"../extensions/extensions.gyp:extensions_browser", TODO(GYP)
76 #"../third_party/webrtc/modules/modules.gyp:desktop_capture", TODO(GYP)
79 forward_dependent_configs_from = [
80 "//chrome/common/extensions/api",
81 "//content/public/browser",
85 sources += rebase_path(
86 gypi_values.chrome_browser_extensions_chromeos_sources,
88 configs += [ "//build/config/linux:dbus" ]
90 "//third_party/libevent",
91 "//third_party/protobuf:protobuf_lite",
92 #'../chromeos/ime/input_method.gyp:gencode', TODO(GYP)
99 sources += rebase_path(
100 gypi_values.chrome_browser_extensions_non_chromeos_sources,
106 "api/tabs/ash_panel_contents.cc",
107 "api/tabs/ash_panel_contents.h",
112 configs += [ "//build/config/linux:fontconfig" ]
116 "//build/config/linux:x11",
119 "//ui/events/platform",
120 "//ui/events/platform/x11",
125 "api/audio/audio_service.cc",
129 if (enable_configuration_policy) {
130 deps += [ "//components/policy" ]
132 "policy_handlers.cc",
135 sources += rebase_path(
136 gypi_values.chrome_browser_extensions_policy_sources,
142 "api/webrtc_logging_private/webrtc_logging_private_api.cc",
146 "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc",
151 deps += [ "//build/config/linux:libbrlapi" ]
152 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
156 "api/braille_display_private/braille_controller_stub.cc",
163 "//ui/keyboard:resources",
169 "global_shortcut_listener_x11.cc",
170 "global_shortcut_listener_x11.h",
174 if (safe_browsing_mode == 1) {
175 defines += [ "FULL_SAFE_BROWSING" ]
177 if (safe_browsing_mode == 2) {
178 defines += [ "MOBILE_SAFE_BROWSING" ]
181 if (is_win || is_mac) {
182 deps += [ "//components/wifi" ]
183 sources += rebase_path(
184 gypi_values.chrome_browser_extensions_networking_private_sources,
190 "//third_party/iaccessible2",
191 "//third_party/isimpledom",
193 } else if (!is_chromeos) {
194 sources += [ "api/system_display/display_info_provider_aura.cc" ]
197 if (enable_app_list) {
198 sources += rebase_path(
199 gypi_values.chrome_browser_extensions_app_list_sources,
205 "global_shortcut_listener_ozone.cc",