chrome 0.5.5

chrome.dart

An library for accessing the Chrome APIs in a packaged app or extension.

Build Status

Installing

Add this to your package's pubspec.yaml file:

dependencies:
  chrome: any

Using the library

import 'package:chrome/chrome_app.dart' as chrome;

void main() {
  chrome.runtime.getPlatformInfo().then((Map m) {
    print(m.toString());
  });
}

Also, see the FAQ.

In your pubspec.yaml

In order to build your app with pub build, you'll need to tell it to select the CSP compliant output of dart2js. To do that, add these lines:

transformers:
- chrome

to your pubspec.yaml file.

Documentation

Documentation is available at:

Breaking Changes

For version 0.5.0, we removed the older chrome.socket API in favor of the new chrome.sockets API. In order to continue using the older API, you can reference it directly via an import:

import 'package:chrome/gen/socket.dart';

Changelog - chrome.dart

0.5.4 2014-03-19 (SDK 1.3.0-dev.4.1 r33731)

  • Update to latest serial.idl
  • Included overrides for new serial namespace
  • Updated serial unit tests

0.5.3 2014-02-15 (SDK 1.3.0-dev.3.2 r33495)

  • Fixed an issue with event listeners and Chrome M35+

0.5.2 2014-02-14 (SDK 1.3.0-dev.3.2 r33495)

  • Updated to use docgen for api documentation
  • Make the window close event sync instead of async
  • Clean up warnings in unit tests
  • Add app/ to drone_io.sh script
  • Add a chrome pub transformer
  • Fix an issue w/ the hand-overridden API
  • Use a getter to fetch the JsObject for an API each time it is needed

0.5.1 2014-02-24 (SDK 1.2.0-dev.5.15 r32954)

  • Added a toString() to the FileError implementation
  • Added ability to override generated code with hand-written methods
  • Implemented window events override for ChromeAppWindow class

0.5.0 2014-02-20 (SDK 1.2.0-dev.5.12 r32844)

  • Added the new chrome.sockets API
  • The existing chrome.socket API has been removed from the chrome_app.dart library. In order to continue using it, you can reference it directly (import 'package:chrome/gen/socket.dart';)
  • Added chrome.gcm; exposes Google Cloud Messaging
  • Added chrome.signedInDevices
  • Added chrome.wallpaper
  • Added chrome.system.display
  • Added chrome.system.network

0.4.3 2014-01-21 (SDK 1.2.0-dev.1.0 r31918)

  • Fixed bug with entry.metaData.timeStamp

0.4.2 2014-01-18 (SDK 1.1.0-dev.5.11 r31818)

  • Fix performance issues with converting array buffers to lists

0.4.1 2014-01-16 (SDK 1.1.0-dev.5.11 r31818)

  • Unscripted updated to >=0.3.0 <0.4.0
  • USB bug found and fixed with naming of _interface in the chrome idl.

0.4.0 2014-01-13 (SDK 1.1.0-dev.5.6 r31661)

  • Merge from chrome_gen.dart completed
  • All apis are generated from IDL files
  • All unit tests have been updated to work against generated apis
  • Api docs are autogenerated
  • drone.io script now runs the tool unit tests

0.3.1 2013-09-17 (SDK 0.7.3.1 r27487)

  • Auto doc generation and deployment to drone.io [API documentation] (http://dart-gde.github.com/chrome.dart).
  • Implemented DirectoryEntry.getEntries()
  • Documentation updates, removal of javadoc'isms
  • Refactored unit tests so each test module has a single main() entry point.

0.3.0 2013-09-04 (SDK 0.6.21.3 r26639)

  • Refactoring of fileSystem library and wrapping of FileEntry
  • Moved drone.io execution to local build script
  • Added chrome.syncFileSystem api
  • Removed old dependencies
  • Added chrome.debugger extension api
  • bot_io moved to dev_dependency

0.2.0 2013-08-08

  • Support for Chrome extension APIs was added. You should now import one of the following libraries, as appropriate:
    • Packaged apps: import 'package:chrome/app.dart';
    • Extensions: import 'package:chrome/ext.dart';
  • Work on the chrome.app.window API including several breaking changes, please refer to the dartdoc for usage.
  • Added identity support and example

0.0.1 2013-05-20 (SDK 0.5.9.0 r22879)

0.0.0-dev 2012-12-17 (SDK 0.2.9.6 r16207)

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  chrome: ">=0.5.5 <0.6.0"

If your package is an application package you should use any as the version constraint.

2. Install it

If you're using the Dart Editor, choose:

Menu > Tools > Pub Install

Or if you want to install from the command line, run:

$ pub install

3. Import it

Now in your Dart code, you can use:

import 'package:chrome/chrome_app.dart';
import 'package:chrome/chrome_ext.dart';
import 'package:chrome/transformer.dart';

About

An library for accessing the Chrome APIs in a packaged app or extension.

Authors

Email devoncarew@gmail.com Devon Carew
Email financeCoding@gmail.com Adam Singer
Email kevin@thinkpixellab.com Kevin Moore

Homepage

https://github.com/dart-gde/chrome.dart

Uploaders

financeCoding
devoncarew@google.com

Share