blob: 9a1941b2fb4746abd6d473eaff499cd99f82ef7c [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",
[email protected]abd4b682014-07-16 20:26:3027 "gcm_driver.cc",
28 "gcm_driver.h",
29 "gcm_driver_android.cc",
30 "gcm_driver_android.h",
31 "gcm_driver_desktop.cc",
32 "gcm_driver_desktop.h",
33 "gcm_stats_recorder_impl.cc",
34 "gcm_stats_recorder_impl.h",
35 "system_encryptor.cc",
36 "system_encryptor.h",
37 ]
38
39 deps = [
40 "//base",
jianli1235e51c2014-09-08 18:56:4141 "//components/gcm_driver/proto",
[email protected]abd4b682014-07-16 20:26:3042 "//components/os_crypt",
43 "//google_apis/gcm",
44 "//net",
45 ]
46
47 if (is_android) {
48 sources -= [
jianli1235e51c2014-09-08 18:56:4149 "gcm_channel_status_request.cc",
50 "gcm_channel_status_request.h",
[email protected]abd4b682014-07-16 20:26:3051 "gcm_client_factory.cc",
52 "gcm_client_factory.h",
53 "gcm_client_impl.cc",
54 "gcm_client_impl.h",
55 "gcm_driver_desktop.cc",
56 "gcm_driver_desktop.h",
57 "gcm_stats_recorder_impl.cc",
58 "gcm_stats_recorder_impl.h",
59 ]
jianli1235e51c2014-09-08 18:56:4160 deps -= [
61 "//components/gcm_driver/proto",
62 "//google_apis/gcm",
63 ]
[email protected]abd4b682014-07-16 20:26:3064 deps += [ ":jni_headers" ]
65 }
66}
67
68static_library("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:4969 testonly = true
[email protected]abd4b682014-07-16 20:26:3070 sources = [
71 "fake_gcm_app_handler.cc",
72 "fake_gcm_app_handler.h",
73 "fake_gcm_client.cc",
74 "fake_gcm_client.h",
75 "fake_gcm_client_factory.cc",
76 "fake_gcm_client_factory.h",
77 "fake_gcm_driver.cc",
78 "fake_gcm_driver.h",
79 ]
80
81 deps = [
82 ":gcm_driver",
83 "//base",
84 "//google_apis/gcm",
85 "//testing/gtest",
86 ]
87
88 if (is_android) {
89 sources -= [
90 "fake_gcm_client.cc",
91 "fake_gcm_client.h",
92 "fake_gcm_client_factory.cc",
93 "fake_gcm_client_factory.h",
94 ]
95 deps -= [ "//google_apis/gcm" ]
96 }
97}
98
99#TODO(GYP) gcm_driver_java gcm_driver_jni_headers