Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: chrome/common/extensions/docs/apps/mediaGalleries.html

Issue 10823193: Move MediaGalleries.getMediaFileSystems back to experimental for M22 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2 1) The <head> information in this page is significant, should be uniform
3 across api docs and should be edited only with knowledge of the
4 templating mechanism.
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
6 browser, it will be re-generated from the template, json schema and
7 authored overview content.
8 4) The <body>.innerHTML is also generated by an offline step so that this
9 page may easily be indexed by search engines.
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head>
11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
12 <link href="../css/print.css" rel="stylesheet" type="text/css" media="print" >
13 <script type="text/javascript" src="../../../../third_party/jstemplate/jstem plate_compiled.js">
14 </script>
15 <script type="text/javascript" src="../../../../../third_party/json_minify/m inify-sans-regexp.js">
16 </script>
17 <script type="text/javascript" src="../js/api_page_generator.js"></script>
18 <script type="text/javascript" src="../js/bootstrap.js"></script>
19 <script type="text/javascript" src="../js/sidebar.js"></script>
20 <meta name="description" content="Documentation for the chrome.mediaGalleries module, which is part of the Google Chrome extension APIs."><title>Media Galler ies - Google Chrome Extensions - Google Code</title></head>
21 <body doc-family="apps"> <link href="../css/ApiRefStyles.css" rel="stylesheet " type="text/css">
22 <link href="../css/prettify.css" rel="stylesheet" type="text/css">
23 <link href="../css/shared.css" rel="stylesheet" type="text/css">
24 <div id="devModeWarning" class="displayModeWarning">
25 You are viewing extension docs in chrome via the 'file:' scheme: are you exp ecting to see local changes when you refresh? You'll need run chrome with --allo w-file-access-from-files.
26 </div>
27 <div id="branchWarning" class="displayModeWarning">
28 <span>WARNING: This is the <span id="branchName">BETA</span> documentation.
29 It may not work with the stable release of Chrome.</span>
30 <select id="branchChooser">
31 <option>Choose a different version...
32 </option><option value="">Stable
33 </option><option value="beta">Beta
34 </option><option value="dev">Dev
35 </option><option value="trunk">Trunk
36 </option></select>
37 </div>
38 <div id="unofficialWarning" class="displayModeWarning">
39 <span>WARNING: This is unofficial documentation. It may not work with the
40 current release of Chrome.</span>
41 <button id="goToOfficialDocs">Go to the official docs</button>
42 </div>
43 <div id="gc-container" class="labs">
44 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
45 <!-- In particular, sub-templates that recurse, must be used by allowing
46 jstemplate to make a copy of the template in this section which
47 are not operated on by way of the jsskip="true" -->
48 <!-- /SUBTEMPLATES -->
49 <a id="top"></a>
50 <div id="skipto">
51 <a href="#gc-pagecontent">Skip to page content</a>
52 <a href="#gc-toc">Skip to main navigation</a>
53 </div>
54 <!-- API HEADER -->
55 <table id="header" width="100%" cellspacing="0" border="0">
56 <tbody><tr>
57 <td valign="middle"><a href="http://code.google.com/"><img src="../image s/chrome_logo.gif" alt="Google Code" style="border:0; margin:0;"></a></td>
58 <td valign="middle" width="100%" style="padding-left:0.6em;">
59 <form action="http://www.google.com/cse" id="cse" style="margin-top:0. 5em">
60 <div id="gsc-search-box">
61 <input type="hidden" name="cx" value="002967670403910741006:61_cvz fqtno">
62 <input type="hidden" name="ie" value="UTF-8">
63 <input id="gsc-search-input" type="text" name="q" value="" size="5 5">
64 <button class="gsc-search-button" type="submit" name="sa">
65 <img class="gsc-search-button-lens" src="../images/search.png" a lt="Search">
66 </button>
67 <br>
68 <span class="greytext">e.g. "event page" or "alarms"</span>
69 </div>
70 </form>
71 <script type="text/javascript" src="https://www.google.com/jsapi"></sc ript>
72 <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
73 <script type="text/javascript" src="https://www.google.com/coop/cse/t1 3n?form=cse&amp;t13n_langs=en"></script>
74 <script type="text/javascript" src="https://www.google.com/coop/cse/br and?form=cse&amp;lang=en"></script>
75 </td>
76 </tr>
77 </tbody></table>
78 <div id="codesiteContent" class="">
79 <a id="gc-topnav-anchor"></a>
80 <div id="gc-topnav">
81 <h1>Packaged Apps</h1>
82 <ul id="home" class="gc-topnav-tabs">
83 <li id="home_link">
84 <a href="about_apps.html" title="Packaged Apps home page"><span>Home </span></a>
85 </li>
86 <li id="docs_link">
87 <a href="develop_apps.html" title="Packaged apps developer documenta tion"><span>Docs</span></a>
88 </li>
89 <li id="samples_link">
90 <a href="https://github.com/GoogleChrome/chrome-app-samples" title=" Packaged apps samples repository"><span>Samples</span></a>
91 </li>
92 <li id="group_link">
93 <a href="http://groups.google.com/a/chromium.org/group/chromium-apps " title="Google Chrome Apps developer forum"><span>Group</span></a>
94 </li>
95 <li id="so_link">
96 <a href="http://stackoverflow.com/questions/tagged/google-chrome-ext ension" title="[google-chrome-extension] tag on Stack Overflow"><span>Questions? </span></a>
97 </li>
98 </ul>
99 </div> <!-- end gc-topnav -->
100 <div class="g-section g-tpl-170">
101 <!-- SIDENAV -->
102 <div class="g-unit g-first" id="gc-toc">
103 <ul>
104 <li><h2>Getting Started</h2>
105 <ul>
106 <li><a href="about_apps.html">What Are Packaged Apps?</a></li>
107 <li><a href="app_architecture.html">Understand the Architecture</a ></li>
108 <li><a href="first_app.html">Create Your First App</a></li>
109 </ul>
110 </li>
111 <li><h2>Developing</h2>
112 <ul>
113 <li><a href="develop_apps.html">Before You Start</a></li>
114 <li><span>The Fundamentals</span>
115 <ul>
116 <li><a href="app_lifecycle.html">Manage App Lifecycle</a></li>
117 <li><a href="app_storage.html">Manage Data</a></li>
118 <li><a href="offline_apps.html">Offline First</a></li>
119 <li><a href="app_external.html">Embed Content</a></li>
120 </ul>
121 </li>
122 <li><span>Security &amp; Privacy</span>
123 <ul>
124 <li><a href="app_identity.html">Identify User</a></li>
125 <li><a href="app_csp.html">Comply with CSP</a></li>
126 </ul>
127 </li>
128 <li><span>Advanced Technologies</span>
129 <ul>
130 <li><a href="app_network.html">Network Communications</a></li>
131 <li><a href="app_hardware.html">Access Hardware Devices</a></l i>
132 <li><a href="app_intents.html">Connect Apps with Web Intents</ a></li>
133 </ul>
134 </li>
135 <li><a href="app_frameworks.html">MVC Architecture</a></li>
136 </ul>
137 </li>
138 <li><h2>Deploying</h2>
139 <ul>
140 <li><a href="publish_app.html">Publish</a></li>
141 </ul>
142 </li>
143 <li><h2>Reference</h2>
144 <ul>
145 <li><a href="manifest.html">Manifest Files</a></li>
146 <li><a href="api_index.html">Chrome JavaScript APIs</a></li>
147 <li><a href="api_other.html">Supported Libraries</a></li>
148 <li><a href="app_deprecated.html">Disabled Web Features</a></li>
149 </ul>
150 </li>
151 <li><h2><a href="https://github.com/GoogleChrome/chrome-app-samples">S amples</a></h2></li>
152 <li><h2><a href="app_known_issues.html">Known Issues</a></h2></li>
153 </ul>
154 </div>
155 <script>
156 initToggles();
157 </script>
158 <div class="g-unit" id="gc-pagecontent">
159 <div id="pageTitle">
160 <h1 class="page_title">Media Galleries</h1>
161 </div>
162 <!-- TABLE OF CONTENTS -->
163 <div id="toc">
164 <h2>Contents</h2>
165 <ol>
166 <li>
167 <a href="#manifest">Manifest</a>
168 <ol>
169 </ol>
170 </li>
171 <li>
172 <a href="#apiReference">API reference: chrome.mediaGalleries</a>
173 <ol>
174 <li>
175 <a href="#global-methods">Methods</a>
176 <ol>
177 <li>
178 <a href="#method-getMediaFileSystems">getMediaFileSystems</a>
179 </li>
180 </ol>
181 </li>
182 </ol>
183 </li>
184 </ol>
185 </div>
186 <!-- /TABLE OF CONTENTS -->
187 <!-- Standard content lead-in for experimental API pages -->
188 <!-- STATIC CONTENT PLACEHOLDER -->
189 <div id="static"><div id="pageData-name" class="pageData">Media Gallerie s</div>
190 <!-- BEGIN AUTHORED CONTENT -->
191 <p>
192 The media galleries API allows you to access media files (images,
193 video, audio) from the user's local disks (with the user's consent).
194 </p>
195 <p>
196 Using the API, you can prompt the user for permission to access the media
197 galleries. The permission dialog will contain common media locations for
198 the platform and will allow the user to add additional locations. From those
199 locations, only media files will be present in the file system objects.
200 </p>
201 <h2 id="manifest">Manifest</h2>
202 <p>The media galleries API has two axes of permissions; the locations that
203 can be accessed, and the type of access (read-only, read-write, add-files).</p>
204 <p>On the location axis, specifying no location-type permission means that
205 no media galleries are accessible until the user grants permission to
206 specific media galleries at runtime using the media gallery configuration
207 dialog. This dialog can be programmatically triggered. Alternatively,
208 specifying the "mediaGalleriesAllGalleries" permission grants access to all
209 auto-detected media galleries on the user's computer. However, this
210 permission displays an install time prompt indicating that the extension
211 will have access to all of the user's media files.</p>
212 <p>On the access type axis, the "mediaGalleriesRead" permission grants the
213 extension the right to read files. This permission does not trigger an install
214 time permission prompt because the user must still grant access to particular
215 galleries, either with the "mediaGalleriesAllGalleries" permission or at
216 runtime by using the media gallery management dialog. For example:</p>
217 <pre>{
218 "name": "My extension",
219 ...
220 "permissions": [
221 <b>"mediaGalleriesAllGalleries"</b>
222 <b>"mediaGalleriesRead"</b>
223 ],
224 ...
225 }</pre>
226 <p>This set of permissions will trigger an install time permission prompt
227 and let the extension read from all auto-detected media galleries on the
228 user's computer. The user may add or remove galleries using the
229 media gallery management dialog, after which the extension will be able
230 to read all the media files from galleries that the user has selected.</p>
231 <p>Currently "mediaGalleriesRead" is the only access type supported by
232 this API. Read-write and add-file access with be implemented soon.</p>
233 <!-- END AUTHORED CONTENT -->
234 </div>
235 <!-- API PAGE -->
236 <div class="apiPage">
237 <a name="apiReference"></a>
238 <h2>API reference: chrome.mediaGalleries</h2>
239 <!-- PROPERTIES -->
240 <!-- /apiGroup -->
241 <!-- METHODS -->
242 <div id="methodsTemplate" class="apiGroup">
243 <a name="global-methods"></a>
244 <h3>Methods</h3>
245 <!-- iterates over all functions -->
246 <div class="apiItem">
247 <a name="method-getMediaFileSystems"></a> <!-- method-anchor -->
248 <h4>getMediaFileSystems</h4>
249 <div class="summary">
250 <!-- Note: intentionally longer 80 columns -->
251 <span>chrome.mediaGalleries.getMediaFileSystems</span>(<span c lass="optional"><span>object</span>
252 <var><span>details</span></var></span><span class="null">< span>, </span><span>function</span>
253 <var><span>MediaFileSystemsCallback</span></var></span>)</ div>
254 <div class="description">
255 <p>Get the media galleries configured in this user agent. If non e are configured or available, the callback will receive an empty array.</p>
256 <!-- PARAMETERS -->
257 <h4>Parameters</h4>
258 <dl>
259 <div>
260 <div>
261 <dt>
262 <var>details</var>
263 <em>
264 <!-- TYPE -->
265 <div style="display:inline">
266 (
267 <span class="optional">optional</span>
268 <span id="typeTemplate">
269 <span>
270 <span>object</span>
271 </span>
272 </span>
273 )
274 </div>
275 </em>
276 </dt>
277 <dd class="todo">
278 Undocumented.
279 </dd>
280 <!-- OBJECT PROPERTIES -->
281 <dd>
282 <dl>
283 <div>
284 <div>
285 <dt>
286 <var>interactive</var>
287 <em>
288 <!-- TYPE -->
289 <div style="display:inline">
290 (
291 <span class="optional">optional</span>
292 <span class="enum">enumerated</span>
293 <span id="typeTemplate">
294 <span>
295 <span>string</span>
296 <span>["no", "yes", "if_needed"]</span>
297 </span>
298 </span>
299 )
300 </div>
301 </em>
302 </dt>
303 <dd>Whether to prompt the user for permission to additional media gall eries before returning the permitted set. Default is silent. If the value 'yes' is passed, or if the application has not been granted access to any media galle ries and the value 'if_needed' is passed, then the media gallery configuration d ialog will be displayed.</dd>
304 <!-- OBJECT PROPERTIES -->
305 <!-- OBJECT METHODS -->
306 <!-- OBJECT EVENT FIELDS -->
307 <!-- FUNCTION PARAMETERS -->
308 </div>
309 </div>
310 </dl>
311 </dd>
312 <!-- OBJECT METHODS -->
313 <!-- OBJECT EVENT FIELDS -->
314 <!-- FUNCTION PARAMETERS -->
315 </div>
316 </div><div>
317 <div>
318 <dt>
319 <var>MediaFileSystemsCallback</var>
320 <em>
321 <!-- TYPE -->
322 <div style="display:inline">
323 (
324 <span id="typeTemplate">
325 <span>
326 <span>function</span>
327 </span>
328 </span>
329 )
330 </div>
331 </em>
332 </dt>
333 <dd class="todo">
334 Undocumented.
335 </dd>
336 <!-- OBJECT PROPERTIES -->
337 <!-- OBJECT METHODS -->
338 <!-- OBJECT EVENT FIELDS -->
339 <!-- FUNCTION PARAMETERS -->
340 <dd>
341 <div>
342 <h5>Parameters</h5>
343 <dl>
344 <div>
345 <div>
346 <dt>
347 <var>mediaFileSystems</var>
348 <em>
349 <!-- TYPE -->
350 <div style="display:inline">
351 (
352 <span class="optional">optional</span>
353 <span id="typeTemplate">
354 <span>
355 <span>
356 array of <span><span>
357 <span>
358 <span>LocalFileSystem</span>
359 </span>
360 </span></span>
361 </span>
362 </span>
363 </span>
364 )
365 </div>
366 </em>
367 </dt>
368 <dd class="todo">
369 Undocumented.
370 </dd>
371 <!-- OBJECT PROPERTIES -->
372 <!-- OBJECT METHODS -->
373 <!-- OBJECT EVENT FIELDS -->
374 <!-- FUNCTION PARAMETERS -->
375 </div>
376 </div>
377 </dl>
378 </div>
379 </dd>
380 </div>
381 </div>
382 </dl>
383 <!-- RETURNS -->
384 <dl>
385 </dl>
386 <!-- CALLBACK -->
387 <!-- MIN_VERSION -->
388 </div> <!-- /description -->
389 </div> <!-- /apiItem -->
390 </div> <!-- /apiGroup -->
391 <!-- EVENTS -->
392 <!-- /apiGroup -->
393 <!-- TYPES -->
394 <!-- /apiGroup -->
395 </div> <!-- /apiPage -->
396 </div> <!-- /gc-pagecontent -->
397 </div> <!-- /g-section -->
398 </div> <!-- /codesiteContent -->
399 <div id="gc-footer" --="">
400 <div class="text">
401 <p>
402 Except as otherwise <a href="http://code.google.com/policies.html#restrictions ">noted</a>,
403 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/">Creative Commons
404 Attribution 3.0 License</a>, and code samples are licensed under the
405 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic ense</a>.
406 </p>
407 <p>
408 ©2012 Google
409 </p>
410 <!-- begin analytics -->
411 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript"> </script>
412 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc ript>
413 <script src="../js/prettify.js" type="text/javascript"></script>
414 <script>
415 // Auto syntax highlight all pre tags.
416 var pres = document.querySelectorAll('pre');
417 for (var i = 0, pre; pre = pres[i]; ++i) {
418 pre.className += ' prettyprint';
419 };
420 prettyPrint();
421 </script>
422 <script type="text/javascript">
423 // chrome doc tracking
424 try {
425 var engdocs = _gat._getTracker("YT-10763712-2");
426 engdocs._trackPageview();
427 } catch(err) {}
428 // code.google.com site-wide tracking
429 try {
430 _uacct="UA-18071-1";
431 _uanchor=1;
432 _uff=0;
433 urchinTracker();
434 }
435 catch(e) {/* urchinTracker not available. */}
436 </script>
437 <!-- end analytics -->
438 </div>
439 </div> <!-- /gc-footer -->
440 </div> <!-- /gc-container -->
441 </body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698