Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bug https://code.google.com/p/chromium/issues/detail?id=139271

Adding readme to all samples.
  • Loading branch information...
commit 2b410fb985b36fe9831ceb952c7bfb69b2e873c4 1 parent c6957d7
@mangini mangini authored
View
10 clock/README.md
@@ -0,0 +1,10 @@
+# Clock
+
+A widget-like application that provides a world clock, an alarm, a timer and a stopwatch.
+
+## APIs
+
+* [Sync Storage API](http://developer.chrome.com/trunk/apps/storage.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
10 context-menu/README.md
@@ -1,3 +1,13 @@
+# Context menus
+
Sample that shows how to use the [context menu API](http://developer.chrome.com/trunk/apps/contextMenus.html) in an app to achieve per-window menus.
Context menus are normally global to the entire app, and thus all windows would have the same menu. This sample uses a `focus` event handler in each window to detect when a window is brought to the foreground. When it is, the contents of the context menu are updated with that window's commands. The `chrome.contextMenus.onClicked` event handler also only handles events that occur in that window.
+
+## APIs
+
+* [Context menu API](http://developer.chrome.com/trunk/apps/contextMenus.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
+
View
11 diff/README.md
@@ -0,0 +1,11 @@
+# Diff
+
+A non-trivial application to diff two files choosen by the user. This app shows how you can open for reading and for writing files in the user's computer, as long as the file was explicitly selected by the user. It uses the Filesystem API, which is an extension of the HTML5 Filesystem API.
+
+## APIs
+
+* [Local Storage API](http://developer.chrome.com/trunk/apps/storage.html) to save history of selected files
+* [Filesystem API](http://developer.chrome.com/trunk/apps/app_storage.html) to allow the user to pick arbitrary files from the disk and save them back.
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
9 explicit-webintents/README.md
@@ -1,3 +1,12 @@
+# Explicit WebIntents
+
This sample shows how two apps ("ping" and "pong") can communicate via explicit web intents without direct user involvement.
Install both "ping" and "pong". Launch either app, and press the "Dispatch intent" button. The other app will be launched (if it's not running already), and the intent data will be delivered to its background page via the `onLaunched` event (and then in turn to its window). The other app will reply, and the reply will be displayed in the window of the app that sent the intent.
+
+## APIs
+
+* [WebIntents](http://developer.chrome.com/apps/app_intents.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
9 frameless-window/README.md
@@ -0,0 +1,9 @@
+# Frameless window
+
+A sample application to showcase how you can use frame:'none' windows to allow total customization of the window's real state. At beginning, the window is open with no titlebar. As long as you check one of the titlebars, it is added to the appropriate position. Notice that the added titlebars are the only parts of the window that allows dragging. This is achieved through a special CSS property applied to what is NOT to be draggable (in this case, the whole content of the window, except the titlebars): `-webkit-widget-region: region(control rectangle);`
+
+## APIs
+
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
30 hello-world-sync/README.md
@@ -5,22 +5,20 @@ Use chrome.storage.sync to share small chunks of data among all of your Chrome d
Important: needs "key" in manifest.json to support testing outside of CWS, so that sync storage is shared among different instances.
-```javascript
-// app.js
-chrome.storage.sync.set({"myValue": newValue}, mycallback);
-...
-chrome.storage.onChanged.addListener(
- function(changes, namespace) {
- // do something
- }
-);
-...
-chrome.storage.sync.get("myValue",
- function(val) {
- // do something
- }
-);
-```
+ // app.js
+ chrome.storage.sync.set({"myValue": newValue}, mycallback);
+ ...
+ chrome.storage.onChanged.addListener(
+ function(changes, namespace) {
+ // do something
+ }
+ );
+ ...
+ chrome.storage.sync.get("myValue",
+ function(val) {
+ // do something
+ }
+ );
## APIs
View
12 identity/README.md
@@ -0,0 +1,12 @@
+# Identity
+
+A sample application that uses the Identity API to request identification information of the logged in user and present this info on the screen. If the user has a profile picture, a XMLHttpRequest2 request is also sent to grab the image and show it in the app.
+
+This app uses the getAuthToken flow of the Identity API, so it only works with Google accounts. If you want to identify the user in a non-Google OAuth2 flow, you should use the launchWebAuthFlow method instead.
+
+## APIs
+
+* [Identity](http://developer.chrome.com/trunk/apps/app.identity.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
13 ioio/README
@@ -1,13 +0,0 @@
-- Very simple IOIO client
-
-- Tested with this hardware:
-http://www.adafruit.com/blog/2012/06/15/new-product-ioio-mint-portable-android-development-kit/
-
-- Constants/protocol taken from:
-https://github.com/ytai/ioio/wiki/
-
-Caveats:
-- The bluetooth API is only available on Chrom(e|ium)OS
-- Resource clean-up isn't happening properly yet: you will likely have to disable/enable bluetooth between runs of the program or the connection will fail
-
-Questions/comments: bryeung@chromium.org
View
13 ioio/README.md
@@ -0,0 +1,13 @@
+# IOIO Bluetooth device
+
+Very simple IOIO client. Tested with [this hardware](http://www.adafruit.com/blog/2012/06/15/new-product-ioio-mint-portable-android-development-kit/)
+
+The constants and information about the protocol was taken from https://github.com/ytai/ioio/wiki/
+
+## Caveats:
+* The bluetooth API is only available on Chrom(e|ium)OS
+* Resource clean-up isn't happening properly yet: you will likely have to disable/enable bluetooth between runs of the program or the connection will fail
+
+## APIs
+
+* [Bluetooth](http://developer.chrome.com/apps/experimental.bluetooth.html)
View
11 mdns-browser/README.md
@@ -0,0 +1,11 @@
+# mDNS browser
+
+This is a non-trivial sample which uses the UDP multicast support in Chrome Packaged Apps to browse mDNS servers. mDNS protocol is usually used for home appliance devices, like the Apple's Bonjour. Read more about the mDNS protocol at this [Wikipedia's article](http://en.wikipedia.org/wiki/Multicast_DNS)
+
+
+## APIs
+
+* [UDP Network](http://developer.chrome.com/trunk/apps/app_network.html#udp)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
10 mini-code-edit/README.md
@@ -0,0 +1,10 @@
+# Mini code editor
+
+A non-trivial sample with basic features of a code editor, like syntax detection and syntax highlight. If also uses the extended FileSystem API that allows a user to select files from the disk so the app can read and write to that file.
+
+## APIs
+
+* [chrome.fileSystem](http://developer.chrome.com/trunk/apps/fileSystem.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
9 serial-control-signals/README.md
@@ -0,0 +1,9 @@
+# Serial Control Signals
+
+This sample demonstrates how you can send and receive control signals (DTR, RTS, DCD and CTS) to/from a serial port.
+
+## APIs
+
+* [Serial API](http://developer.chrome.com/trunk/apps/app.hardware.html#serial)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
View
15 serial/adkjs/README.md
@@ -1,10 +1,15 @@
-adkjs
-=====
+# ADK kit in Javascript
-This demo is composed of two parts and require a ADK 1.0 hardware (Arduino board+shield shipped at Google I/O 2011 to demonstrate Android hardware integration).
+This demo is composed of two parts and require a ADK 1.0 hardware (Arduino board+shield shipped at Google I/O 2011) to demonstrate Android hardware integration.
The demo simulates the same visual interface of the Android application, but in HTML5. There are UI widgets to control the servo motors, led lights and relays, and it gets sensors and buttons events.
-In the firmware directory, there is the Arduino app you must upload. We could not use exactly the same arduino code from the original Android ADK because it uses a USB port where the board is the USB host, and that woudl conflict with the computer USB port that is always the host. Anyway, just upload this arduino code to the board and you are set.
+In the firmware directory, there is the Arduino app you must upload. We could not use exactly the same arduino code from the original Android ADK because it uses a USB port where the board is the USB host, and that woudl conflict with the computer USB port that is always the host. Upload the arduino firmware code to the board and you are set.
-In the app directory, you will find the packaged Chrome app.
+In the app directory, you will find the Chrome Packaged App.
+
+## APIs
+
+* [Serial API](http://developer.chrome.com/trunk/apps/app.hardware.html#serial)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
View
8 serial/ledtoggle/README.md
@@ -1,3 +1,5 @@
+# Arduino LED toggle
+
Note: on Mac OS X Lion, it's necessary to update USB Serial drivers:
http://geekscape.posterous.com/mac-os-x-17-lion-upgrading-ftdi-usb-serial-dr
@@ -11,3 +13,9 @@ state of an LED connected to an Arduino.
Future version: use the standard Firmata sketch and build a JS firmata driver
for Chrome packaged apps.
+
+## APIs
+
+* [Serial API](http://developer.chrome.com/trunk/apps/app.hardware.html#serial)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
View
10 servo/README.md
@@ -1,2 +1,12 @@
+# Arduino servo control
+
+Note: on Mac OS X Lion, it's necessary to update USB Serial drivers:
+http://geekscape.posterous.com/mac-os-x-17-lion-upgrading-ftdi-usb-serial-dr
+
This app displays a slider that, when dragged, causes a servo attached to an Arduino to move. The Arduino sketch is included and should be uploaded to the Arduino.
+## APIs
+
+* [Serial API](http://developer.chrome.com/trunk/apps/app.hardware.html#serial)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
View
6 singleton/README.md
@@ -1,9 +1,9 @@
-# Hello World
+# Singleton window
-Sample that shows how to use the [windowing API](http://developer.chrome.com/trunk/apps/appWindow.html) in an app to have a "singleton" window app.
+Sample that shows how to use the [window API](http://developer.chrome.com/trunk/apps/appWindow.html) in an app to have a "singleton" window app.
The app keeps track of its window in the background page. If none exists, or if it's closed, it creates a new one. Otherwise it re-focuses the existing one via `chrome.app.window.focus()`.
## APIs
-* [Windowing](http://developer.chrome.com/trunk/apps/app.window.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
View
10 storage/README.md
@@ -0,0 +1,10 @@
+# Storage simple test
+
+A very basic application that demonstrates the Filesystem API. It allows you to request a filesystem, write a sample file to it and query how many bytes are available.
+
+## APIs
+
+* [Filesystem](http://developer.chrome.com/trunk/apps/app_storage.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
10 text-editor/README.md
@@ -0,0 +1,10 @@
+# Code editor
+
+A non-trivial sample with basic features of a code editor, like language detection and syntax highlight. If also uses the extended FileSystem API that allows a user to select files from the disk so the app can read and write to that file. This sample is very similar to the [mini-code-editor](https://github.com/GoogleChrome/chrome-app-samples/tree/master/mini-code-edit)
+
+## APIs
+
+* [chrome.fileSystem](http://developer.chrome.com/trunk/apps/fileSystem.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
21 udp/README
@@ -1,21 +0,0 @@
-Chrome UDP socket example
-A simple Echo client
-------------------------------
-
-[127.0.0.1:3007 ] [Connect]
-
- **o
- ..
- .
-
-
-
-------------------------------
-
-Connects to UDP echo server at the given address.
-
-Each little dot represents a echo request.
-When the request receives a reply, it shoots away and blows up.
-When a request doesn't receive a reply, it grows into a big ball and blows up.
-
-The dots gravitate towards each other for extra spiffiness.
View
31 udp/README.md
@@ -0,0 +1,31 @@
+# A simple UDP echo client
+
+ ------------------------------
+
+ [127.0.0.1:3007 ] [Connect]
+
+ **o
+ ..
+ .
+
+
+
+ ------------------------------
+
+Connects to a UDP echo server at the given address.
+
+Each little dot represents a echo request.
+When the request receives a reply, it shoots away and blows up.
+When a request doesn't receive a reply, it grows into a big ball and blows up.
+
+The dots gravitate towards each other for extra spiffiness.
+
+### Server side
+
+In the `server` directory, you will find a Node echo server that intentionally drops some packets to simulate a real network. Run this server before, so you can connect the client (Chrome Packaged App) to it.
+
+## APIs
+
+* [UDP Network](http://developer.chrome.com/trunk/apps/app_network.html#udp)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
View
12 usb/knob/README.md
@@ -1,3 +1,9 @@
-NOTE
-----
-This demo interfaces with a Griffin PowerMate device, reading its position and displaying it via a Chrome logo. It does not currently work on Mac OS X, since on that platform the OS claims the PowerMate is an HID device, and does not allow raw USB access to it.
+# Griffin PowerMate knob
+
+This demo interfaces with a [Griffin PowerMate](http://en.wikipedia.org/wiki/Griffin_PowerMate) device, reading its position and displaying it via a Chrome logo. It does not currently work on Mac OS X, since on that platform the OS claims the PowerMate is an HID device, and does not allow raw USB access to it.
+
+## APIs
+
+* [USB raw access](http://developer.chrome.com/trunk/apps/app_hardware.html#usb)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
View
15 webgl/README.md
@@ -2,20 +2,17 @@
This is the most basic application that one can create, using WebGL capabilities. It loads a (cool) 3D model from a JSON file and allows for model rotation and camera zooming, based on mouse movements.
-This sample uses the frameless window, an experimental feature.
+This sample uses the frameless window:
-```javascript
-// Main.js
-chrome.app.runtime.onLaunched.addListener(function() {
- chrome.app.window.create('index.html',
- {frame: 'none', width: 500, height: 400});
-});
-```
+ chrome.app.runtime.onLaunched.addListener(function() {
+ chrome.app.window.create('index.html',
+ {frame: 'none', width: 500, height: 400});
+ });
## APIs
-* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
## External libs
View
10 webintents/README.md
@@ -0,0 +1,10 @@
+# WebIntent handler
+
+This sample is an image editor that, when launched as a normal app, works as a simple image editor. However, it also registers itself as an image editor WebIntent handler. So, if you go to any other site or app that triggers an edit image intent, this app will be presented as an option.
+
+## APIs
+
+* [WebIntents](http://developer.chrome.com/apps/app_intents.html)
+* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
+
View
3  webintents/js/background.js
@@ -7,8 +7,7 @@ chrome.app.runtime.onLaunched.addListener(function(data) {
width: 700,
height: 473,
minWidth: 700,
- minHeight: 473,
- frame: 'none'
+ minHeight: 473
}, function(win) {
mainWindow = win;
if (data && data.intent && data.intent.type.indexOf('image') === 0)
View
4 windows/README.md
@@ -1,9 +1,9 @@
# Copycat Window
-Sample that shows how to use the [windowing API](http://developer.chrome.com/trunk/apps/app.window.html) to create a window with a custom frame and manipulate its properties.
+Sample that shows how to use the [window API](http://developer.chrome.com/trunk/apps/app.window.html) to create a window with a custom frame and manipulate its properties.
The app creates two windows, an "original" window and a "copycat" window. The copycat window mimics the position and minimize state of the original window, but it displays itself in an inverted fashion.
## APIs
-* [Windowing](http://developer.chrome.com/trunk/apps/app.window.html)
+* [Window](http://developer.chrome.com/trunk/apps/app.window.html)
View
9 zephyr_hxm/README
@@ -1,9 +0,0 @@
-- Very simple Zephyr HXM client
-- Uses the experimental bluetooth API to fetch heart rate data from a Zephyr HXM device
-- Uses http://www.highcharts.com/ to display the data inside of a sandboxed iframe
-
-Caveats:
-- The bluetooth API is only available on Chrom(e|ium)OS
-- Resource clean-up isn't happening properly yet: you will likely have to disable/enable bluetooth between runs of the program or the connection will fail
-
-Questions/comments: bryeung@chromium.org
View
17 zephyr_hxm/README.md
@@ -0,0 +1,17 @@
+# Zephyr heart rate monitor device
+
+Very simple Zephyr HXM heart rate monitor driver. This sample uses the experimental bluetooth API to fetch heart rate data from a Zephyr HXM device
+
+## Caveats:
+- The bluetooth API is only available on Chrom(e|ium)OS
+- Resource clean-up isn't happening properly yet: you will likely have to disable/enable bluetooth between runs of the program or the connection will fail
+
+## APIs
+
+* [Bluetooth](http://developer.chrome.com/apps/experimental.bluetooth.html)
+* [Sandboxed iframe](http://developer.chrome.com/apps/app_external.html#sandboxing)
+
+
+## Third-party libs
+
+* http://www.highcharts.com/ to display the data inside of a sandboxed iframe
Please sign in to comment.
Something went wrong with that request. Please try again.