erikchen | a9db3a7 | 2018-04-12 16:24:00 | [diff] [blame] | 1 | # Copyright 2018 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 | |
erikchen | 3866efb | 2018-04-24 15:48:19 | [diff] [blame] | 5 | if (is_android) { |
| 6 | import("//build/config/android/rules.gni") |
| 7 | } |
| 8 | |
erikchen | a9db3a7 | 2018-04-12 16:24:00 | [diff] [blame] | 9 | static_library("heap_profiling") { |
| 10 | sources = [ |
| 11 | "client_connection_manager.cc", |
| 12 | "client_connection_manager.h", |
Erik Chen | 74cba8c | 2018-04-16 18:49:49 | [diff] [blame] | 13 | "supervisor.cc", |
| 14 | "supervisor.h", |
erikchen | a9db3a7 | 2018-04-12 16:24:00 | [diff] [blame] | 15 | ] |
| 16 | |
| 17 | deps = [ |
| 18 | "//base", |
| 19 | "//components/services/heap_profiling/public/cpp", |
| 20 | "//content/public/browser", |
| 21 | "//content/public/common", |
| 22 | ] |
| 23 | } |
Erik Chen | 74cba8c | 2018-04-16 18:49:49 | [diff] [blame] | 24 | |
erikchen | 3866efb | 2018-04-24 15:48:19 | [diff] [blame] | 25 | if (is_android) { |
| 26 | generate_jni("jni_headers") { |
| 27 | sources = [ |
| 28 | "javatests/src/org/chromium/components/heap_profiling/HeapProfilingTestShim.java", |
| 29 | ] |
| 30 | jni_package = "components_heap_profiling" |
| 31 | } |
| 32 | |
| 33 | # This library must be included by the apk_under_test in order for the JNI |
| 34 | # shim to function correctly. |
| 35 | android_library("heap_profiling_java_test_support") { |
| 36 | testonly = true |
| 37 | java_files = [ "javatests/src/org/chromium/components/heap_profiling/HeapProfilingTestShim.java" ] |
| 38 | deps = [ |
| 39 | "//base:base_java", |
| 40 | ] |
| 41 | } |
| 42 | } |
| 43 | |
Erik Chen | 74cba8c | 2018-04-16 18:49:49 | [diff] [blame] | 44 | source_set("test_support") { |
| 45 | testonly = true |
| 46 | sources = [ |
| 47 | "test_driver.cc", |
| 48 | "test_driver.h", |
| 49 | ] |
| 50 | |
| 51 | deps = [ |
| 52 | ":heap_profiling", |
| 53 | "//base", |
| 54 | "//components/services/heap_profiling/public/cpp", |
| 55 | "//content/public/browser", |
| 56 | "//content/public/common", |
| 57 | ] |
erikchen | 3866efb | 2018-04-24 15:48:19 | [diff] [blame] | 58 | |
| 59 | if (is_android) { |
| 60 | sources += [ |
| 61 | "heap_profiling_test_shim.cc", |
| 62 | "heap_profiling_test_shim.h", |
| 63 | ] |
| 64 | deps += [ ":jni_headers" ] |
| 65 | } |
Erik Chen | 74cba8c | 2018-04-16 18:49:49 | [diff] [blame] | 66 | } |