[iOS Blink] Support DataDecoderBrowserTest.LaunchIsolated
Since https://crrev.com/c/6518241 switched from using a JSON parser to ImageDecoder, the iOS Blink port needs to follow the same approach. This CL enables the use of ImageDecoder in the iOS Blink port by applying the USE_BLINK build flag. TEST: DataDecoderBrowserTest.LaunchIsolated Bug: None Change-Id: Ie9bc02f5a9251d257dc8bbe55f40faf40fada74d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6529504 Reviewed-by: Elly FJ <ellyjones@chromium.org> Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com> Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Cr-Commit-Position: refs/heads/main@{#1459819}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
a78c3f914f
commit
0730f1fa9e
services/data_decoder
@ -40,6 +40,7 @@ source_set("lib") {
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
"//build:blink_buildflags",
|
||||
"//components/cbor",
|
||||
"//components/facilitated_payments/core/mojom:pix_code_validator_mojom",
|
||||
"//components/facilitated_payments/core/validation",
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/blink_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/facilitated_payments/core/validation/pix_code_validator.h"
|
||||
#include "components/web_package/web_bundle_parser_factory.h"
|
||||
@ -23,7 +24,7 @@
|
||||
#include "services/data_decoder/ble_scan_parser_impl.h"
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
#if !BUILDFLAG(IS_IOS)
|
||||
#if BUILDFLAG(USE_BLINK)
|
||||
#include "services/data_decoder/image_decoder_impl.h"
|
||||
#endif
|
||||
|
||||
@ -45,8 +46,8 @@ void DataDecoderService::BindReceiver(
|
||||
|
||||
void DataDecoderService::BindImageDecoder(
|
||||
mojo::PendingReceiver<mojom::ImageDecoder> receiver) {
|
||||
#if BUILDFLAG(IS_IOS)
|
||||
LOG(FATAL) << "ImageDecoder not supported on iOS.";
|
||||
#if !BUILDFLAG(USE_BLINK)
|
||||
LOG(FATAL) << "ImageDecoder not supported on non-Blink platforms.";
|
||||
#else
|
||||
mojo::MakeSelfOwnedReceiver(std::make_unique<ImageDecoderImpl>(),
|
||||
std::move(receiver));
|
||||
|
Reference in New Issue
Block a user