dart-gde/chrome.dart — pull request #188 by financeCoding (2014-07-31 02:15:34+00:00)
Title: Properly parse `instanceOf` attribute object array.

@devoncarew should address https://github.com/dart-gde/chrome.dart/issues/178

Generated `lib/gen/media_galleries.dart`

```diff
diff --git a/lib/gen/media_galleries.dart b/lib/gen/media_galleries.dart
index 68812e6..582511e 100644
--- a/lib/gen/media_galleries.dart
+++ b/lib/gen/media_galleries.dart
@@ -35,10 +35,10 @@ class ChromeMediaGalleries extends ChromeApi {
* Get the media galleries configured in this user agent. If none are
* configured or available, the callback will receive an empty array.
*/
- Future getMediaFileSystems([MediaFileSystemsDetails details]) {
+ Future> getMediaFileSystems([MediaFileSystemsDetails details]) {
if (_mediaGalleries == null) _throwNotAvailable();

- var completer = new ChromeCompleter.oneArg(_createDOMFileSystem);
+ var completer = new ChromeCompleter>.oneArg((e) => listify(e, _createDOMFileSystem));
_mediaGalleries.callMethod('getMediaFileSystems', [jsify(details), completer.callback]);
return completer.future;
}
@@ -100,10 +100,10 @@ class ChromeMediaGalleries extends ChromeApi {
* has happened. All galleries the app has access to are returned, not just
* the newly added galleries.
*/
- Future addScanResults() {
+ Future> addScanResults() {
if (_mediaGalleries == null) _throwNotAvailable();

- var completer = new ChromeCompleter.oneArg(_createDOMFileSystem);
+ var completer = new ChromeCompleter>.oneArg((e) => listify(e, _createDOMFileSystem));
_mediaGalleries.callMethod('addScanResults', [completer.callback]);
return completer.future;
}
@@ -400,10 +400,10 @@ class MediaMetadata extends ChromeObject {
*/
class AddUserSelectedFolderResult {
static AddUserSelectedFolderResult _create(mediaFileSystems, selectedFileSystemName) {
- return new AddUserSelectedFolderResult._(_createDOMFileSystem(mediaFileSystems), selectedFileSystemName);
+ return new AddUserSelectedFolderResult._(listify(mediaFileSystems, _createDOMFileSystem), selectedFileSystemName);
}

- FileSystem mediaFileSystems;
+ List mediaFileSystems;
String selectedFileSystemName;

AddUserSelectedFolderResult._(this.mediaFileSystems, this.selectedFileSystemName);
```