blob: 92330f8007508cc2f217c8f2e9284171d21ec602 [file] [log] [blame]
[email protected]abd4b682014-07-16 20:26:301# 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
James Robinson2ed4d692014-09-17 05:20:585# GYP version: components/gcm_driver.gypi:gcm_driver
[email protected]abd4b682014-07-16 20:26:306static_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_activity.cc",
13 "gcm_activity.h",
fgorskid578c18b2014-09-24 23:40:1714 "gcm_account_mapper.cc",
15 "gcm_account_mapper.h",
[email protected]abd4b682014-07-16 20:26:3016 "gcm_app_handler.cc",
17 "gcm_app_handler.h",
jianli1235e51c2014-09-08 18:56:4118 "gcm_backoff_policy.cc",
19 "gcm_backoff_policy.h",
20 "gcm_channel_status_request.cc",
21 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4622 "gcm_channel_status_syncer.cc",
23 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3024 "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",
Brett Wilson83fd4242014-09-02 19:45:3330 "gcm_connection_observer.cc",
31 "gcm_connection_observer.h",
fgorski05d507c2014-09-10 17:28:1032 "gcm_delayed_task_controller.cc",
33 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3034 "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 ]
45
46 deps = [
47 "//base",
jianli1235e51c2014-09-08 18:56:4148 "//components/gcm_driver/proto",
[email protected]abd4b682014-07-16 20:26:3049 "//components/os_crypt",
50 "//google_apis/gcm",
51 "//net",
52 ]
53
54 if (is_android) {
55 sources -= [
fgorskid578c18b2014-09-24 23:40:1756 "gcm_account_mapper.cc",
57 "gcm_account_mapper.h",
jianli1235e51c2014-09-08 18:56:4158 "gcm_channel_status_request.cc",
59 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4660 "gcm_channel_status_syncer.cc",
61 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3062 "gcm_client_factory.cc",
63 "gcm_client_factory.h",
64 "gcm_client_impl.cc",
65 "gcm_client_impl.h",
fgorski05d507c2014-09-10 17:28:1066 "gcm_delayed_task_controller.cc",
67 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3068 "gcm_driver_desktop.cc",
69 "gcm_driver_desktop.h",
70 "gcm_stats_recorder_impl.cc",
71 "gcm_stats_recorder_impl.h",
72 ]
jianli1235e51c2014-09-08 18:56:4173 deps -= [
74 "//components/gcm_driver/proto",
75 "//google_apis/gcm",
76 ]
[email protected]abd4b682014-07-16 20:26:3077 deps += [ ":jni_headers" ]
78 }
79}
80
81static_library("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:4982 testonly = true
[email protected]abd4b682014-07-16 20:26:3083 sources = [
84 "fake_gcm_app_handler.cc",
85 "fake_gcm_app_handler.h",
86 "fake_gcm_client.cc",
87 "fake_gcm_client.h",
88 "fake_gcm_client_factory.cc",
89 "fake_gcm_client_factory.h",
90 "fake_gcm_driver.cc",
91 "fake_gcm_driver.h",
92 ]
93
94 deps = [
95 ":gcm_driver",
96 "//base",
97 "//google_apis/gcm",
98 "//testing/gtest",
99 ]
100
101 if (is_android) {
102 sources -= [
103 "fake_gcm_client.cc",
104 "fake_gcm_client.h",
105 "fake_gcm_client_factory.cc",
106 "fake_gcm_client_factory.h",
107 ]
108 deps -= [ "//google_apis/gcm" ]
109 }
110}
111
James Robinson2ed4d692014-09-17 05:20:58112if (is_android) {
113 import("//build/config/android/rules.gni")
114
115 # GYP version: components/gcm_driver.gypi:gcm_driver_jni_headers
116 generate_jni("jni_headers") {
117 sources = [
118 "android/java/src/org/chromium/components/gcm_driver/GCMDriver.java",
119 ]
120 jni_package = "components/gcm_driver"
121 }
122}