Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / api.gyp
1 # Copyright (c) 2012 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 {
6   # All files are stored in these lists which are referenced in the target
7   # below so that the GN build of this target can read in this dictionary and
8   # duplicate the same logic without the lists getting out-of-sync. The GN
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': {
15     # These duplicate other lists and are the only ones used on Android. They
16     # should be eliminated. See crbug.com/305852.
17     'android_schema_files': [
18       'manifest_types.json',
19     ],
20
21     # These are used everywhere except Android.
22     'main_schema_files': [
23       'accessibility_private.json',
24       'activity_log_private.json',
25       'alarms.idl',
26       'app_current_window_internal.idl',
27       'app_window.idl',
28       'audio.idl',
29       'automation.idl',
30       'automation_internal.idl',
31       'autotest_private.idl',
32       'bluetooth.idl',
33       'bluetooth_low_energy.idl',
34       'bluetooth_private.json',
35       'bluetooth_socket.idl',
36       'bookmark_manager_private.json',
37       'bookmarks.json',
38       'braille_display_private.idl',
39       'browser.idl',
40       'cloud_print_private.json',
41       'command_line_private.json',
42       'content_settings.json',
43       'context_menus_internal.json',
44       'context_menus.json',
45       'cookies.json',
46       'copresence.idl',
47       'copresence_private.idl',
48       'debugger.json',
49       'desktop_capture.json',
50       'developer_private.idl',
51       'dial.idl',
52       'downloads.idl',
53       'downloads_internal.idl',
54       'easy_unlock_private.idl',
55       'echo_private.json',
56       'enterprise_platform_keys_private.json',
57       'events.json',
58       'experience_sampling_private.json',
59       'extension_options_internal.idl',
60       'feedback_private.idl',
61       'file_browser_private.idl',
62       'file_browser_private_internal.idl',
63       'file_system.idl',
64       'file_system_provider.idl',
65       'file_system_provider_internal.idl',
66       'font_settings.json',
67       'gcd_private.idl',
68       'gcm.json',
69       'guest_view_internal.json',
70       'hangouts_private.idl',
71       'history.json',
72       'hotword_private.idl',
73       'i18n.json',
74       'identity.idl',
75       'identity_private.idl',
76       'idle.json',
77       'image_writer_private.idl',
78       'input_ime.json',
79       'location.idl',
80       'management.json',
81       'manifest_types.json',
82       'mdns.idl',
83       'media_galleries.idl',
84       'media_galleries_private.idl',
85       'metrics_private.json',
86       'networking_private.json',
87       'notification_provider.idl',
88       'notifications.idl',
89       'omnibox.json',
90       'page_capture.json',
91       'permissions.json',
92       'preferences_private.json',
93       'push_messaging.idl',
94       'reading_list_private.json',
95       'screenlock_private.idl',
96       'sessions.json',
97       'signed_in_devices.idl',
98       'streams_private.idl',
99       'synced_notifications_private.idl',
100       'sync_file_system.idl',
101       'system_cpu.idl',
102       'system_display.idl',
103       'system_indicator.idl',
104       'system_memory.idl',
105       'system_network.idl',
106       'system_private.json',
107       'system_storage.idl',
108       'tab_capture.idl',
109       'tabs.json',
110       'terminal_private.json',
111       'types.json',
112       'virtual_keyboard_private.json',
113       'web_navigation.json',
114       'web_request.json',
115       # Despite the name, this API does not rely on any
116       # WebRTC-specific bits and as such does not belong in
117       # the enable_webrtc==0 section below.
118       'webrtc_audio_private.idl',
119       'webrtc_logging_private.idl',
120       'webstore_private.json',
121       'web_view_internal.json',
122       'windows.json',
123     ],
124     'main_non_compiled_schema_files': [
125       'browsing_data.json',
126       'chromeos_info_private.json',
127       'extension.json',
128       'idltest.idl',
129       'infobars.json',
130       'media_player_private.json',
131       'music_manager_private.idl',
132       'principals_private.idl',
133       'top_sites.json',
134       'web_request_internal.json',
135     ],
136
137     # ChromeOS-specific schemas.
138     'chromeos_schema_files': [
139       'accessibility_features.json',
140       'diagnostics.idl',
141       'enterprise_platform_keys.idl',
142       'enterprise_platform_keys_internal.idl',
143       'file_browser_handler_internal.json',
144       'first_run_private.json',
145       'log_private.idl',
146       'wallpaper.json',
147       'wallpaper_private.json',
148       'webcam_private.idl',
149     ],
150     'chromeos_branded_schema_files': [
151       'ledger/ledger.idl',
152     ],
153
154     'webrtc_schema_files': [
155       'cast_streaming_rtp_stream.idl',
156       'cast_streaming_session.idl',
157       'cast_streaming_udp_transport.idl',
158     ],
159   },
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 }