[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 | |
| 24 | # TODO(GYP) remove this when webrtc is ported. |
| 25 | configs += [ "//content:webrtc_stub_config" ] |
| 26 | |
| 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. |
| 32 | deps = [ |
| 33 | "//chrome:extra_resources", |
| 34 | "//chrome:resources", |
| 35 | "//chrome:strings", |
| 36 | "//chrome/app/resources:platform_locale_settings", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 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", |
| 40 | "//chrome/common", |
| 41 | "//chrome/common/extensions/api", |
| 42 | "//chrome/common/net", |
| 43 | "//chrome/common/safe_browsing:proto", |
| 44 | "//components/onc", |
| 45 | "//components/strings", |
| 46 | "//components/url_matcher", |
| 47 | "//content/public/browser", |
| 48 | "//content/public/common", |
| 49 | "//crypto", |
| 50 | "//extensions/common/api", |
| 51 | "//extensions/strings", |
| 52 | "//net", |
| 53 | "//skia", |
| 54 | "//sync", |
| 55 | "//third_party/cacheinvalidation", |
| 56 | "//third_party/icu", |
| 57 | "//third_party/leveldatabase", |
| 58 | "//third_party/re2", |
| 59 | "//ui/accessibility:ax_gen", |
| 60 | "//ui/base", |
| 61 | "//ui/gfx", |
| 62 | "//ui/gfx/geometry", |
| 63 | "//ui/resources", |
| 64 | "//ui/strings", |
| 65 | "//url", |
| 66 | "//webkit:resources", |
| 67 | "//webkit/browser:storage", |
| 68 | "//webkit/common:storage", |
| 69 | #"debugger", TODO(GYP) |
| 70 | #"installer_util", TODO(GYP) |
| 71 | #"../components/components.gyp:omaha_query_params", TODO(GYP) |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 72 | #'../device/bluetooth/bluetooth.gyp:device_bluetooth', TODO(GYP) |
| 73 | #"../device/hid/hid.gyp:device_hid", TODO(GYP) |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 74 | #"../extensions/extensions.gyp:extensions_browser", TODO(GYP) |
| 75 | #"../third_party/webrtc/modules/modules.gyp:desktop_capture", TODO(GYP) |
| 76 | ] |
| 77 | |
| 78 | forward_dependent_configs_from = [ |
| 79 | "//chrome/common/extensions/api", |
| 80 | "//content/public/browser", |
| 81 | ] |
| 82 | |
| 83 | if (is_chromeos) { |
| 84 | sources += rebase_path( |
| 85 | gypi_values.chrome_browser_extensions_chromeos_sources, |
| 86 | ".", "//chrome") |
| 87 | configs += [ "//build/config/linux:dbus" ] |
| 88 | deps += [ |
| 89 | "//third_party/libevent", |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 90 | "//third_party/protobuf:protobuf_lite", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 91 | #'../chromeos/ime/input_method.gyp:gencode', TODO(GYP) |
| 92 | ] |
| 93 | } else { |
| 94 | sources += [ |
| 95 | "default_apps.cc", |
| 96 | "default_apps.h'" |
| 97 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 98 | sources += rebase_path( |
| 99 | gypi_values.chrome_browser_extensions_non_chromeos_sources, |
| 100 | ".", "//chrome") |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 101 | } |
| 102 | |
| 103 | if (use_ash) { |
| 104 | sources += [ |
| 105 | "api/tabs/ash_panel_contents.cc", |
| 106 | "api/tabs/ash_panel_contents.h", |
| 107 | ] |
| 108 | } |
| 109 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 110 | if (is_linux) { |
| 111 | configs += [ "//build/config/linux:fontconfig" ] |
| 112 | deps += [ "//dbus" ] |
| 113 | if (use_x11) { |
| 114 | configs += [ |
| 115 | "//build/config/linux:x11", |
| 116 | ] |
| 117 | deps += [ |
| 118 | "//ui/events/platform", |
| 119 | "//ui/events/platform/x11", |
| 120 | ] |
| 121 | } |
| 122 | } else { |
| 123 | sources += [ |
| 124 | "api/audio/audio_service.cc", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 125 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [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 (enable_configuration_policy) { |
| 129 | deps += [ "//components/policy" ] |
| 130 | sources += [ |
| 131 | "policy_handlers.cc", |
| 132 | "policy_handlers.h", |
| 133 | ] |
| 134 | sources += rebase_path( |
| 135 | gypi_values.chrome_browser_extensions_policy_sources, |
| 136 | ".", "//chrome") |
| 137 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 138 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 139 | if (enable_webrtc) { |
| 140 | sources += [ |
| 141 | "api/webrtc_logging_private/webrtc_logging_private_api.cc", |
| 142 | ] |
| 143 | } else { |
| 144 | sources += [ |
| 145 | "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc", |
| 146 | ] |
| 147 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 148 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 149 | if (use_brlapi) { |
| 150 | deps += [ "//build/config/linux:libbrlapi" ] |
| 151 | sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources, |
| 152 | ".", "//chrome") |
| 153 | } else { |
| 154 | sources += [ |
| 155 | "api/braille_display_private/braille_controller_stub.cc", |
| 156 | ] |
| 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 (use_aura) { |
| 160 | deps += [ |
| 161 | "//ui/keyboard", |
| 162 | "//ui/keyboard:resources", |
| 163 | ] |
| 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_x11) { |
| 167 | sources -= [ |
| 168 | "global_shortcut_listener_x11.cc", |
| 169 | "global_shortcut_listener_x11.h", |
| 170 | ] |
| 171 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 172 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 173 | if (safe_browsing_mode == 1) { |
| 174 | defines += [ "FULL_SAFE_BROWSING" ] |
| 175 | } |
| 176 | if (safe_browsing_mode == 2) { |
| 177 | defines += [ "MOBILE_SAFE_BROWSING" ] |
| 178 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 179 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 180 | if (is_win || is_mac) { |
| 181 | deps += [ "//components/wifi" ] |
| 182 | sources += rebase_path( |
| 183 | gypi_values.chrome_browser_extensions_networking_private_sources, |
| 184 | ".", "//chrome") |
| 185 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 186 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 187 | if (is_win) { |
| 188 | deps += [ |
| 189 | "//third_party/iaccessible2", |
| 190 | "//third_party/isimpledom", |
| 191 | ] |
| 192 | } else if (!is_chromeos) { |
| 193 | sources += [ "api/system_display/display_info_provider_aura.cc" ] |
| 194 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 195 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 196 | if (enable_app_list) { |
| 197 | sources += rebase_path( |
| 198 | gypi_values.chrome_browser_extensions_app_list_sources, |
| 199 | ".", "//chrome") |
| 200 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 201 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame^] | 202 | if (!use_ozone) { |
| 203 | sources -= [ |
| 204 | "global_shortcut_listener_ozone.cc", |
| 205 | ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 206 | } |
| 207 | } |