chrome 0.9.34

  • readme.md
  • changelog.md
  • Installing
  • Versions
  • 87

chrome.dart

Build Status

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

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.9.34 2018-03-09

  • fixes issues with firefox and optional args

0.9.32 2017-08-23

  • fix to transformers for strong mode

0.9.32 2017-08-21

  • fixes package structure to enable ddc

0.9.31 2017-03-30

  • bug fixes for the ContextMenu and Runtime libraries

0.9.3 2017-03-27

  • updated to M57, with no new APIs

0.9.2 2016-09-22

  • updated to M53, with no new APIs

0.9.1 2016-07-01

  • updated to M51, adding the following APIs
    • certificateProvider
    • enterprise.deviceAttributes
    • enterprise.platformKeys

0.8.0-dev1 2015-09-15

  • updated to M44, adding the following APIs
    • documentScan
    • fileSystemProvider
    • printerProvider
    • vpnProvider
    • networking.config
    • wallpaper

0.7.0-dev1 2015-04-25

  • updated the APIs to M41
  • removed scriptBadge api that was dropped in M41
  • removed pusheMessaging api that was dropped in M41 (use gcm instead)

0.6.5 2014-11-06

  • fixed an issue with Port.onMessage() and Port.sendMessage()

0.6.4 2014-10-19

  • fixed an issue with double loading compiled JavaScript files

0.6.3 2014-08-29 (SDK 1.6.0-dev.9.7 r39537)

  • removed dependency loop in files_exp.dart and files.dart

0.6.2 2014-08-29 (SDK 1.6.0)

  • moved a script from bin to tool in order to avoid exposing in in the bin directory

0.6.1 2014-08-28 (SDK 1.6.0)

  • updated the APIs to M37
  • changed the bootstrap script and the chrome transformer to expect the csp file in foo.dart.js instead of foo.dart.precompiled.js
  • clients must now include the csp parameter to the dart2js transformer: transformers: chrome $dart2js: csp: true

0.6.0 2014-07-01 (SDK 1.5.1 r37644)

  • Updated the APIs to M35 (current Chrome stable)
  • Added the chrome.bluetoothLowEnergy API
  • Added the chrome.bluetoothSocket API
  • Added the chrome.commands API
  • Added the chrome.hid API

0.5.6 2014-04-29 (SDK 1.4.0-dev.4.0 r35362)

  • Added speculative performance fix for array performance issue

0.5.5 2014-04-14 (SDK 1.3.0-dev.4.1 r33731)

  • Make the pub transformer work with the old and new version of barback

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.9.34"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:chrome/build/build.dart';

import 'package:chrome/chrome_app.dart';

import 'package:chrome/chrome_ext.dart';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

import 'package:chrome/transformer.dart';
        
Version Uploaded Documentation Archive
0.9.34 Mar 9, 2018 Go to the documentation of chrome 0.9.34 Download chrome 0.9.34 archive
0.9.33 Aug 23, 2017 Go to the documentation of chrome 0.9.33 Download chrome 0.9.33 archive
0.9.32 Aug 21, 2017 Go to the documentation of chrome 0.9.32 Download chrome 0.9.32 archive
0.9.31 Mar 30, 2017 Go to the documentation of chrome 0.9.31 Download chrome 0.9.31 archive
0.9.3 Mar 28, 2017 Go to the documentation of chrome 0.9.3 Download chrome 0.9.3 archive
0.9.2 Sep 26, 2016 Go to the documentation of chrome 0.9.2 Download chrome 0.9.2 archive
0.9.1 Jul 2, 2016 Go to the documentation of chrome 0.9.1 Download chrome 0.9.1 archive
0.9.0 Jul 2, 2016 Go to the documentation of chrome 0.9.0 Download chrome 0.9.0 archive
0.8.0 Sep 17, 2015 Go to the documentation of chrome 0.8.0 Download chrome 0.8.0 archive
0.6.5 Nov 6, 2014 Go to the documentation of chrome 0.6.5 Download chrome 0.6.5 archive

All 35 versions...

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
83 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
78 / 100
Overall score:
Weighted score of the above. [more]
87
Learn more about scoring.

Platforms

Detected platforms: unsure

Platform components identified in package: build, html, io, isolate, js.

Suggestions

  • Fix platform conflicts.

    Platform components identified in package: build, html, io, isolate, js.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 errors 88 hints.

    Strong-mode analysis of lib/src/files.dart failed with the following error:

    line: 430 col: 51
    Classes can only implement other classes.

    Run dartfmt to format lib/build/build.dart.

    Similar analysis of the following files failed:

    • lib/gen/alarms.dart (hint)
    • lib/gen/app.dart (hint)
    • lib/gen/app_patch.dart (hint)
    • lib/gen/audio.dart (hint)
    • lib/gen/bluetooth.dart (hint)
    • lib/gen/bluetooth_low_energy.dart (hint)
    • lib/gen/bluetooth_socket.dart (hint)
    • lib/gen/bookmarks.dart (hint)
    • lib/gen/browser.dart (hint)
    • lib/gen/browser_action.dart (hint)
    • lib/gen/browsing_data.dart (hint)
    • lib/gen/certificate_provider.dart (hint)
    • lib/gen/commands.dart (hint)
    • lib/gen/content_settings.dart (hint)
    • lib/gen/context_menus.dart (hint)
    • lib/gen/cookies.dart (hint)
    • lib/gen/debugger.dart (hint)
    • lib/gen/declarative_content.dart (hint)
    • lib/gen/declarative_web_request.dart (hint)
    • lib/gen/desktop_capture.dart (hint)
    • lib/gen/devtools.dart (hint)
    • lib/gen/document_scan.dart (hint)
    • lib/gen/downloads.dart (hint)
    • lib/gen/enterprise.dart (hint)
    • lib/gen/events.dart (hint)
    • lib/gen/extension.dart (hint)
    • lib/gen/extension_types.dart (hint)
    • lib/gen/file_browser_handler.dart (hint)
    • lib/gen/file_system.dart (hint)
    • lib/gen/file_system_provider.dart (hint)
    • lib/gen/font_settings.dart (hint)
    • lib/gen/gcm.dart (hint)
    • lib/gen/hid.dart (hint)
    • lib/gen/history.dart (hint)
    • lib/gen/i18n.dart (hint)
    • lib/gen/identity.dart (hint)
    • lib/gen/idle.dart (hint)
    • lib/gen/infobars.dart (hint)
    • lib/gen/input.dart (hint)
    • lib/gen/instance_id.dart (hint)
    • lib/gen/location.dart (hint)
    • lib/gen/management.dart (hint)
    • lib/gen/media_galleries.dart (hint)
    • lib/gen/networking.dart (hint)
    • lib/gen/notifications.dart (hint)
    • lib/gen/omnibox.dart (hint)
    • lib/gen/page_action.dart (hint)
    • lib/gen/page_capture.dart (hint)
    • lib/gen/permissions.dart (hint)
    • lib/gen/platform_keys.dart (hint)
    • lib/gen/power.dart (hint)
    • lib/gen/printer_provider.dart (hint)
    • lib/gen/privacy.dart (hint)
    • lib/gen/processes.dart (hint)
    • lib/gen/proxy.dart (hint)
    • lib/gen/runtime.dart (hint)
    • lib/gen/script_badge.dart (hint)
    • lib/gen/serial.dart (hint)
    • lib/gen/sessions.dart (hint)
    • lib/gen/signed_in_devices.dart (hint)
    • lib/gen/socket.dart (hint)
    • lib/gen/sockets.dart (hint)
    • lib/gen/storage.dart (hint)
    • lib/gen/sync_file_system.dart (hint)
    • lib/gen/system.dart (hint)
    • lib/gen/tab_capture.dart (hint)
    • lib/gen/tabs.dart (hint)
    • lib/gen/top_sites.dart (hint)
    • lib/gen/tts.dart (hint)
    • lib/gen/tts_engine.dart (hint)
    • lib/gen/types.dart (hint)
    • lib/gen/usb.dart (hint)
    • lib/gen/vpn_provider.dart (hint)
    • lib/gen/wallpaper.dart (hint)
    • lib/gen/web_navigation.dart (hint)
    • lib/gen/web_request.dart (hint)
    • lib/gen/windows.dart (hint)
    • lib/src/common.dart (hint)
    • lib/src/common_exp.dart (hint)
    • lib/src/files_exp.dart (hint)
    • lib/transformer.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use chrome.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
barback ^0.15.2+4 0.15.2+15
Transitive dependencies
async 2.0.6
charcode 1.1.1
collection 1.14.9
pool 1.3.4
source_span 1.4.0
stack_trace 1.9.2
Dev dependencies
args any
browser any
logging any
mockito any
parsers >=0.14.0 <0.15.0
path any 1.5.1
test ^0.12.0
unscripted ^0.6.0