Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / components / gcm_driver / BUILD.gn
blobe8c9a17052aeaf730c5ab9550e5bd12644c17064
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.
5 # GYP version: components/gcm_driver.gypi:gcm_driver
6 static_library("gcm_driver") {
7   sources = [
8     "android/component_jni_registrar.cc",
9     "android/component_jni_registrar.h",
10     "default_gcm_app_handler.cc",
11     "default_gcm_app_handler.h",
12     "gcm_account_mapper.cc",
13     "gcm_account_mapper.h",
14     "gcm_activity.cc",
15     "gcm_activity.h",
16     "gcm_app_handler.cc",
17     "gcm_app_handler.h",
18     "gcm_backoff_policy.cc",
19     "gcm_backoff_policy.h",
20     "gcm_channel_status_request.cc",
21     "gcm_channel_status_request.h",
22     "gcm_channel_status_syncer.cc",
23     "gcm_channel_status_syncer.h",
24     "gcm_client.cc",
25     "gcm_client.h",
26     "gcm_client_factory.cc",
27     "gcm_client_factory.h",
28     "gcm_client_impl.cc",
29     "gcm_client_impl.h",
30     "gcm_connection_observer.cc",
31     "gcm_connection_observer.h",
32     "gcm_delayed_task_controller.cc",
33     "gcm_delayed_task_controller.h",
34     "gcm_driver.cc",
35     "gcm_driver.h",
36     "gcm_driver_android.cc",
37     "gcm_driver_android.h",
38     "gcm_driver_desktop.cc",
39     "gcm_driver_desktop.h",
40     "gcm_stats_recorder_impl.cc",
41     "gcm_stats_recorder_impl.h",
42     "system_encryptor.cc",
43     "system_encryptor.h",
44   ]
46   deps = [
47     "//base",
48     "//components/os_crypt",
49     "//google_apis/gcm",
50     "//net",
51     "//sync/protocol",
52   ]
54   if (is_chromeos) {
55     deps += [ "//components/timers" ]
56   }
58   if (is_android) {
59     sources -= [
60       "gcm_account_mapper.cc",
61       "gcm_account_mapper.h",
62       "gcm_channel_status_request.cc",
63       "gcm_channel_status_request.h",
64       "gcm_channel_status_syncer.cc",
65       "gcm_channel_status_syncer.h",
66       "gcm_client_factory.cc",
67       "gcm_client_factory.h",
68       "gcm_client_impl.cc",
69       "gcm_client_impl.h",
70       "gcm_delayed_task_controller.cc",
71       "gcm_delayed_task_controller.h",
72       "gcm_driver_desktop.cc",
73       "gcm_driver_desktop.h",
74       "gcm_stats_recorder_impl.cc",
75       "gcm_stats_recorder_impl.h",
76     ]
77     deps -= [ "//google_apis/gcm" ]
78     deps += [ "android:jni_headers" ]
79   }
82 static_library("test_support") {
83   testonly = true
84   sources = [
85     "fake_gcm_app_handler.cc",
86     "fake_gcm_app_handler.h",
87     "fake_gcm_client.cc",
88     "fake_gcm_client.h",
89     "fake_gcm_client_factory.cc",
90     "fake_gcm_client_factory.h",
91     "fake_gcm_driver.cc",
92     "fake_gcm_driver.h",
93   ]
95   deps = [
96     ":gcm_driver",
97     "//base",
98     "//google_apis/gcm",
99     "//testing/gtest",
100   ]
102   if (is_android) {
103     sources -= [
104       "fake_gcm_client.cc",
105       "fake_gcm_client.h",
106       "fake_gcm_client_factory.cc",
107       "fake_gcm_client_factory.h",
108     ]
109     deps -= [ "//google_apis/gcm" ]
110   }