blob: 892f5a6d1a5fe32c8bd4c6756dacb58e590c4aae [file] [log] [blame]
erikchena9db3a72018-04-12 16:24:001# 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
erikchen3866efb2018-04-24 15:48:195if (is_android) {
6 import("//build/config/android/rules.gni")
7}
8
erikchena9db3a72018-04-12 16:24:009static_library("heap_profiling") {
10 sources = [
11 "client_connection_manager.cc",
12 "client_connection_manager.h",
Erik Chen74cba8c2018-04-16 18:49:4913 "supervisor.cc",
14 "supervisor.h",
erikchena9db3a72018-04-12 16:24:0015 ]
16
17 deps = [
18 "//base",
19 "//components/services/heap_profiling/public/cpp",
20 "//content/public/browser",
21 "//content/public/common",
22 ]
23}
Erik Chen74cba8c2018-04-16 18:49:4924
erikchen3866efb2018-04-24 15:48:1925if (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 Chen74cba8c2018-04-16 18:49:4944source_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 ]
erikchen3866efb2018-04-24 15:48:1958
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 Chen74cba8c2018-04-16 18:49:4966}