chrome_gen 0.3.4

  • readme.md
  • Installing
  • Versions
  • 30

deprecated-chrome_gen.dart

WARNING: This library is being deprecated.

Future versions of this library can be found at chrome.dart


chrome_gen.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_gen: any

Using the library

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

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

Also, see the FAQ.

Documentation

Documentation is available at:

Re-generating the library

From the project directory, run:

dart tool/gen_apis.dart

This will:

  • read meta/apis.json and meta/overrides.json
  • parse the cooresponding idl/*.json and idl/*.idl files
  • generate lib/chrome_app.dart, lib/chrome_ext.dart, and lib/gen/*.dart.

Use this package as a library

1. Depend on it

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


dependencies:
  chrome_gen: "^0.3.4"

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_gen/build/build.dart';

      import 'package:chrome_gen/chrome_app.dart';

      import 'package:chrome_gen/chrome_ext.dart';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      import 'package:chrome_gen/gen/push_messaging.dart';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      import 'package:chrome_gen/gen/windows.dart';
  
Version Uploaded Documentation Archive
0.3.4 Jan 14, 2014 Go to the documentation of chrome_gen 0.3.4 Download chrome_gen 0.3.4 archive
0.3.3 Jan 5, 2014 Go to the documentation of chrome_gen 0.3.3 Download chrome_gen 0.3.3 archive
0.3.2 Dec 18, 2013 Go to the documentation of chrome_gen 0.3.2 Download chrome_gen 0.3.2 archive
0.3.1 Dec 4, 2013 Go to the documentation of chrome_gen 0.3.1 Download chrome_gen 0.3.1 archive
0.3.0 Nov 26, 2013 Go to the documentation of chrome_gen 0.3.0 Download chrome_gen 0.3.0 archive
0.2.2 Nov 22, 2013 Go to the documentation of chrome_gen 0.2.2 Download chrome_gen 0.2.2 archive
0.2.1 Nov 12, 2013 Go to the documentation of chrome_gen 0.2.1 Download chrome_gen 0.2.1 archive
0.2.0 Nov 11, 2013 Go to the documentation of chrome_gen 0.2.0 Download chrome_gen 0.2.0 archive
0.1.0 Oct 30, 2013 Go to the documentation of chrome_gen 0.1.0 Download chrome_gen 0.1.0 archive
0.0.9 Oct 28, 2013 Go to the documentation of chrome_gen 0.0.9 Download chrome_gen 0.0.9 archive

All 18 versions...

Analysis

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

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

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

Platforms

Detected platforms: web

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

Suggestions

  • Running dartdoc failed.

    Make sure dartdoc runs without any issues.

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Package is too old.

    The package was released more than two years ago.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 77 hints.

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

    Run dartfmt to format lib/gen/alarms.dart.

    Similar analysis of the following files failed:

    • lib/gen/app.dart (hint)
    • lib/gen/audio.dart (hint)
    • lib/gen/bluetooth.dart (hint)
    • lib/gen/bookmarks.dart (hint)
    • lib/gen/browser_action.dart (hint)
    • lib/gen/browsing_data.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/downloads.dart (hint)
    • lib/gen/events.dart (hint)
    • lib/gen/extension.dart (hint)
    • lib/gen/file_browser_handler.dart (hint)
    • lib/gen/file_system.dart (hint)
    • lib/gen/font_settings.dart (hint)
    • lib/gen/history.dart (hint)
    • lib/gen/identity.dart (hint)
    • lib/gen/idle.dart (hint)
    • lib/gen/infobars.dart (hint)
    • lib/gen/input.dart (hint)
    • lib/gen/location.dart (hint)
    • lib/gen/management.dart (hint)
    • lib/gen/media_galleries.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/power.dart (hint)
    • lib/gen/privacy.dart (hint)
    • lib/gen/processes.dart (hint)
    • lib/gen/proxy.dart (hint)
    • lib/gen/push_messaging.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/socket.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/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.dart (hint)
    • lib/src/files_exp.dart (hint)
    • lib/src/socket.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_gen.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
Dev dependencies
args any
browser any
logging any
parsers >=0.13.7
path any
unittest any
unscripted any