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 5import("//build/config/features.gni") 6 7# GYP version: extensions/extensions.gyp:extensions_common 8source_set("common") { 9 sources = [ 10 "api/messaging/message.h", 11 "api/bluetooth/bluetooth_manifest_data.cc", 12 "api/bluetooth/bluetooth_manifest_data.h", 13 "api/bluetooth/bluetooth_manifest_handler.cc", 14 "api/bluetooth/bluetooth_manifest_handler.h", 15 "api/bluetooth/bluetooth_manifest_permission.cc", 16 "api/bluetooth/bluetooth_manifest_permission.h", 17 "api/sockets/sockets_manifest_data.cc", 18 "api/sockets/sockets_manifest_data.h", 19 "api/sockets/sockets_manifest_handler.cc", 20 "api/sockets/sockets_manifest_handler.h", 21 "api/sockets/sockets_manifest_permission.cc", 22 "api/sockets/sockets_manifest_permission.h", 23 "common_manifest_handlers.cc", 24 "common_manifest_handlers.h", 25 "constants.cc", 26 "constants.h", 27 "csp_validator.cc", 28 "csp_validator.h", 29 "dom_action_types.h", 30 "draggable_region.cc", 31 "draggable_region.h", 32 "error_utils.cc", 33 "error_utils.h", 34 "event_filter.cc", 35 "event_filter.h", 36 "event_filtering_info.cc", 37 "event_filtering_info.h", 38 "event_matcher.cc", 39 "event_matcher.h", 40 "extension.cc", 41 "extension.h", 42 "extension_api.cc", 43 "extension_api.h", 44 "extension_api_stub.cc", 45 "extension_icon_set.cc", 46 "extension_icon_set.h", 47 "extension_l10n_util.cc", 48 "extension_l10n_util.h", 49 "extension_message_generator.cc", 50 "extension_message_generator.h", 51 "extension_messages.cc", 52 "extension_messages.h", 53 "extension_paths.cc", 54 "extension_paths.h", 55 "extension_resource.cc", 56 "extension_resource.h", 57 "extension_set.cc", 58 "extension_set.h", 59 "extension_urls.cc", 60 "extension_urls.h", 61 "extensions_client.cc", 62 "extensions_client.h", 63 "feature_switch.cc", 64 "feature_switch.h", 65 "features/api_feature.cc", 66 "features/api_feature.h", 67 "features/base_feature_provider.cc", 68 "features/base_feature_provider.h", 69 "features/complex_feature.cc", 70 "features/complex_feature.h", 71 "features/feature.cc", 72 "features/feature.h", 73 "features/feature_provider.cc", 74 "features/feature_provider.h", 75 "features/json_feature_provider_source.cc", 76 "features/json_feature_provider_source.h", 77 "features/manifest_feature.cc", 78 "features/manifest_feature.h", 79 "features/permission_feature.cc", 80 "features/permission_feature.h", 81 "features/simple_feature.cc", 82 "features/simple_feature.h", 83 "features/simple_feature_filter.cc", 84 "features/simple_feature_filter.h", 85 "file_util.cc", 86 "file_util.h", 87 "guest_view/guest_view_constants.cc", 88 "guest_view/guest_view_constants.h", 89 "install_warning.cc", 90 "install_warning.h", 91 "manifest.cc", 92 "manifest.h", 93 "manifest_constants.cc", 94 "manifest_constants.h", 95 "manifest_handler.cc", 96 "manifest_handler.h", 97 "manifest_handler_helpers.cc", 98 "manifest_handler_helpers.h", 99 "manifest_handlers/background_info.cc", 100 "manifest_handlers/background_info.h", 101 "manifest_handlers/csp_info.cc", 102 "manifest_handlers/csp_info.h", 103 "manifest_handlers/externally_connectable.cc", 104 "manifest_handlers/externally_connectable.h", 105 "manifest_handlers/file_handler_info.cc", 106 "manifest_handlers/file_handler_info.h", 107 "manifest_handlers/icons_handler.cc", 108 "manifest_handlers/icons_handler.h", 109 "manifest_handlers/incognito_info.cc", 110 "manifest_handlers/incognito_info.h", 111 "manifest_handlers/kiosk_mode_info.cc", 112 "manifest_handlers/kiosk_mode_info.h", 113 "manifest_handlers/launcher_page_info.cc", 114 "manifest_handlers/launcher_page_info.h", 115 "manifest_handlers/offline_enabled_info.cc", 116 "manifest_handlers/offline_enabled_info.h", 117 "manifest_handlers/options_page_info.cc", 118 "manifest_handlers/options_page_info.h", 119 "manifest_handlers/permissions_parser.cc", 120 "manifest_handlers/permissions_parser.h", 121 "manifest_handlers/requirements_info.cc", 122 "manifest_handlers/requirements_info.h", 123 "manifest_handlers/sandboxed_page_info.cc", 124 "manifest_handlers/sandboxed_page_info.h", 125 "manifest_handlers/shared_module_info.cc", 126 "manifest_handlers/shared_module_info.h", 127 "manifest_handlers/web_accessible_resources_info.cc", 128 "manifest_handlers/web_accessible_resources_info.h", 129 "manifest_handlers/webview_info.cc", 130 "manifest_handlers/webview_info.h", 131 "message_bundle.cc", 132 "message_bundle.h", 133 "one_shot_event.cc", 134 "one_shot_event.h", 135 "permissions/api_permission.cc", 136 "permissions/api_permission.h", 137 "permissions/api_permission_set.cc", 138 "permissions/api_permission_set.h", 139 "permissions/base_set_operators.h", 140 "permissions/extensions_api_permissions.cc", 141 "permissions/extensions_api_permissions.h", 142 "permissions/manifest_permission.cc", 143 "permissions/manifest_permission.h", 144 "permissions/manifest_permission_set.cc", 145 "permissions/manifest_permission_set.h", 146 "permissions/media_galleries_permission.cc", 147 "permissions/media_galleries_permission.h", 148 "permissions/media_galleries_permission_data.cc", 149 "permissions/media_galleries_permission_data.h", 150 "permissions/permission_message.cc", 151 "permissions/permission_message.h", 152 "permissions/permission_message_provider.cc", 153 "permissions/permission_message_provider.h", 154 "permissions/permission_message_util.cc", 155 "permissions/permission_message_util.h", 156 "permissions/permission_set.cc", 157 "permissions/permission_set.h", 158 "permissions/permissions_data.cc", 159 "permissions/permissions_data.h", 160 "permissions/permissions_info.cc", 161 "permissions/permissions_info.h", 162 "permissions/permissions_provider.h", 163 "permissions/set_disjunction_permission.h", 164 "permissions/settings_override_permission.cc", 165 "permissions/settings_override_permission.h", 166 "permissions/socket_permission.cc", 167 "permissions/socket_permission.h", 168 "permissions/socket_permission_data.cc", 169 "permissions/socket_permission_data.h", 170 "permissions/socket_permission_entry.cc", 171 "permissions/socket_permission_entry.h", 172 "permissions/usb_device_permission.cc", 173 "permissions/usb_device_permission.h", 174 "permissions/usb_device_permission_data.cc", 175 "permissions/usb_device_permission_data.h", 176 "stack_frame.cc", 177 "stack_frame.h", 178 "switches.cc", 179 "switches.h", 180 "update_manifest.cc", 181 "update_manifest.h", 182 "url_pattern.cc", 183 "url_pattern.h", 184 "url_pattern_set.cc", 185 "url_pattern_set.h", 186 "user_script.cc", 187 "user_script.h", 188 "value_counter.cc", 189 "value_counter.h", 190 "view_type.cc", 191 "view_type.h", 192 ] 193 194 deps = [ 195 # TODO(benwells): figure out what to do with the api target and 196 # api resources compiled into the chrome resource bundle. 197 # http://crbug.com/162530 198 "//chrome:resources", 199 "//components/crx_file", 200 "//components/url_matcher", 201 "//content/public/common", 202 "//crypto", 203 "//extensions/strings", 204 "//ipc", 205 "//net", 206 "//third_party/icu", 207 "//third_party/libxml", 208 "//third_party/re2", 209 "//ui/base", 210 "//ui/gfx/geometry", 211 "//ui/gfx/ipc", 212 "//url", 213 ] 214 215 if (enable_extensions) { 216 sources -= [ 217 "extension_api_stub.cc", 218 ] 219 220 deps += [ 221 "//device/bluetooth", 222 "//device/usb", 223 "//extensions/common/api", 224 ] 225 } else { 226 sources -= [ 227 "api/bluetooth/bluetooth_manifest_data.cc", 228 "api/bluetooth/bluetooth_manifest_data.h", 229 "api/bluetooth/bluetooth_manifest_handler.cc", 230 "api/bluetooth/bluetooth_manifest_handler.h", 231 "api/bluetooth/bluetooth_manifest_permission.cc", 232 "api/bluetooth/bluetooth_manifest_permission.h", 233 "api/messaging/message.h", 234 "api/sockets/sockets_manifest_data.cc", 235 "api/sockets/sockets_manifest_data.h", 236 "api/sockets/sockets_manifest_handler.cc", 237 "api/sockets/sockets_manifest_handler.h", 238 "api/sockets/sockets_manifest_permission.cc", 239 "api/sockets/sockets_manifest_permission.h", 240 "extension_api.cc", 241 "manifest_handlers/externally_connectable.cc", 242 "manifest_handlers/externally_connectable.h", 243 "manifest_handlers/options_page_info.cc", 244 "manifest_handlers/options_page_info.h", 245 ] 246 } 247 248 if (enable_nacl) { 249 sources += [ 250 "manifest_handlers/nacl_modules_handler.cc", 251 "manifest_handlers/nacl_modules_handler.h", 252 ] 253 } 254 255 if (is_win) { 256 cflags = [ 257 "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 258 ] 259 } 260} 261