| Index: chrome/common/extensions/docs/templates/intros/experimental_notification.html
|
| diff --git a/chrome/common/extensions/docs/templates/intros/experimental_notification.html b/chrome/common/extensions/docs/templates/intros/experimental_notification.html
|
| deleted file mode 100644
|
| index 8789e44c8dcfa5cf346242f1835de5feb505d5e4..0000000000000000000000000000000000000000
|
| --- a/chrome/common/extensions/docs/templates/intros/experimental_notification.html
|
| +++ /dev/null
|
| @@ -1,121 +0,0 @@
|
| -<table class="intro">
|
| - <tr>
|
| - <th scope="col"></th>
|
| - <th scope="col"></th>
|
| - </tr>
|
| - <tr>
|
| - <td><strong>Description:</strong></td>
|
| - <td>Use the <code>chrome.notifications</code> module
|
| - to create rich notifications using templates and
|
| - show these notifications to users in the system tray
|
| - (see <a href="#usage">Usage</a>).</td>
|
| - </tr>
|
| - <tr>
|
| - <td><strong>Availability:</strong></td>
|
| - <td>Google Chrome Dev Channel Only</td>
|
| - </tr>
|
| - <tr>
|
| - <td><strong>Permissions:</strong></td>
|
| - <td><code>"notifications"</code></td>
|
| - </tr>
|
| - <tr>
|
| - <td><strong>Learn more:</strong></td>
|
| - <td><a href="https://developers.google.com/live/shows/83992232-1001/">Chrome Apps Office Hours: Rich Notifications</a></td>
|
| - </tr>
|
| -</table>
|
| -
|
| -<p class="warning">
|
| -<b>Warning: </b>
|
| -Currently this API only works on ChromeOS and Windows.
|
| -</p>
|
| -
|
| -<h2 id="usage">Usage</h2>
|
| -
|
| -<p>
|
| -To use this API,
|
| -call the $ref:experimental.notification.create method,
|
| -passing in the notification details
|
| -via the <code>options</code> parameter:
|
| -</p>
|
| -
|
| -<pre>
|
| -chrome.experimental.notification
|
| - .create(id, options, creationCallback);
|
| -</pre>
|
| -
|
| -<p>
|
| -The $ref:experimental.notification.NotificationOptions must include the
|
| -$ref:experimental.notification.TemplateType
|
| -which defines available notification details
|
| -and how those details are displayed.
|
| -All four available template types
|
| -(<code>simple</code>, <code>basic</code>, <code>image</code>, <code>list</code>)
|
| -include the notification <code>title</code> and <code>message</code>.
|
| -</p>
|
| -
|
| -<p>
|
| -They can also include urls to icons or images.
|
| -The <code>simple</code>, <code>basic</code>, and <code>list</code>
|
| -templates link to small icons (<code>secondIconUrl</code>) displayed
|
| -to the left of the notification message.
|
| -The <code>image</code> template displays icons and images
|
| -more prominently than the text
|
| -(use <code>iconURL</code> or <code>imageURL</code>).
|
| -Due to a strict <a href="app_csp.html">Content Security Policy</a>,
|
| -all of these URLs in packaged apps should point to a local resource
|
| -or use a <a href="http://developer.chrome.com/apps/app_external.html">data URL</a>.
|
| -</p>
|
| -
|
| -<p>
|
| -The <code>basic</code> template looks similar to <code>simple</code>,
|
| -and can also include an <code>expandedMessage</code>.
|
| -Here's an example:
|
| -</p>
|
| -
|
| -<pre>
|
| -var opt = {
|
| - templateType: "basic",
|
| - title: "Primary Title",
|
| - message: "Primary message to display",
|
| - expandedMessage: "Additional message",
|
| - secondIconURL: "url_to_small_icon"
|
| -}
|
| -</pre>
|
| -
|
| -<p>
|
| -The <code>list</code> template will display <code>items</code>
|
| -in a list format:
|
| -</p>
|
| -
|
| -<pre>
|
| -var opt = {
|
| - templateType: "list",
|
| - title: "Primary Title",
|
| - message: "Primary message to display",
|
| - secondIconURL: "url_to_small_icon",
|
| - items: [{ title: "Item1", message: "This is item 1."},
|
| - { title: "Item2", message: "This is item 2."},
|
| - { title: "Item3", message: "This is item 3."}]
|
| -}
|
| -</pre>
|
| -
|
| -<p>
|
| -Let us know if you have ideas for new templates with varying layouts
|
| -by filing a <a href="crbug.com/new">crbug</a>!
|
| -</p>
|
| -
|
| -<h2 id="events">Listening for and responding to events</h2>
|
| -
|
| -<p>
|
| -With the exception of the <code>simple</code> template,
|
| -all notifications can include event listeners and event handlers
|
| -which respond to user actions.
|
| -For example,
|
| -you can write an event handler to respond to an
|
| -$ref:experimental.notification.onButtonClicked event.
|
| -</p>
|
| -
|
| -<p>Consider including event listeners and handlers within the
|
| - <a href="app_lifecycle.html#create_event_page">event page</a>,
|
| -so that notifications can pop-up even when the app or extension isn't running.
|
| -</p>
|
|
|