blob: 45dd2a26fe7103098dc56a4f92d6107a71dac2aa [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
5static_library("gcm_driver") {
6 sources = [
7 "android/component_jni_registrar.cc",
8 "android/component_jni_registrar.h",
9 "default_gcm_app_handler.cc",
10 "default_gcm_app_handler.h",
11 "gcm_activity.cc",
12 "gcm_activity.h",
13 "gcm_app_handler.cc",
14 "gcm_app_handler.h",
jianli1235e51c2014-09-08 18:56:4115 "gcm_backoff_policy.cc",
16 "gcm_backoff_policy.h",
17 "gcm_channel_status_request.cc",
18 "gcm_channel_status_request.h",
[email protected]abd4b682014-07-16 20:26:3019 "gcm_client.cc",
20 "gcm_client.h",
21 "gcm_client_factory.cc",
22 "gcm_client_factory.h",
23 "gcm_client_impl.cc",
24 "gcm_client_impl.h",
Brett Wilson83fd4242014-09-02 19:45:3325 "gcm_connection_observer.cc",
26 "gcm_connection_observer.h",
fgorski05d507c2014-09-10 17:28:1027 "gcm_delayed_task_controller.cc",
28 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3029 "gcm_driver.cc",
30 "gcm_driver.h",
31 "gcm_driver_android.cc",
32 "gcm_driver_android.h",
33 "gcm_driver_desktop.cc",
34 "gcm_driver_desktop.h",
35 "gcm_stats_recorder_impl.cc",
36 "gcm_stats_recorder_impl.h",
37 "system_encryptor.cc",
38 "system_encryptor.h",
39 ]
40
41 deps = [
42 "//base",
jianli1235e51c2014-09-08 18:56:4143 "//components/gcm_driver/proto",
[email protected]abd4b682014-07-16 20:26:3044 "//components/os_crypt",
45 "//google_apis/gcm",
46 "//net",
47 ]
48
49 if (is_android) {
50 sources -= [
jianli1235e51c2014-09-08 18:56:4151 "gcm_channel_status_request.cc",
52 "gcm_channel_status_request.h",
[email protected]abd4b682014-07-16 20:26:3053 "gcm_client_factory.cc",
54 "gcm_client_factory.h",
55 "gcm_client_impl.cc",
56 "gcm_client_impl.h",
fgorski05d507c2014-09-10 17:28:1057 "gcm_delayed_task_controller.cc",
58 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3059 "gcm_driver_desktop.cc",
60 "gcm_driver_desktop.h",
61 "gcm_stats_recorder_impl.cc",
62 "gcm_stats_recorder_impl.h",
63 ]
jianli1235e51c2014-09-08 18:56:4164 deps -= [
65 "//components/gcm_driver/proto",
66 "//google_apis/gcm",
67 ]
[email protected]abd4b682014-07-16 20:26:3068 deps += [ ":jni_headers" ]
69 }
70}
71
72static_library("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:4973 testonly = true
[email protected]abd4b682014-07-16 20:26:3074 sources = [
75 "fake_gcm_app_handler.cc",
76 "fake_gcm_app_handler.h",
77 "fake_gcm_client.cc",
78 "fake_gcm_client.h",
79 "fake_gcm_client_factory.cc",
80 "fake_gcm_client_factory.h",
81 "fake_gcm_driver.cc",
82 "fake_gcm_driver.h",
83 ]
84
85 deps = [
86 ":gcm_driver",
87 "//base",
88 "//google_apis/gcm",
89 "//testing/gtest",
90 ]
91
92 if (is_android) {
93 sources -= [
94 "fake_gcm_client.cc",
95 "fake_gcm_client.h",
96 "fake_gcm_client_factory.cc",
97 "fake_gcm_client_factory.h",
98 ]
99 deps -= [ "//google_apis/gcm" ]
100 }
101}
102
103#TODO(GYP) gcm_driver_java gcm_driver_jni_headers