[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 |
| 18 | static_library("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/browser/history:in_memory_url_index_cache_proto", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 43 | "//chrome/common", |
yoz | 774dcda2d | 2014-08-27 03:32:58 | [diff] [blame] | 44 | "//chrome/common/extensions/api:api_registration", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 45 | "//chrome/common/net", |
| 46 | "//chrome/common/safe_browsing:proto", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 47 | "//chrome/installer/util", |
[email protected] | 6294f0d | 2014-08-20 17:43:09 | [diff] [blame] | 48 | "//components/copresence", |
rockot | 89e757c | 2014-11-13 18:40:07 | [diff] [blame] | 49 | "//components/omaha_client", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 50 | "//components/onc", |
isherman | 25cab40a | 2014-09-18 03:51:51 | [diff] [blame] | 51 | "//components/proximity_auth", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 52 | "//components/strings", |
| 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", |
| 59 | "//extensions/browser", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 60 | "//extensions/common/api", |
yoz | 774dcda2d | 2014-08-27 03:32:58 | [diff] [blame] | 61 | "//extensions/common/api:api_registration", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 62 | "//extensions/strings", |
| 63 | "//net", |
| 64 | "//skia", |
pilgrim | f55d19fc | 2014-09-04 00:05:24 | [diff] [blame] | 65 | "//storage/common", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 66 | "//sync", |
[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", |
| 75 | "//ui/gfx", |
| 76 | "//ui/gfx/geometry", |
| 77 | "//ui/resources", |
| 78 | "//ui/strings", |
| 79 | "//url", |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 80 | "//storage/browser", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 81 | ] |
| 82 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 83 | if (is_chromeos) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 84 | sources += |
| 85 | rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources, |
| 86 | ".", |
| 87 | "//chrome") |
mukai | 55134a0 | 2014-10-29 00:30:22 | [diff] [blame] | 88 | sources -= [ |
| 89 | "api/audio/audio_service_linux.cc", |
| 90 | "api/music_manager_private/device_id_linux.cc", |
| 91 | ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 92 | configs += [ "//build/config/linux:dbus" ] |
| 93 | deps += [ |
| 94 | "//third_party/libevent", |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 95 | "//third_party/protobuf:protobuf_lite", |
mukai | 8c99b88 | 2014-10-15 03:07:59 | [diff] [blame] | 96 | "//chromeos/ime:gencode", |
kelvinp | 98a75069 | 2014-11-12 21:31:43 | [diff] [blame] | 97 | "//remoting/host/it2me:common", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 98 | ] |
| 99 | } else { |
| 100 | sources += [ |
| 101 | "default_apps.cc", |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 102 | "default_apps.h'", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 103 | ] |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 104 | sources += |
| 105 | rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources, |
| 106 | ".", |
| 107 | "//chrome") |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | if (use_ash) { |
| 111 | sources += [ |
| 112 | "api/tabs/ash_panel_contents.cc", |
| 113 | "api/tabs/ash_panel_contents.h", |
| 114 | ] |
| 115 | } |
oshima | b70d0f8 | 2014-10-02 02:11:26 | [diff] [blame] | 116 | if (use_athena) { |
| 117 | defines += [ USE_ATHENA ] |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 118 | sources += rebase_path(gypi_values.chrome_browser_extensions_athena_sources, |
| 119 | ".", |
| 120 | "//chrome") |
oshima | b70d0f8 | 2014-10-02 02:11:26 | [diff] [blame] | 121 | } else { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 122 | sources += |
| 123 | rebase_path(gypi_values.chrome_browser_extensions_non_athena_sources, |
| 124 | ".", |
| 125 | "//chrome") |
oshima | b70d0f8 | 2014-10-02 02:11:26 | [diff] [blame] | 126 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 127 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 128 | if (is_linux) { |
| 129 | configs += [ "//build/config/linux:fontconfig" ] |
| 130 | deps += [ "//dbus" ] |
| 131 | if (use_x11) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 132 | configs += [ "//build/config/linux:x11" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 133 | deps += [ |
Brett Wilson | 4263a74 | 2014-09-10 00:02:24 | [diff] [blame] | 134 | "//ui/events:events_base", |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 135 | "//ui/events/platform", |
| 136 | "//ui/events/platform/x11", |
| 137 | ] |
| 138 | } |
| 139 | } else { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 140 | sources += [ "api/audio/audio_service.cc" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 141 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 142 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 143 | if (enable_configuration_policy) { |
| 144 | deps += [ "//components/policy" ] |
| 145 | sources += [ |
| 146 | "policy_handlers.cc", |
| 147 | "policy_handlers.h", |
| 148 | ] |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 149 | sources += rebase_path(gypi_values.chrome_browser_extensions_policy_sources, |
| 150 | ".", |
| 151 | "//chrome") |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 152 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 153 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 154 | if (enable_webrtc) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 155 | sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 156 | } else { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 157 | sources += |
| 158 | [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 159 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 160 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 161 | if (use_brlapi) { |
| 162 | deps += [ "//build/config/linux:libbrlapi" ] |
| 163 | sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources, |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 164 | ".", |
| 165 | "//chrome") |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 166 | } else { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 167 | sources += [ "api/braille_display_private/braille_controller_stub.cc" ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 168 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 169 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 170 | if (use_aura) { |
| 171 | deps += [ |
| 172 | "//ui/keyboard", |
| 173 | "//ui/keyboard:resources", |
| 174 | ] |
| 175 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 176 | |
mukai | 55134a0 | 2014-10-29 00:30:22 | [diff] [blame] | 177 | # chromeos uses its own global_shortcut_listener, _x11 is not necessary. |
| 178 | if (is_chromeos || !use_x11) { |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 179 | sources -= [ |
| 180 | "global_shortcut_listener_x11.cc", |
| 181 | "global_shortcut_listener_x11.h", |
| 182 | ] |
| 183 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 184 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 185 | if (safe_browsing_mode == 1) { |
| 186 | defines += [ "FULL_SAFE_BROWSING" ] |
| 187 | } |
| 188 | if (safe_browsing_mode == 2) { |
| 189 | defines += [ "MOBILE_SAFE_BROWSING" ] |
| 190 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 191 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 192 | if (is_win || is_mac) { |
| 193 | deps += [ "//components/wifi" ] |
| 194 | sources += rebase_path( |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 195 | gypi_values.chrome_browser_extensions_networking_private_sources_winmac, |
| 196 | ".", |
| 197 | "//chrome") |
zentaro | c0f330b | 2014-10-09 19:44:37 | [diff] [blame] | 198 | } |
| 199 | |
mukai | 55134a0 | 2014-10-29 00:30:22 | [diff] [blame] | 200 | if (is_desktop_linux) { |
zentaro | c0f330b | 2014-10-09 19:44:37 | [diff] [blame] | 201 | sources += rebase_path( |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 202 | gypi_values.chrome_browser_extensions_networking_private_sources_linux, |
| 203 | ".", |
| 204 | "//chrome") |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 205 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 206 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 207 | if (is_win) { |
| 208 | deps += [ |
| 209 | "//third_party/iaccessible2", |
| 210 | "//third_party/isimpledom", |
| 211 | ] |
| 212 | } else if (!is_chromeos) { |
[email protected] | 723b76b | 2014-08-21 23:48:59 | [diff] [blame] | 213 | sources += [ |
| 214 | "display_info_provider_aura.cc", |
| 215 | "display_info_provider_aura.h", |
| 216 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 217 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 218 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 219 | if (enable_app_list) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 220 | sources += |
| 221 | rebase_path(gypi_values.chrome_browser_extensions_app_list_sources, |
| 222 | ".", |
| 223 | "//chrome") |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 224 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 225 | |
dpranke | acd282e | 2014-11-05 03:54:47 | [diff] [blame] | 226 | if (is_chromeos && use_ozone) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 227 | sources -= [ "global_shortcut_listener_chromeos.cc" ] |
dpranke | acd282e | 2014-11-05 03:54:47 | [diff] [blame] | 228 | } |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 229 | if (!use_ozone) { |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame^] | 230 | sources -= [ "global_shortcut_listener_ozone.cc" ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 231 | } |
| 232 | } |