Commit 6b3840e3 authored by Eric Seidel's avatar Eric Seidel

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.
parent 5a0b1849
...@@ -59,7 +59,7 @@ class StockDataFetcher { ...@@ -59,7 +59,7 @@ class StockDataFetcher {
} }
void _fetchNextChunk() { void _fetchNextChunk() {
fetch('data/stock_data_${_currentChunk++}.json').then((Response response) { fetchBody('data/stock_data_${_currentChunk++}.json').then((Response response) {
String json = response.bodyAsString(); String json = response.bodyAsString();
JsonDecoder decoder = new JsonDecoder(); JsonDecoder decoder = new JsonDecoder();
......
...@@ -59,7 +59,7 @@ class StockDataFetcher { ...@@ -59,7 +59,7 @@ class StockDataFetcher {
} }
void _fetchNextChunk() { void _fetchNextChunk() {
fetch('../data/stock_data_${_currentChunk++}.json').then((Response response) { fetchBody('../data/stock_data_${_currentChunk++}.json').then((Response response) {
String json = response.bodyAsString(); String json = response.bodyAsString();
JsonDecoder decoder = new JsonDecoder(); JsonDecoder decoder = new JsonDecoder();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment