mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
165 lines
4.1 KiB
Plaintext
165 lines
4.1 KiB
Plaintext
|
# Copyright 2014 The Chromium Authors. All rights reserved.
|
||
|
# Use of this source code is governed by a BSD-style license that can be
|
||
|
# found in the LICENSE file.
|
||
|
|
||
|
import("//build/config/features.gni")
|
||
|
|
||
|
static_library("storage_monitor") {
|
||
|
sources = [
|
||
|
"image_capture_device.h",
|
||
|
"image_capture_device.mm",
|
||
|
"image_capture_device_manager.h",
|
||
|
"image_capture_device_manager.mm",
|
||
|
"media_storage_util.cc",
|
||
|
"media_storage_util.h",
|
||
|
"mtab_watcher_linux.cc",
|
||
|
"mtab_watcher_linux.h",
|
||
|
"portable_device_watcher_win.cc",
|
||
|
"portable_device_watcher_win.h",
|
||
|
"removable_device_constants.cc",
|
||
|
"removable_device_constants.h",
|
||
|
"removable_storage_observer.h",
|
||
|
"storage_info.cc",
|
||
|
"storage_info.h",
|
||
|
"storage_monitor.cc",
|
||
|
"storage_monitor.h",
|
||
|
"storage_monitor_chromeos.cc",
|
||
|
"storage_monitor_chromeos.h",
|
||
|
"storage_monitor_linux.cc",
|
||
|
"storage_monitor_linux.h",
|
||
|
"storage_monitor_mac.h",
|
||
|
"storage_monitor_mac.mm",
|
||
|
"storage_monitor_win.cc",
|
||
|
"storage_monitor_win.h",
|
||
|
"transient_device_ids.cc",
|
||
|
"transient_device_ids.h",
|
||
|
"udev_util_linux.cc",
|
||
|
"udev_util_linux.h",
|
||
|
"volume_mount_watcher_win.cc",
|
||
|
"volume_mount_watcher_win.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//content/public/browser",
|
||
|
"//ui/base",
|
||
|
]
|
||
|
|
||
|
if (is_mac) {
|
||
|
libs = [
|
||
|
"DiskArbitration.framework",
|
||
|
"Foundation.framework",
|
||
|
"ImageCaptureCore.framework",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (is_chromeos && use_dbus) {
|
||
|
deps += [
|
||
|
"//device/media_transfer_protocol",
|
||
|
"//device/media_transfer_protocol:mtp_file_entry_proto",
|
||
|
"//device/media_transfer_protocol:mtp_storage_info_proto",
|
||
|
]
|
||
|
sources += [
|
||
|
"media_transfer_protocol_device_observer_chromeos.cc",
|
||
|
"media_transfer_protocol_device_observer_chromeos.h",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (use_udev) {
|
||
|
deps += [ "//device/udev_linux" ]
|
||
|
} else if (is_linux) {
|
||
|
# These were already removed for non-Linux.
|
||
|
sources -= [
|
||
|
"storage_monitor_linux.cc",
|
||
|
"storage_monitor_linux.h",
|
||
|
"udev_util_linux.cc",
|
||
|
"udev_util_linux.h",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (is_chromeos) {
|
||
|
sources -= [
|
||
|
"mtab_watcher_linux.cc",
|
||
|
"mtab_watcher_linux.h",
|
||
|
"storage_monitor_linux.cc",
|
||
|
"storage_monitor_linux.h",
|
||
|
]
|
||
|
deps += [ "//chromeos" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static_library("test_support") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"mock_removable_storage_observer.cc",
|
||
|
"mock_removable_storage_observer.h",
|
||
|
"test_media_transfer_protocol_manager_chromeos.cc",
|
||
|
"test_media_transfer_protocol_manager_chromeos.h",
|
||
|
"test_portable_device_watcher_win.cc",
|
||
|
"test_portable_device_watcher_win.h",
|
||
|
"test_storage_monitor.cc",
|
||
|
"test_storage_monitor.h",
|
||
|
"test_storage_monitor_win.cc",
|
||
|
"test_storage_monitor_win.h",
|
||
|
"test_volume_mount_watcher_win.cc",
|
||
|
"test_volume_mount_watcher_win.h",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
":storage_monitor",
|
||
|
"//base",
|
||
|
"//content/public/browser",
|
||
|
]
|
||
|
|
||
|
if (is_chromeos && use_dbus) {
|
||
|
deps = [
|
||
|
"//device/media_transfer_protocol",
|
||
|
"//device/media_transfer_protocol:mtp_file_entry_proto",
|
||
|
"//device/media_transfer_protocol:mtp_storage_info_proto",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (is_win) {
|
||
|
deps = [
|
||
|
"//testing/gtest",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
source_set("unit_tests") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"image_capture_device_manager_unittest.mm",
|
||
|
"media_storage_util_unittest.cc",
|
||
|
"media_transfer_protocol_device_observer_chromeos_unittest.cc",
|
||
|
"storage_info_unittest.cc",
|
||
|
"storage_monitor_mac_unittest.mm",
|
||
|
"storage_monitor_unittest.cc",
|
||
|
"storage_monitor_win_unittest.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":test_support",
|
||
|
"//base/test:test_support",
|
||
|
"//content/test:test_support",
|
||
|
"//testing/gtest",
|
||
|
]
|
||
|
|
||
|
if (use_dbus) {
|
||
|
if (is_chromeos) {
|
||
|
deps += [
|
||
|
"//device/media_transfer_protocol",
|
||
|
"//device/media_transfer_protocol:mtp_file_entry_proto",
|
||
|
"//device/media_transfer_protocol:mtp_storage_info_proto",
|
||
|
"//testing/gmock",
|
||
|
]
|
||
|
sources += [ "storage_monitor_chromeos_unittest.cc" ]
|
||
|
} else if (is_linux) {
|
||
|
sources += [ "storage_monitor_linux_unittest.cc" ]
|
||
|
}
|
||
|
}
|
||
|
if (is_chromeos) {
|
||
|
deps += [ "//chromeos:test_support" ]
|
||
|
}
|
||
|
}
|