[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 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. |
| 4 | |
James Robinson | 2ed4d69 | 2014-09-17 05:20:58 | [diff] [blame^] | 5 | # GYP version: components/gcm_driver.gypi:gcm_driver |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 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_activity.cc", |
| 13 | "gcm_activity.h", |
| 14 | "gcm_app_handler.cc", |
| 15 | "gcm_app_handler.h", |
jianli | 1235e51c | 2014-09-08 18:56:41 | [diff] [blame] | 16 | "gcm_backoff_policy.cc", |
| 17 | "gcm_backoff_policy.h", |
| 18 | "gcm_channel_status_request.cc", |
| 19 | "gcm_channel_status_request.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 20 | "gcm_client.cc", |
| 21 | "gcm_client.h", |
| 22 | "gcm_client_factory.cc", |
| 23 | "gcm_client_factory.h", |
| 24 | "gcm_client_impl.cc", |
| 25 | "gcm_client_impl.h", |
Brett Wilson | 83fd424 | 2014-09-02 19:45:33 | [diff] [blame] | 26 | "gcm_connection_observer.cc", |
| 27 | "gcm_connection_observer.h", |
fgorski | 05d507c | 2014-09-10 17:28:10 | [diff] [blame] | 28 | "gcm_delayed_task_controller.cc", |
| 29 | "gcm_delayed_task_controller.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 30 | "gcm_driver.cc", |
| 31 | "gcm_driver.h", |
| 32 | "gcm_driver_android.cc", |
| 33 | "gcm_driver_android.h", |
| 34 | "gcm_driver_desktop.cc", |
| 35 | "gcm_driver_desktop.h", |
| 36 | "gcm_stats_recorder_impl.cc", |
| 37 | "gcm_stats_recorder_impl.h", |
| 38 | "system_encryptor.cc", |
| 39 | "system_encryptor.h", |
| 40 | ] |
| 41 | |
| 42 | deps = [ |
| 43 | "//base", |
jianli | 1235e51c | 2014-09-08 18:56:41 | [diff] [blame] | 44 | "//components/gcm_driver/proto", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 45 | "//components/os_crypt", |
| 46 | "//google_apis/gcm", |
| 47 | "//net", |
| 48 | ] |
| 49 | |
| 50 | if (is_android) { |
| 51 | sources -= [ |
jianli | 1235e51c | 2014-09-08 18:56:41 | [diff] [blame] | 52 | "gcm_channel_status_request.cc", |
| 53 | "gcm_channel_status_request.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 54 | "gcm_client_factory.cc", |
| 55 | "gcm_client_factory.h", |
| 56 | "gcm_client_impl.cc", |
| 57 | "gcm_client_impl.h", |
fgorski | 05d507c | 2014-09-10 17:28:10 | [diff] [blame] | 58 | "gcm_delayed_task_controller.cc", |
| 59 | "gcm_delayed_task_controller.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 60 | "gcm_driver_desktop.cc", |
| 61 | "gcm_driver_desktop.h", |
| 62 | "gcm_stats_recorder_impl.cc", |
| 63 | "gcm_stats_recorder_impl.h", |
| 64 | ] |
jianli | 1235e51c | 2014-09-08 18:56:41 | [diff] [blame] | 65 | deps -= [ |
| 66 | "//components/gcm_driver/proto", |
| 67 | "//google_apis/gcm", |
| 68 | ] |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 69 | deps += [ ":jni_headers" ] |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | static_library("test_support") { |
Brett Wilson | 0c8745a | 2014-09-08 22:59:49 | [diff] [blame] | 74 | testonly = true |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 75 | sources = [ |
| 76 | "fake_gcm_app_handler.cc", |
| 77 | "fake_gcm_app_handler.h", |
| 78 | "fake_gcm_client.cc", |
| 79 | "fake_gcm_client.h", |
| 80 | "fake_gcm_client_factory.cc", |
| 81 | "fake_gcm_client_factory.h", |
| 82 | "fake_gcm_driver.cc", |
| 83 | "fake_gcm_driver.h", |
| 84 | ] |
| 85 | |
| 86 | deps = [ |
| 87 | ":gcm_driver", |
| 88 | "//base", |
| 89 | "//google_apis/gcm", |
| 90 | "//testing/gtest", |
| 91 | ] |
| 92 | |
| 93 | if (is_android) { |
| 94 | sources -= [ |
| 95 | "fake_gcm_client.cc", |
| 96 | "fake_gcm_client.h", |
| 97 | "fake_gcm_client_factory.cc", |
| 98 | "fake_gcm_client_factory.h", |
| 99 | ] |
| 100 | deps -= [ "//google_apis/gcm" ] |
| 101 | } |
| 102 | } |
| 103 | |
James Robinson | 2ed4d69 | 2014-09-17 05:20:58 | [diff] [blame^] | 104 | if (is_android) { |
| 105 | import("//build/config/android/rules.gni") |
| 106 | |
| 107 | # GYP version: components/gcm_driver.gypi:gcm_driver_jni_headers |
| 108 | generate_jni("jni_headers") { |
| 109 | sources = [ |
| 110 | "android/java/src/org/chromium/components/gcm_driver/GCMDriver.java", |
| 111 | ] |
| 112 | jni_package = "components/gcm_driver" |
| 113 | } |
| 114 | } |