| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 # All files are stored in these lists which are referenced in the target | 6 'sources': [ |
| 7 # below so that the GN build of this target can read in this dictionary and | 7 '<@(schema_files)', |
| 8 # duplicate the same logic without the lists getting out-of-sync. The GN | 8 ], |
| 9 # .gypi reader can not process conditions and does not know about targets, | |
| 10 # etc., it just reads Python dictionaries. | |
| 11 # | |
| 12 # If you add a new category, also add it to the BUILD.gn file in this | |
| 13 # directory. | |
| 14 'variables': { | 9 'variables': { |
| 15 # These duplicate other lists and are the only ones used on Android. They | 10 # These duplicate other lists and are the only ones used on Android. They |
| 16 # should be eliminated. See crbug.com/305852. | 11 # should be eliminated. See crbug.com/305852. |
| 17 'android_schema_files': [ | 12 'android_schema_files': [ |
| 18 'manifest_types.json', | 13 'manifest_types.json', |
| 19 ], | 14 ], |
| 20 | 15 |
| 21 # These are used everywhere except Android. | 16 # These are used everywhere except Android. |
| 22 'main_schema_files': [ | 17 'main_schema_files': [ |
| 23 'accessibility_private.json', | 18 'accessibility_private.json', |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 ], | 144 ], |
| 150 'chromeos_branded_schema_files': [ | 145 'chromeos_branded_schema_files': [ |
| 151 'ledger/ledger.idl', | 146 'ledger/ledger.idl', |
| 152 ], | 147 ], |
| 153 | 148 |
| 154 'webrtc_schema_files': [ | 149 'webrtc_schema_files': [ |
| 155 'cast_streaming_rtp_stream.idl', | 150 'cast_streaming_rtp_stream.idl', |
| 156 'cast_streaming_session.idl', | 151 'cast_streaming_session.idl', |
| 157 'cast_streaming_udp_transport.idl', | 152 'cast_streaming_udp_transport.idl', |
| 158 ], | 153 ], |
| 154 |
| 155 'chromium_code': 1, |
| 156 # Disable schema compiler to generate model extension API code. |
| 157 # Only register the extension functions in extension system. |
| 158 'conditions': [ |
| 159 ['enable_extensions==1', { |
| 160 'non_compiled_schema_files': [ |
| 161 '<@(main_non_compiled_schema_files)', |
| 162 ], |
| 163 'schema_files': [ |
| 164 '<@(main_schema_files)', |
| 165 ], |
| 166 }, { # enable_extensions==0 |
| 167 'non_compiled_schema_files': [ |
| 168 ], |
| 169 'schema_files': [ |
| 170 # These should be eliminated. See crbug.com/305852. |
| 171 '<@(android_schema_files)', |
| 172 ], |
| 173 }], |
| 174 ['chromeos==1', { |
| 175 'schema_files': [ |
| 176 '<@(chromeos_schema_files)', |
| 177 ], |
| 178 }], |
| 179 ['enable_extensions==1 and enable_webrtc==1', { |
| 180 'schema_files': [ |
| 181 '<@(webrtc_schema_files)', |
| 182 ], |
| 183 }], |
| 184 ['branding=="Chrome" and chromeos==1', { |
| 185 'schema_files': [ |
| 186 '<@(chromeos_branded_schema_files)', |
| 187 ], |
| 188 }], |
| 189 ], |
| 190 'cc_dir': 'chrome/common/extensions/api', |
| 191 'root_namespace': 'extensions::api::%(namespace)s', |
| 192 'impl_dir_': 'chrome/browser/extensions/api', |
| 159 }, | 193 }, |
| 160 'targets': [ | |
| 161 { | |
| 162 # GN version: //chrome/common/extensions/api:api | |
| 163 'target_name': 'chrome_api', | |
| 164 'type': 'static_library', | |
| 165 'sources': [ | |
| 166 '<@(schema_files)', | |
| 167 ], | |
| 168 # TODO(jschuh): http://crbug.com/167187 size_t -> int | |
| 169 'msvs_disabled_warnings': [ 4267 ], | |
| 170 'includes': [ | |
| 171 '../../../../build/json_schema_bundle_compile.gypi', | |
| 172 '../../../../build/json_schema_compile.gypi', | |
| 173 ], | |
| 174 'variables': { | |
| 175 'chromium_code': 1, | |
| 176 # Disable schema compiler to generate model extension API code. | |
| 177 # Only register the extension functions in extension system. | |
| 178 'conditions': [ | |
| 179 ['enable_extensions==1', { | |
| 180 'non_compiled_schema_files': [ | |
| 181 '<@(main_non_compiled_schema_files)', | |
| 182 ], | |
| 183 'schema_files': [ | |
| 184 '<@(main_schema_files)', | |
| 185 ], | |
| 186 }, { # enable_extensions==0 | |
| 187 'non_compiled_schema_files': [ | |
| 188 ], | |
| 189 'schema_files': [ | |
| 190 # These should be eliminated. See crbug.com/305852. | |
| 191 '<@(android_schema_files)', | |
| 192 ], | |
| 193 }], | |
| 194 ['chromeos==1', { | |
| 195 'schema_files': [ | |
| 196 '<@(chromeos_schema_files)', | |
| 197 ], | |
| 198 }], | |
| 199 ['enable_extensions==1 and enable_webrtc==1', { | |
| 200 'schema_files': [ | |
| 201 '<@(webrtc_schema_files)', | |
| 202 ], | |
| 203 }], | |
| 204 ['branding=="Chrome" and chromeos==1', { | |
| 205 'schema_files': [ | |
| 206 '<@(chromeos_branded_schema_files)', | |
| 207 ], | |
| 208 }], | |
| 209 ], | |
| 210 'cc_dir': 'chrome/common/extensions/api', | |
| 211 'root_namespace': 'extensions::api::%(namespace)s', | |
| 212 }, | |
| 213 'dependencies': [ | |
| 214 # Different APIs include some headers from chrome/common that in turn | |
| 215 # include generated headers from these targets. | |
| 216 # TODO(brettw) this should be made unnecessary if possible. | |
| 217 '<(DEPTH)/components/components.gyp:component_metrics_proto', | |
| 218 | |
| 219 '<(DEPTH)/content/content.gyp:content_browser', | |
| 220 '<(DEPTH)/skia/skia.gyp:skia', | |
| 221 '<(DEPTH)/sync/sync.gyp:sync', | |
| 222 ], | |
| 223 'conditions': [ | |
| 224 ['chromeos==1', { | |
| 225 'dependencies': [ | |
| 226 '<(DEPTH)/chrome/chrome.gyp:drive_proto', | |
| 227 ], | |
| 228 }], | |
| 229 ], | |
| 230 }, | |
| 231 ], | |
| 232 } | 194 } |
| OLD | NEW |