From 6b3840e3844700328d0ac7658d38c22908362236 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Tue, 9 Jun 2015 12:14:13 -0700 Subject: [PATCH] Move image loading out of C++ into Dart We already know how to talk to the network_service from Dart via fetch.dart. Might as well use that for Image loading as well insetad of having ImageLoader do it. As part of this I've renamed *ImageLoader to *ImageDecoder and moved all the image loading logic into Dart. This required me to teach the idl system about mojo handles so that I could pass the resulting MojoHandle from fetch.dart up through to ImageDecoder. R=abarth@chromium.org, jackson@google.com, hansmuller@google.com Review URL: https://codereview.chromium.org/1173703002. --- examples/stocks/lib/stock_data.dart | 2 +- examples/stocks2/lib/stock_data.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/stocks/lib/stock_data.dart b/examples/stocks/lib/stock_data.dart index 9bca149d20..39201714fc 100644 --- a/examples/stocks/lib/stock_data.dart +++ b/examples/stocks/lib/stock_data.dart @@ -59,7 +59,7 @@ class StockDataFetcher { } void _fetchNextChunk() { - fetch('data/stock_data_${_currentChunk++}.json').then((Response response) { + fetchBody('data/stock_data_${_currentChunk++}.json').then((Response response) { String json = response.bodyAsString(); JsonDecoder decoder = new JsonDecoder(); diff --git a/examples/stocks2/lib/stock_data.dart b/examples/stocks2/lib/stock_data.dart index d69f44275a..a77ca50a67 100644 --- a/examples/stocks2/lib/stock_data.dart +++ b/examples/stocks2/lib/stock_data.dart @@ -59,7 +59,7 @@ class StockDataFetcher { } void _fetchNextChunk() { - fetch('../data/stock_data_${_currentChunk++}.json').then((Response response) { + fetchBody('../data/stock_data_${_currentChunk++}.json').then((Response response) { String json = response.bodyAsString(); JsonDecoder decoder = new JsonDecoder();