Enforce lowercase switches when calling CommandLine::HasSwitch.
[chromium-blink-merge.git] / components / gcm_driver.gypi
blobe783ba953c4d9abac05f54bda34f77d968d696f8
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.
6   'targets': [
7     {
8       # GN version: //components/gcm_driver
9       'target_name': 'gcm_driver',
10       'type': 'static_library',
11       'dependencies': [
12         'os_crypt',
13         '../base/base.gyp:base',
14         '../google_apis/gcm/gcm.gyp:gcm',
15         '../net/net.gyp:net',
16         '../sync/sync.gyp:sync_proto',
17       ],
18       'include_dirs': [
19         '..',
20       ],
21       'sources': [
22          # Note: file list duplicated in GN build.
23         'gcm_driver/android/component_jni_registrar.cc',
24         'gcm_driver/android/component_jni_registrar.h',
25         'gcm_driver/default_gcm_app_handler.cc',
26         'gcm_driver/default_gcm_app_handler.h',
27         'gcm_driver/gcm_account_mapper.cc',
28         'gcm_driver/gcm_account_mapper.h',
29         'gcm_driver/gcm_activity.cc',
30         'gcm_driver/gcm_activity.h',
31         'gcm_driver/gcm_app_handler.cc',
32         'gcm_driver/gcm_app_handler.h',
33         'gcm_driver/gcm_backoff_policy.cc',
34         'gcm_driver/gcm_backoff_policy.h',
35         'gcm_driver/gcm_channel_status_request.cc',
36         'gcm_driver/gcm_channel_status_request.h',
37         'gcm_driver/gcm_channel_status_syncer.cc',
38         'gcm_driver/gcm_channel_status_syncer.h',
39         'gcm_driver/gcm_client.cc',
40         'gcm_driver/gcm_client.h',
41         'gcm_driver/gcm_client_factory.cc',
42         'gcm_driver/gcm_client_factory.h',
43         'gcm_driver/gcm_client_impl.cc',
44         'gcm_driver/gcm_client_impl.h',
45         'gcm_driver/gcm_connection_observer.cc',
46         'gcm_driver/gcm_connection_observer.h',
47         'gcm_driver/gcm_delayed_task_controller.cc',
48         'gcm_driver/gcm_delayed_task_controller.h',
49         'gcm_driver/gcm_driver.cc',
50         'gcm_driver/gcm_driver.h',
51         'gcm_driver/gcm_driver_android.cc',
52         'gcm_driver/gcm_driver_android.h',
53         'gcm_driver/gcm_driver_desktop.cc',
54         'gcm_driver/gcm_driver_desktop.h',
55         'gcm_driver/gcm_stats_recorder_impl.cc',
56         'gcm_driver/gcm_stats_recorder_impl.h',
57         'gcm_driver/system_encryptor.cc',
58         'gcm_driver/system_encryptor.h',
59       ],
60       'variables': {
61         'proto_in_dir': 'gcm_driver/proto',
62         'proto_out_dir': 'components/gcm_driver/proto',
63       },
64       'includes': [ '../build/protoc.gypi' ],
65       'conditions': [
66         ['OS == "android"', {
67           'dependencies': [
68             'gcm_driver_jni_headers',
69           ],
70           'dependencies!': [
71             '../google_apis/gcm/gcm.gyp:gcm',
72           ],
73           'sources!': [
74             'gcm_driver/gcm_account_mapper.cc',
75             'gcm_driver/gcm_account_mapper.h',
76             'gcm_driver/gcm_channel_status_request.cc',
77             'gcm_driver/gcm_channel_status_request.h',
78             'gcm_driver/gcm_channel_status_syncer.cc',
79             'gcm_driver/gcm_channel_status_syncer.h',
80             'gcm_driver/gcm_client_factory.cc',
81             'gcm_driver/gcm_client_factory.h',
82             'gcm_driver/gcm_client_impl.cc',
83             'gcm_driver/gcm_client_impl.h',
84             'gcm_driver/gcm_delayed_task_controller.cc',
85             'gcm_driver/gcm_delayed_task_controller.h',
86             'gcm_driver/gcm_driver_desktop.cc',
87             'gcm_driver/gcm_driver_desktop.h',
88             'gcm_driver/gcm_stats_recorder_impl.cc',
89             'gcm_driver/gcm_stats_recorder_impl.h',
90             'gcm_driver/proto/gcm_channel_status.proto',
91           ],
92         }],
93         ['chromeos == 1', {
94           'dependencies': [
95             'timers',
96           ],
97         }],
98       ],
99     },
100     {
101       # GN version: //components/gcm_driver:test_support
102       'target_name': 'gcm_driver_test_support',
103       'type': 'static_library',
104       'dependencies': [
105         'gcm_driver',
106         '../base/base.gyp:base',
107         '../google_apis/gcm/gcm.gyp:gcm_test_support',
108         '../testing/gtest.gyp:gtest',
109       ],
110       'include_dirs': [
111         '..',
112       ],
113       'sources': [
114         # Note: file list duplicated in GN build.
115         'gcm_driver/fake_gcm_app_handler.cc',
116         'gcm_driver/fake_gcm_app_handler.h',
117         'gcm_driver/fake_gcm_client.cc',
118         'gcm_driver/fake_gcm_client.h',
119         'gcm_driver/fake_gcm_client_factory.cc',
120         'gcm_driver/fake_gcm_client_factory.h',
121         'gcm_driver/fake_gcm_driver.cc',
122         'gcm_driver/fake_gcm_driver.h',
123       ],
124       'conditions': [
125         ['OS == "android"', {
126           'dependencies!': [
127             '../google_apis/gcm/gcm.gyp:gcm_test_support',
128           ],
129           'sources!': [
130             'gcm_driver/fake_gcm_client.cc',
131             'gcm_driver/fake_gcm_client.h',
132             'gcm_driver/fake_gcm_client_factory.cc',
133             'gcm_driver/fake_gcm_client_factory.h',
134           ],
135         }],
136       ],
137     },
138   ],
139   'conditions': [
140     ['OS == "android"', {
141       'targets': [
142         {
143           # GN version: //components/gcm_driver/android:gcm_driver_java
144           'target_name': 'gcm_driver_java',
145           'type': 'none',
146           'dependencies': [
147             '../base/base.gyp:base',
148             # TODO(johnme): Fix the layering violation of depending on content/
149             '../content/content.gyp:content_java',
150             '../sync/sync.gyp:sync_java',
151           ],
152           'variables': {
153             'java_in_dir': 'gcm_driver/android/java',
154           },
155           'includes': [ '../build/java.gypi' ],
156         },
157         {
158           # GN version: //components/gcm_driver/android:jni_headers
159           'target_name': 'gcm_driver_jni_headers',
160           'type': 'none',
161           'sources': [
162             'gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java',
163           ],
164           'variables': {
165             'jni_gen_package': 'components/gcm_driver',
166           },
167           'includes': [ '../build/jni_generator.gypi' ],
168         },
169       ],
170      },
171     ],
172   ],