[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 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. |
| 4 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 5 | import("//build/config/features.gni") |
| 6 | import("//build/config/ui.gni") |
| 7 | |
thestig | a52fbd2 | 2014-10-31 09:01:49 | [diff] [blame] | 8 | assert(enable_extensions) |
| 9 | |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 10 | gypi_values = |
| 11 | exec_script("//build/gypi_to_gn.py", |
| 12 | [ rebase_path("../../chrome_browser_extensions.gypi") ], |
| 13 | "scope", |
| 14 | [ "../../chrome_browser_extensions.gypi" ]) |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 15 | |
| 16 | # GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions |
brettw | 22488ad | 2015-05-02 00:42:59 | [diff] [blame] | 17 | source_set("extensions") { |
[email protected] | d5a74be | 2014-08-08 01:01:27 | [diff] [blame] | 18 | sources = [] |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 19 | sources += rebase_path(gypi_values.chrome_browser_extensions_enabled_sources, |
| 20 | ".", |
| 21 | "//chrome") |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 22 | |
brettw | bc8b2a2 | 2015-07-28 18:24:42 | [diff] [blame] | 23 | configs += [ "//build/config:precompiled_headers" ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 24 | defines = [] |
| 25 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 26 | # Since browser and browser_extensions actually depend on each other, |
| 27 | # we must omit the dependency from browser_extensions to browser. |
| 28 | # However, this means browser_extensions and browser should more or less |
| 29 | # have the same dependencies. Once browser_extensions is untangled from |
| 30 | # browser, then we can clean up these dependencies. |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 31 | public_deps = [ |
| 32 | "//chrome/common/extensions/api", |
| 33 | "//content/public/browser", |
| 34 | ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 35 | deps = [ |
| 36 | "//chrome:extra_resources", |
| 37 | "//chrome:resources", |
| 38 | "//chrome:strings", |
| 39 | "//chrome/app/resources:platform_locale_settings", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 40 | "//chrome/app/theme:theme_resources", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 41 | "//chrome/browser/devtools", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 42 | "//chrome/common", |
yoz | 774dcda2d | 2014-08-27 03:32:58 | [diff] [blame] | 43 | "//chrome/common/extensions/api:api_registration", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 44 | "//chrome/common/safe_browsing:proto", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 45 | "//chrome/installer/util", |
[email protected] | 6294f0d | 2014-08-20 17:43:09 | [diff] [blame] | 46 | "//components/copresence", |
moshayedi | 4114e08 | 2015-11-23 19:23:53 | [diff] [blame^] | 47 | "//components/data_reduction_proxy/proto:data_reduction_proxy_proto", |
tfarina | c439a45 | 2015-05-29 00:35:36 | [diff] [blame] | 48 | "//components/dom_distiller/core", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 49 | "//components/onc", |
isherman | 25cab40a | 2014-09-18 03:51:51 | [diff] [blame] | 50 | "//components/proximity_auth", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 51 | "//components/strings", |
sorin | 39eab2f | 2015-01-06 01:09:08 | [diff] [blame] | 52 | "//components/update_client", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 53 | "//components/url_matcher", |
[email protected] | a9ca8d5 | 2014-08-22 10:21:08 | [diff] [blame] | 54 | "//content/app/resources", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 55 | "//content/public/common", |
| 56 | "//crypto", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 57 | "//device/bluetooth", |
| 58 | "//device/hid", |
agrieve | d7a71c88 | 2015-11-20 19:53:28 | [diff] [blame] | 59 | "//extensions:extensions_resources", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 60 | "//extensions/browser", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 61 | "//extensions/common/api", |
yoz | 774dcda2d | 2014-08-27 03:32:58 | [diff] [blame] | 62 | "//extensions/common/api:api_registration", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 63 | "//extensions/strings", |
| 64 | "//net", |
| 65 | "//skia", |
agrieve | d7a71c88 | 2015-11-20 19:53:28 | [diff] [blame] | 66 | "//storage/browser", |
pilgrim | f55d19fc | 2014-09-04 00:05:24 | [diff] [blame] | 67 | "//storage/common", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 68 | "//sync", |
erg | a3c614c9 | 2015-04-03 17:47:51 | [diff] [blame] | 69 | "//third_party/WebKit/public:image_resources", |
[email protected] | 4eebe74d | 2014-08-13 02:54:46 | [diff] [blame] | 70 | "//third_party/WebKit/public:resources", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 71 | "//third_party/cacheinvalidation", |
| 72 | "//third_party/icu", |
| 73 | "//third_party/leveldatabase", |
khorimoto | c067a1dc | 2015-05-06 02:38:57 | [diff] [blame] | 74 | "//third_party/libaddressinput:util", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 75 | "//third_party/re2", |
Brett Wilson | 83fd424 | 2014-09-02 19:45:33 | [diff] [blame] | 76 | "//third_party/webrtc/modules/desktop_capture", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 77 | "//ui/accessibility:ax_gen", |
| 78 | "//ui/base", |
spang | 1c36fac | 2015-02-05 19:55:12 | [diff] [blame] | 79 | "//ui/base/ime", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 80 | "//ui/gfx", |
| 81 | "//ui/gfx/geometry", |
| 82 | "//ui/resources", |
| 83 | "//ui/strings", |
| 84 | "//url", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 85 | ] |
| 86 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 87 | if (is_chromeos) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 88 | sources += |
| 89 | rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources, |
| 90 | ".", |
| 91 | "//chrome") |
jamescook | f1545b58 | 2014-12-16 18:16:33 | [diff] [blame] | 92 | sources -= [ "api/music_manager_private/device_id_linux.cc" ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 93 | configs += [ "//build/config/linux:dbus" ] |
| 94 | deps += [ |
mukai | 8c99b88 | 2014-10-15 03:07:59 | [diff] [blame] | 95 | "//chromeos/ime:gencode", |
tbarzic | 56ebc03 | 2015-05-01 18:44:34 | [diff] [blame] | 96 | "//components/chrome_apps", |
kelvinp | 98a75069 | 2014-11-12 21:31:43 | [diff] [blame] | 97 | "//remoting/host/it2me:common", |
agrieve | d7a71c88 | 2015-11-20 19:53:28 | [diff] [blame] | 98 | "//third_party/protobuf:protobuf_lite", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 99 | ] |
| 100 | } else { |
| 101 | sources += [ |
| 102 | "default_apps.cc", |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 103 | "default_apps.h'", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 104 | ] |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 105 | sources += |
| 106 | rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources, |
| 107 | ".", |
| 108 | "//chrome") |
moshayedi | 78970cd | 2015-11-19 00:59:01 | [diff] [blame] | 109 | if (is_android) { |
| 110 | sources -= [ "api/messaging/native_process_launcher_posix.cc" ] |
| 111 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | if (use_ash) { |
| 115 | sources += [ |
| 116 | "api/tabs/ash_panel_contents.cc", |
| 117 | "api/tabs/ash_panel_contents.h", |
| 118 | ] |
| 119 | } |
| 120 | |
paulmeyer | 27b328b | 2015-06-17 21:26:12 | [diff] [blame] | 121 | if (use_aura) { |
| 122 | deps += [ |
| 123 | "//ui/keyboard", |
ben | 974286a | 2015-10-10 00:45:12 | [diff] [blame] | 124 | "//ui/keyboard:keyboard_with_content", |
paulmeyer | 27b328b | 2015-06-17 21:26:12 | [diff] [blame] | 125 | "//ui/keyboard:resources", |
| 126 | ] |
| 127 | } |
| 128 | |
| 129 | if (toolkit_views) { |
| 130 | deps += [ "//ui/views" ] |
| 131 | } |
| 132 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 133 | if (is_linux) { |
slan | 17e5ce7f | 2015-09-25 00:04:45 | [diff] [blame] | 134 | deps += [ |
| 135 | "//build/linux:fontconfig", |
| 136 | "//dbus", |
| 137 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 138 | if (use_x11) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 139 | configs += [ "//build/config/linux:x11" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 140 | deps += [ |
Brett Wilson | 4263a74 | 2014-09-10 00:02:24 | [diff] [blame] | 141 | "//ui/events:events_base", |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 142 | "//ui/events/platform", |
| 143 | "//ui/events/platform/x11", |
| 144 | ] |
| 145 | } |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 146 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 147 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 148 | if (enable_configuration_policy) { |
| 149 | deps += [ "//components/policy" ] |
| 150 | sources += [ |
| 151 | "policy_handlers.cc", |
| 152 | "policy_handlers.h", |
| 153 | ] |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 154 | sources += rebase_path(gypi_values.chrome_browser_extensions_policy_sources, |
| 155 | ".", |
| 156 | "//chrome") |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 157 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 158 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 159 | if (enable_webrtc) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 160 | sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 161 | } else { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 162 | sources += |
| 163 | [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 164 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 165 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 166 | if (use_brlapi) { |
dpranke | ad0c1f4 | 2015-08-28 21:48:04 | [diff] [blame] | 167 | deps += [ "//build/linux:libbrlapi" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 168 | sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources, |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 169 | ".", |
| 170 | "//chrome") |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 171 | } else { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 172 | sources += [ "api/braille_display_private/braille_controller_stub.cc" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 173 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 174 | |
mukai | 55134a0 | 2014-10-29 00:30:22 | [diff] [blame] | 175 | # chromeos uses its own global_shortcut_listener, _x11 is not necessary. |
| 176 | if (is_chromeos || !use_x11) { |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 177 | sources -= [ |
| 178 | "global_shortcut_listener_x11.cc", |
| 179 | "global_shortcut_listener_x11.h", |
| 180 | ] |
| 181 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 182 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 183 | if (is_win || is_mac) { |
| 184 | deps += [ "//components/wifi" ] |
| 185 | sources += rebase_path( |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 186 | gypi_values.chrome_browser_extensions_networking_private_sources_winmac, |
| 187 | ".", |
| 188 | "//chrome") |
zentaro | c0f330b | 2014-10-09 19:44:37 | [diff] [blame] | 189 | } |
| 190 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 191 | if (is_win) { |
| 192 | deps += [ |
| 193 | "//third_party/iaccessible2", |
| 194 | "//third_party/isimpledom", |
| 195 | ] |
brettw | 22488ad | 2015-05-02 00:42:59 | [diff] [blame] | 196 | } else if (use_aura && !is_chromeos) { |
[email protected] | 723b76b | 2014-08-21 23:48:59 | [diff] [blame] | 197 | sources += [ |
| 198 | "display_info_provider_aura.cc", |
| 199 | "display_info_provider_aura.h", |
| 200 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 201 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 202 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 203 | if (enable_app_list) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 204 | sources += |
| 205 | rebase_path(gypi_values.chrome_browser_extensions_app_list_sources, |
| 206 | ".", |
| 207 | "//chrome") |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 208 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 209 | |
dpranke | acd282e | 2014-11-05 03:54:47 | [diff] [blame] | 210 | if (is_chromeos && use_ozone) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 211 | sources -= [ "global_shortcut_listener_chromeos.cc" ] |
dpranke | acd282e | 2014-11-05 03:54:47 | [diff] [blame] | 212 | } |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 213 | if (!use_ozone) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 214 | sources -= [ "global_shortcut_listener_ozone.cc" ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 215 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 216 | } |