[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 | |
| 9 | gypi_values = exec_script( |
| 10 | "//build/gypi_to_gn.py", |
| 11 | [ rebase_path("../../chrome_browser_extensions.gypi") ], |
| 12 | "scope", |
| 13 | [ "../../chrome_browser_extensions.gypi" ]) |
| 14 | |
| 15 | # GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions |
| 16 | static_library("extensions") { |
[email protected] | d5a74be | 2014-08-08 01:01:27 | [diff] [blame] | 17 | sources = [] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 18 | sources += rebase_path( |
| 19 | gypi_values.chrome_browser_extensions_enabled_sources, |
| 20 | ".", "//chrome") |
| 21 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 22 | defines = [] |
| 23 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 24 | # Since browser and browser_extensions actually depend on each other, |
| 25 | # we must omit the dependency from browser_extensions to browser. |
| 26 | # However, this means browser_extensions and browser should more or less |
| 27 | # have the same dependencies. Once browser_extensions is untangled from |
| 28 | # browser, then we can clean up these dependencies. |
| 29 | deps = [ |
| 30 | "//chrome:extra_resources", |
| 31 | "//chrome:resources", |
| 32 | "//chrome:strings", |
| 33 | "//chrome/app/resources:platform_locale_settings", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 34 | "//chrome/app/theme:theme_resources", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 35 | "//chrome/browser/devtools", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 36 | "//chrome/browser/history:in_memory_url_index_cache_proto", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 37 | "//chrome/common", |
| 38 | "//chrome/common/extensions/api", |
yoz | 774dcda2d | 2014-08-27 03:32:58 | [diff] [blame] | 39 | "//chrome/common/extensions/api:api_registration", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 40 | "//chrome/common/net", |
| 41 | "//chrome/common/safe_browsing:proto", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 42 | "//chrome/installer/util", |
[email protected] | 6294f0d | 2014-08-20 17:43:09 | [diff] [blame] | 43 | "//components/copresence", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 44 | "//components/omaha_query_params", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 45 | "//components/onc", |
| 46 | "//components/strings", |
| 47 | "//components/url_matcher", |
[email protected] | a9ca8d5 | 2014-08-22 10:21:08 | [diff] [blame] | 48 | "//content/app/resources", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 49 | "//content/public/browser", |
| 50 | "//content/public/common", |
| 51 | "//crypto", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 52 | "//device/bluetooth", |
| 53 | "//device/hid", |
| 54 | "//extensions/browser", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 55 | "//extensions/common/api", |
yoz | 774dcda2d | 2014-08-27 03:32:58 | [diff] [blame] | 56 | "//extensions/common/api:api_registration", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 57 | "//extensions/strings", |
| 58 | "//net", |
| 59 | "//skia", |
pilgrim | f55d19fc | 2014-09-04 00:05:24 | [diff] [blame^] | 60 | "//storage/common", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 61 | "//sync", |
[email protected] | 4eebe74d | 2014-08-13 02:54:46 | [diff] [blame] | 62 | "//third_party/WebKit/public:resources", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 63 | "//third_party/cacheinvalidation", |
| 64 | "//third_party/icu", |
| 65 | "//third_party/leveldatabase", |
| 66 | "//third_party/re2", |
Brett Wilson | 83fd424 | 2014-09-02 19:45:33 | [diff] [blame] | 67 | "//third_party/webrtc/modules/desktop_capture", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 68 | "//ui/accessibility:ax_gen", |
| 69 | "//ui/base", |
| 70 | "//ui/gfx", |
| 71 | "//ui/gfx/geometry", |
| 72 | "//ui/resources", |
| 73 | "//ui/strings", |
| 74 | "//url", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 75 | "//webkit/browser:storage", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 76 | ] |
| 77 | |
| 78 | forward_dependent_configs_from = [ |
| 79 | "//chrome/common/extensions/api", |
| 80 | "//content/public/browser", |
| 81 | ] |
| 82 | |
Brett Wilson | 83fd424 | 2014-09-02 19:45:33 | [diff] [blame] | 83 | # TODO(GYP) This config should be a direct_dependent_config of |
| 84 | # //third_party/webrtc/modules/desktop_capture so we shouldn't have to |
| 85 | # include it here. Remove this line when the direct_dependent_config is set. |
| 86 | configs += [ "//third_party/webrtc:common_inherited_config" ] |
| 87 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 88 | if (is_chromeos) { |
| 89 | sources += rebase_path( |
| 90 | gypi_values.chrome_browser_extensions_chromeos_sources, |
| 91 | ".", "//chrome") |
| 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", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 96 | #'../chromeos/ime/input_method.gyp:gencode', TODO(GYP) |
| 97 | ] |
| 98 | } else { |
| 99 | sources += [ |
| 100 | "default_apps.cc", |
| 101 | "default_apps.h'" |
| 102 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 103 | sources += rebase_path( |
| 104 | gypi_values.chrome_browser_extensions_non_chromeos_sources, |
| 105 | ".", "//chrome") |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | if (use_ash) { |
| 109 | sources += [ |
| 110 | "api/tabs/ash_panel_contents.cc", |
| 111 | "api/tabs/ash_panel_contents.h", |
| 112 | ] |
| 113 | } |
| 114 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 115 | if (is_linux) { |
| 116 | configs += [ "//build/config/linux:fontconfig" ] |
| 117 | deps += [ "//dbus" ] |
| 118 | if (use_x11) { |
| 119 | configs += [ |
| 120 | "//build/config/linux:x11", |
| 121 | ] |
| 122 | deps += [ |
| 123 | "//ui/events/platform", |
| 124 | "//ui/events/platform/x11", |
| 125 | ] |
| 126 | } |
| 127 | } else { |
| 128 | sources += [ |
| 129 | "api/audio/audio_service.cc", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 130 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 131 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 132 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 133 | if (enable_configuration_policy) { |
| 134 | deps += [ "//components/policy" ] |
| 135 | sources += [ |
| 136 | "policy_handlers.cc", |
| 137 | "policy_handlers.h", |
| 138 | ] |
| 139 | sources += rebase_path( |
| 140 | gypi_values.chrome_browser_extensions_policy_sources, |
| 141 | ".", "//chrome") |
| 142 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 143 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 144 | if (enable_webrtc) { |
| 145 | sources += [ |
| 146 | "api/webrtc_logging_private/webrtc_logging_private_api.cc", |
| 147 | ] |
| 148 | } else { |
| 149 | sources += [ |
| 150 | "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc", |
| 151 | ] |
| 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 (use_brlapi) { |
| 155 | deps += [ "//build/config/linux:libbrlapi" ] |
| 156 | sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources, |
| 157 | ".", "//chrome") |
| 158 | } else { |
| 159 | sources += [ |
| 160 | "api/braille_display_private/braille_controller_stub.cc", |
| 161 | ] |
| 162 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 163 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 164 | if (use_aura) { |
| 165 | deps += [ |
| 166 | "//ui/keyboard", |
| 167 | "//ui/keyboard:resources", |
| 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 (!use_x11) { |
| 172 | sources -= [ |
| 173 | "global_shortcut_listener_x11.cc", |
| 174 | "global_shortcut_listener_x11.h", |
| 175 | ] |
| 176 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 177 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 178 | if (safe_browsing_mode == 1) { |
| 179 | defines += [ "FULL_SAFE_BROWSING" ] |
| 180 | } |
| 181 | if (safe_browsing_mode == 2) { |
| 182 | defines += [ "MOBILE_SAFE_BROWSING" ] |
| 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 (is_win || is_mac) { |
| 186 | deps += [ "//components/wifi" ] |
| 187 | sources += rebase_path( |
| 188 | gypi_values.chrome_browser_extensions_networking_private_sources, |
| 189 | ".", "//chrome") |
| 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) { |
| 193 | deps += [ |
| 194 | "//third_party/iaccessible2", |
| 195 | "//third_party/isimpledom", |
| 196 | ] |
| 197 | } else if (!is_chromeos) { |
[email protected] | 723b76b | 2014-08-21 23:48:59 | [diff] [blame] | 198 | sources += [ |
| 199 | "display_info_provider_aura.cc", |
| 200 | "display_info_provider_aura.h", |
| 201 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 202 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 203 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 204 | if (enable_app_list) { |
| 205 | sources += rebase_path( |
| 206 | gypi_values.chrome_browser_extensions_app_list_sources, |
| 207 | ".", "//chrome") |
| 208 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 209 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 210 | if (!use_ozone) { |
| 211 | sources -= [ |
| 212 | "global_shortcut_listener_ozone.cc", |
| 213 | ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 214 | } |
| 215 | } |