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