Index: chrome/common/extensions/docs/server2/templates/intros/fileBrowserHandler.html |
diff --git a/chrome/common/extensions/docs/server2/templates/intros/fileBrowserHandler.html b/chrome/common/extensions/docs/server2/templates/intros/fileBrowserHandler.html |
index 4774417cff1a6b9a5bbaab2d3f5617f9bcf9d0e5..40d681af103ef2e3298a01c9ea7b4acb282f70f9 100644 |
--- a/chrome/common/extensions/docs/server2/templates/intros/fileBrowserHandler.html |
+++ b/chrome/common/extensions/docs/server2/templates/intros/fileBrowserHandler.html |
@@ -1,14 +1,15 @@ |
-<!-- BEGIN AUTHORED CONTENT --> |
<p id="classSummary"> |
Use the <code>chrome.fileBrowserHandler</code> module to |
extend the Chrome OS file browser. |
For example, you can use this API |
to enable users to upload files to your website. |
</p> |
+ |
<p class="caution"> |
<b>Important:</b> |
This API works <b>only on Chrome OS</b>. |
</p> |
+ |
<p> |
The Chrome OS file browser comes up when |
the user either presses Ctrl+M |
@@ -18,6 +19,7 @@ Besides showing the files on external devices, |
the file browser can also display files |
that the user has previously saved to the system. |
</p> |
+ |
<p> |
When the user selects one or more files, |
the file browser adds buttons |
@@ -26,11 +28,15 @@ For example, in the following screenshot, |
selecting a file with a ".jpg" suffix |
results in an "Upload to Picasa" button that the user can click. |
</p> |
+ |
<p> |
<img src="{{static}}/images/filebrowserhandler.png" |
width="640" height="400" alt="file browser screenshot" /> |
</p> |
+ |
+ |
<h2 id="manifest">Manifest</h2> |
+ |
<p> |
You must declare the "fileBrowserHandler" permission |
in the <a href="manifest.html">extension manifest</a>, |
@@ -40,6 +46,7 @@ You should also provide a 16x16 icon |
to be displayed on the button. |
For example: |
</p> |
+ |
<pre> |
{ |
"name": "My extension", |
@@ -63,12 +70,15 @@ For example: |
"128": "icon128.png" }, |
... |
}</pre> |
+ |
<p class="note"> |
<b>Note:</b> |
You can specify locale-specific strings for the value of "default_title". |
See <a href="i18n.html">Internationalization (i18n)</a> for details. |
</p> |
+ |
<h2 id="code">Implementing a file browser handler</h2> |
+ |
<p> |
To use this API, |
you must implement a function that handles the <code>onExecute</code> event |
@@ -80,6 +90,7 @@ In your function, use the HTML5 |
to get access to the file contents. |
Here is an example: |
</p> |
+ |
<pre> |
<em>//In background.html:</em> |
chrome.fileBrowserHandler.onExecute.addListener(function(id, details) { |
@@ -93,9 +104,11 @@ chrome.fileBrowserHandler.onExecute.addListener(function(id, details) { |
} |
}); |
</pre> |
+ |
<p> |
Your event handler is passed two arguments: |
</p> |
+ |
<dl> |
<dt> id </dt> |
<dd> The "id" value from the manifest file. |
@@ -111,26 +124,31 @@ Your event handler is passed two arguments: |
FileSystem <code>Entry</code> objects. |
</dd> |
</p> |
+ |
+ |
<!-- |
<h2 id="manifest_details">Manifest details</h2> |
+ |
<p class="authornote"> |
{PENDING: give details about "id" and "default_title". |
It should be unique within your extension -- don't worry about other extensions. |
"default_title" implies that you can change the title, |
but you can't aside from internationalizing it. |
</p> |
+ |
<p class="authornote"> |
{PENDING: give details about the file_filters entry. |
File filters are currently case-sensitive, but we plan to change that. |
Mention <code>filesystem:*.*</code>. |
</p> |
--> |
+ |
<!-- |
<h2 id="examples">Examples</h2> |
+ |
<p> |
For examples of using this API, see ... |
For other examples and for help in viewing the source code, see |
<a href="samples.html">Samples</a>. |
</p> |
---> |
-<!-- END AUTHORED CONTENT --> |
+--> |