chromium/components/content_capture/android/BUILD.gn

# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/android/rules.gni")
import("//third_party/jni_zero/jni_zero.gni")

source_set("android") {
  sources = [
    "content_capture_features_android.cc",
    "onscreen_content_provider_android.cc",
    "onscreen_content_provider_android.h",
  ]
  deps = [
    ":jni_headers",
    "//components/content_capture/browser",
    "//third_party/re2",
  ]
}

android_library("java") {
  deps = [
    "//base:base_java",
    "//build/android:build_java",
    "//content/public/android:content_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/jni_zero:jni_zero_java",
  ]

  srcjar_deps = [ ":jni_headers" ]
  sources = [
    "java/src/org/chromium/components/content_capture/ContentCaptureConsumer.java",
    "java/src/org/chromium/components/content_capture/ContentCaptureData.java",
    "java/src/org/chromium/components/content_capture/ContentCaptureDataBase.java",
    "java/src/org/chromium/components/content_capture/ContentCaptureFeatures.java",
    "java/src/org/chromium/components/content_capture/ContentCaptureFrame.java",
    "java/src/org/chromium/components/content_capture/ContentCapturedTask.java",
    "java/src/org/chromium/components/content_capture/ContentRemovedTask.java",
    "java/src/org/chromium/components/content_capture/ContentUpdateTask.java",
    "java/src/org/chromium/components/content_capture/ExperimentContentCaptureConsumer.java",
    "java/src/org/chromium/components/content_capture/FaviconUpdateTask.java",
    "java/src/org/chromium/components/content_capture/FrameSession.java",
    "java/src/org/chromium/components/content_capture/NotificationTask.java",
    "java/src/org/chromium/components/content_capture/OnscreenContentProvider.java",
    "java/src/org/chromium/components/content_capture/PlatformAPIWrapper.java",
    "java/src/org/chromium/components/content_capture/PlatformAPIWrapperImpl.java",
    "java/src/org/chromium/components/content_capture/PlatformContentCaptureConsumer.java",
    "java/src/org/chromium/components/content_capture/PlatformContentCaptureController.java",
    "java/src/org/chromium/components/content_capture/PlatformSession.java",
    "java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java",
    "java/src/org/chromium/components/content_capture/SessionRemovedTask.java",
    "java/src/org/chromium/components/content_capture/TitleUpdateTask.java",
    "java/src/org/chromium/components/content_capture/UrlAllowlist.java",
  ]
}

generate_jni("jni_headers") {
  sources = [
    "java/src/org/chromium/components/content_capture/ContentCaptureData.java",
    "java/src/org/chromium/components/content_capture/ContentCaptureFeatures.java",
    "java/src/org/chromium/components/content_capture/ContentCaptureFrame.java",
    "java/src/org/chromium/components/content_capture/OnscreenContentProvider.java",
  ]
}