| # Copyright 2017 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("//third_party/WebKit/Source/build/scripts/scripts.gni") |
| import("//third_party/WebKit/Source/platform/platform_generated.gni") |
| |
| make_names("make_platform_loader_generated_fetch_initiator_type_names") { |
| in_files = [ "fetch/FetchInitiatorTypeNames.json5" ] |
| outputs = [ |
| "$blink_platform_output_dir/loader/fetch/FetchInitiatorTypeNames.cpp", |
| "$blink_platform_output_dir/loader/fetch/FetchInitiatorTypeNames.h", |
| ] |
| } |
| |
| source_set("loader") { |
| # This target is a logical part of the platform and only the platform target |
| # should depend on it. |
| visibility = [ "//third_party/WebKit/Source/platform" ] |
| |
| sources = [ |
| "LinkHeader.cpp", |
| "LinkHeader.h", |
| "fetch/AccessControlStatus.h", |
| "fetch/CachedMetadata.cpp", |
| "fetch/CachedMetadata.h", |
| "fetch/CachedMetadataHandler.h", |
| "fetch/ClientHintsPreferences.cpp", |
| "fetch/ClientHintsPreferences.h", |
| "fetch/CrossOriginAccessControl.cpp", |
| "fetch/CrossOriginAccessControl.h", |
| "fetch/FetchContext.cpp", |
| "fetch/FetchContext.h", |
| "fetch/FetchInitiatorInfo.h", |
| "fetch/FetchParameters.cpp", |
| "fetch/FetchParameters.h", |
| "fetch/FetchUtils.cpp", |
| "fetch/FetchUtils.h", |
| "fetch/IntegrityMetadata.cpp", |
| "fetch/IntegrityMetadata.h", |
| "fetch/MemoryCache.cpp", |
| "fetch/MemoryCache.h", |
| "fetch/RawResource.cpp", |
| "fetch/RawResource.h", |
| "fetch/Resource.cpp", |
| "fetch/Resource.h", |
| "fetch/ResourceClient.h", |
| "fetch/ResourceClientWalker.h", |
| "fetch/ResourceError.cpp", |
| "fetch/ResourceError.h", |
| "fetch/ResourceFetcher.cpp", |
| "fetch/ResourceFetcher.h", |
| "fetch/ResourceLoadInfo.h", |
| "fetch/ResourceLoadPriority.h", |
| "fetch/ResourceLoadTiming.cpp", |
| "fetch/ResourceLoadTiming.h", |
| "fetch/ResourceLoader.cpp", |
| "fetch/ResourceLoader.h", |
| "fetch/ResourceLoaderOptions.h", |
| "fetch/ResourceLoadingLog.h", |
| "fetch/ResourceOwner.h", |
| "fetch/ResourceRequest.cpp", |
| "fetch/ResourceRequest.h", |
| "fetch/ResourceResponse.cpp", |
| "fetch/ResourceResponse.h", |
| "fetch/ResourceStatus.h", |
| "fetch/ResourceTimingInfo.cpp", |
| "fetch/ResourceTimingInfo.h", |
| "fetch/SubstituteData.h", |
| "fetch/UniqueIdentifier.cpp", |
| "fetch/UniqueIdentifier.h", |
| ] |
| |
| sources += get_target_outputs( |
| ":make_platform_loader_generated_fetch_initiator_type_names") |
| |
| defines = [ "BLINK_PLATFORM_IMPLEMENTATION=1" ] |
| |
| configs += [ |
| "//third_party/WebKit/Source:config", |
| "//third_party/WebKit/Source:non_test_config", |
| "//third_party/WebKit/Source:inside_blink", |
| |
| # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| "//build/config/compiler:no_size_t_to_int_warning", |
| ] |
| |
| deps = [ |
| ":make_platform_loader_generated_fetch_initiator_type_names", |
| "//components/link_header_util:link_header_util", |
| ] |
| |
| public_deps = [ |
| "//base", |
| "//net", |
| "//skia", |
| "//third_party/icu", |
| "//v8", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| # This target defines test files for blink_platform_unittests and only the |
| # blink_platform_unittests target should depend on it. |
| visibility = [ "//third_party/WebKit/Source/platform:*" ] |
| testonly = true |
| |
| # Source files for blink_platform_unittests. |
| sources = [ |
| "LinkHeaderTest.cpp", |
| "fetch/ClientHintsPreferencesTest.cpp", |
| "fetch/CrossOriginAccessControlTest.cpp", |
| "fetch/FetchUtilsTest.cpp", |
| "fetch/MemoryCacheCorrectnessTest.cpp", |
| "fetch/MemoryCacheTest.cpp", |
| "fetch/RawResourceTest.cpp", |
| "fetch/ResourceFetcherTest.cpp", |
| "fetch/ResourceLoaderOptionsTest.cpp", |
| "fetch/ResourceRequestTest.cpp", |
| "fetch/ResourceTest.cpp", |
| ] |
| |
| defines = [ "INSIDE_BLINK" ] |
| |
| configs += [ |
| "//third_party/WebKit/Source/platform/wtf:wtf_config", |
| "//third_party/WebKit/Source:config", |
| ] |
| |
| deps = [ |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/WebKit/Source/platform", |
| ] |
| } |
| |
| source_set("test_support") { |
| # This target defines test files for platform:test_support that |
| # blink_platform_unittests and webkit_unit_tests can use. |
| visibility = [ "//third_party/WebKit/Source/platform:test_support" ] |
| testonly = true |
| |
| # Source files that can be called from blink_platform_unittests and |
| # webkit_unit_tests. |
| sources = [ |
| "testing/FetchTestingPlatformSupport.cpp", |
| "testing/FetchTestingPlatformSupport.h", |
| "testing/MockFetchContext.h", |
| "testing/MockResource.cpp", |
| "testing/MockResource.h", |
| "testing/MockResourceClient.cpp", |
| "testing/MockResourceClient.h", |
| ] |
| |
| defines = [ "INSIDE_BLINK" ] |
| |
| configs += [ |
| "//third_party/WebKit/Source/platform/wtf:wtf_config", |
| "//third_party/WebKit/Source:config", |
| ] |
| |
| deps = [ |
| "//third_party/WebKit/Source/platform", |
| ] |
| } |