blob: eb6c8117b4246ccc4ff048c34bc5c856570ed71b [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") {
69 sources = [
70 "fake_gcm_app_handler.cc",
71 "fake_gcm_app_handler.h",
72 "fake_gcm_client.cc",
73 "fake_gcm_client.h",
74 "fake_gcm_client_factory.cc",
75 "fake_gcm_client_factory.h",
76 "fake_gcm_driver.cc",
77 "fake_gcm_driver.h",
78 ]
79
80 deps = [
81 ":gcm_driver",
82 "//base",
83 "//google_apis/gcm",
84 "//testing/gtest",
85 ]
86
87 if (is_android) {
88 sources -= [
89 "fake_gcm_client.cc",
90 "fake_gcm_client.h",
91 "fake_gcm_client_factory.cc",
92 "fake_gcm_client_factory.h",
93 ]
94 deps -= [ "//google_apis/gcm" ]
95 }
96}
97
98#TODO(GYP) gcm_driver_java gcm_driver_jni_headers