| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 | 6 |
| 7 static_library("storage_monitor") { | 7 static_library("storage_monitor") { |
| 8 sources = [ | 8 sources = [ |
| 9 "image_capture_device.h", | 9 "image_capture_device.h", |
| 10 "image_capture_device.mm", | 10 "image_capture_device.mm", |
| 11 "image_capture_device_manager.h", | 11 "image_capture_device_manager.h", |
| 12 "image_capture_device_manager.mm", | 12 "image_capture_device_manager.mm", |
| 13 "media_storage_util.cc", | 13 "media_storage_util.cc", |
| 14 "media_storage_util.h", | 14 "media_storage_util.h", |
| 15 "media_transfer_protocol_device_observer_linux.cc", | |
| 16 "media_transfer_protocol_device_observer_linux.h", | |
| 17 "mtab_watcher_linux.cc", | 15 "mtab_watcher_linux.cc", |
| 18 "mtab_watcher_linux.h", | 16 "mtab_watcher_linux.h", |
| 19 "portable_device_watcher_win.cc", | 17 "portable_device_watcher_win.cc", |
| 20 "portable_device_watcher_win.h", | 18 "portable_device_watcher_win.h", |
| 21 "removable_device_constants.cc", | 19 "removable_device_constants.cc", |
| 22 "removable_device_constants.h", | 20 "removable_device_constants.h", |
| 23 "removable_storage_observer.h", | 21 "removable_storage_observer.h", |
| 24 "storage_info.cc", | 22 "storage_info.cc", |
| 25 "storage_info.h", | 23 "storage_info.h", |
| 26 "storage_monitor.cc", | 24 "storage_monitor.cc", |
| (...skipping 21 matching lines...) Expand all Loading... |
| 48 ] | 46 ] |
| 49 | 47 |
| 50 if (is_mac) { | 48 if (is_mac) { |
| 51 libs = [ | 49 libs = [ |
| 52 "DiskArbitration.framework", | 50 "DiskArbitration.framework", |
| 53 "Foundation.framework", | 51 "Foundation.framework", |
| 54 "ImageCaptureCore.framework", | 52 "ImageCaptureCore.framework", |
| 55 ] | 53 ] |
| 56 } | 54 } |
| 57 | 55 |
| 58 if (is_linux && use_dbus) { | 56 if (is_chromeos && use_dbus) { |
| 59 deps += [ | 57 deps += [ |
| 60 "//device/media_transfer_protocol", | 58 "//device/media_transfer_protocol", |
| 61 "//device/media_transfer_protocol:mtp_file_entry_proto", | 59 "//device/media_transfer_protocol:mtp_file_entry_proto", |
| 62 "//device/media_transfer_protocol:mtp_storage_info_proto", | 60 "//device/media_transfer_protocol:mtp_storage_info_proto", |
| 63 ] | 61 ] |
| 62 sources += [ |
| 63 "media_transfer_protocol_device_observer_chromeos.cc", |
| 64 "media_transfer_protocol_device_observer_chromeos.h", |
| 65 ] |
| 64 } | 66 } |
| 65 | 67 |
| 66 if (use_udev) { | 68 if (use_udev) { |
| 67 deps += [ "//device/udev_linux" ] | 69 deps += [ "//device/udev_linux" ] |
| 68 } else if (is_linux) { | 70 } else if (is_linux) { |
| 69 # These were already removed for non-Linux. | 71 # These were already removed for non-Linux. |
| 70 sources -= [ | 72 sources -= [ |
| 71 "storage_monitor_linux.cc", | 73 "storage_monitor_linux.cc", |
| 72 "storage_monitor_linux.h", | 74 "storage_monitor_linux.h", |
| 73 "udev_util_linux.cc", | 75 "udev_util_linux.cc", |
| (...skipping 10 matching lines...) Expand all Loading... |
| 84 ] | 86 ] |
| 85 deps += [ "//chromeos" ] | 87 deps += [ "//chromeos" ] |
| 86 } | 88 } |
| 87 } | 89 } |
| 88 | 90 |
| 89 static_library("test_support") { | 91 static_library("test_support") { |
| 90 testonly = true | 92 testonly = true |
| 91 sources = [ | 93 sources = [ |
| 92 "mock_removable_storage_observer.cc", | 94 "mock_removable_storage_observer.cc", |
| 93 "mock_removable_storage_observer.h", | 95 "mock_removable_storage_observer.h", |
| 94 "test_media_transfer_protocol_manager_linux.cc", | 96 "test_media_transfer_protocol_manager_chromeos.cc", |
| 95 "test_media_transfer_protocol_manager_linux.h", | 97 "test_media_transfer_protocol_manager_chromeos.h", |
| 96 "test_portable_device_watcher_win.cc", | 98 "test_portable_device_watcher_win.cc", |
| 97 "test_portable_device_watcher_win.h", | 99 "test_portable_device_watcher_win.h", |
| 98 "test_storage_monitor.cc", | 100 "test_storage_monitor.cc", |
| 99 "test_storage_monitor.h", | 101 "test_storage_monitor.h", |
| 100 "test_storage_monitor_win.cc", | 102 "test_storage_monitor_win.cc", |
| 101 "test_storage_monitor_win.h", | 103 "test_storage_monitor_win.h", |
| 102 "test_volume_mount_watcher_win.cc", | 104 "test_volume_mount_watcher_win.cc", |
| 103 "test_volume_mount_watcher_win.h", | 105 "test_volume_mount_watcher_win.h", |
| 104 ] | 106 ] |
| 105 | 107 |
| 106 public_deps = [ | 108 public_deps = [ |
| 107 ":storage_monitor", | 109 ":storage_monitor", |
| 108 "//base", | 110 "//base", |
| 109 "//content/public/browser", | 111 "//content/public/browser", |
| 110 ] | 112 ] |
| 111 | 113 |
| 112 if (is_linux && use_dbus) { | 114 if (is_chromeos && use_dbus) { |
| 113 deps = [ | 115 deps = [ |
| 114 "//device/media_transfer_protocol", | 116 "//device/media_transfer_protocol", |
| 115 "//device/media_transfer_protocol:mtp_file_entry_proto", | 117 "//device/media_transfer_protocol:mtp_file_entry_proto", |
| 116 "//device/media_transfer_protocol:mtp_storage_info_proto", | 118 "//device/media_transfer_protocol:mtp_storage_info_proto", |
| 117 ] | 119 ] |
| 118 } | 120 } |
| 119 | 121 |
| 120 if (is_win) { | 122 if (is_win) { |
| 121 deps = [ | 123 deps = [ |
| 122 "//testing/gtest", | 124 "//testing/gtest", |
| 123 ] | 125 ] |
| 124 } | 126 } |
| 125 } | 127 } |
| 126 | 128 |
| 127 source_set("unit_tests") { | 129 source_set("unit_tests") { |
| 128 testonly = true | 130 testonly = true |
| 129 sources = [ | 131 sources = [ |
| 130 "image_capture_device_manager_unittest.mm", | 132 "image_capture_device_manager_unittest.mm", |
| 131 "media_storage_util_unittest.cc", | 133 "media_storage_util_unittest.cc", |
| 132 "media_transfer_protocol_device_observer_linux_unittest.cc", | 134 "media_transfer_protocol_device_observer_chromeos_unittest.cc", |
| 133 "storage_info_unittest.cc", | 135 "storage_info_unittest.cc", |
| 134 "storage_monitor_mac_unittest.mm", | 136 "storage_monitor_mac_unittest.mm", |
| 135 "storage_monitor_unittest.cc", | 137 "storage_monitor_unittest.cc", |
| 136 "storage_monitor_win_unittest.cc", | 138 "storage_monitor_win_unittest.cc", |
| 137 ] | 139 ] |
| 138 | 140 |
| 139 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 141 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 140 | 142 |
| 141 deps = [ | 143 deps = [ |
| 142 ":test_support", | 144 ":test_support", |
| 143 "//content/test:test_support", | 145 "//content/test:test_support", |
| 144 "//testing/gtest", | 146 "//testing/gtest", |
| 145 ] | 147 ] |
| 146 | 148 |
| 147 if (is_linux && use_dbus) { | 149 if (use_dbus) { |
| 148 deps += [ "//device/media_transfer_protocol" ] | 150 if (is_chromeos) { |
| 149 if (!is_chromeos) { | 151 deps += [ |
| 152 "//device/media_transfer_protocol", |
| 153 "//device/media_transfer_protocol:mtp_file_entry_proto", |
| 154 "//device/media_transfer_protocol:mtp_storage_info_proto", |
| 155 "//testing/gmock", |
| 156 ] |
| 157 sources += [ "storage_monitor_chromeos_unittest.cc" ] |
| 158 } else if (is_linux) { |
| 150 sources += [ "storage_monitor_linux_unittest.cc" ] | 159 sources += [ "storage_monitor_linux_unittest.cc" ] |
| 151 } | 160 } |
| 152 } | 161 } |
| 153 if (is_chromeos) { | 162 if (is_chromeos) { |
| 154 sources += [ "storage_monitor_chromeos_unittest.cc" ] | 163 deps += [ "//chromeos:test_support" ] |
| 155 deps += [ | |
| 156 "//chromeos:test_support", | |
| 157 "//testing/gmock", | |
| 158 ] | |
| 159 } | 164 } |
| 160 } | 165 } |
| OLD | NEW |