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

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

Issue 10659021: Move chrome.appWindow to chrome.app.window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 5 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
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 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 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 3 across api docs and should be edited only with knowledge of the
4 templating mechanism. 4 templating mechanism.
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a 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 6 browser, it will be re-generated from the template, json schema and
7 authored overview content. 7 authored overview content.
8 4) The <body>.innerHTML is also generated by an offline step so that this 8 4) The <body>.innerHTML is also generated by an offline step so that this
9 page may easily be indexed by search engines. 9 page may easily be indexed by search engines.
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head>
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 <pre>{ 236 <pre>{
237 "name": "Hello World!", 237 "name": "Hello World!",
238 "description": "My first packaged app.", 238 "description": "My first packaged app.",
239 "manifest_version": 2, 239 "manifest_version": 2,
240 "version": "0.1", 240 "version": "0.1",
241 "app": { 241 "app": {
242 "background": { 242 "background": {
243 "scripts": ["background.js"] 243 "scripts": ["background.js"]
244 } 244 }
245 }, 245 },
246 "permissions": ["experimental", "appWindow"], 246 "permissions": ["experimental", "app.window"],
247 "icons": { "16": "calculator-16.png", "128": "calculator-128.png" } 247 "icons": { "16": "calculator-16.png", "128": "calculator-128.png" }
248 } 248 }
249 </pre> 249 </pre>
250 <p class="note"> 250 <p class="note">
251 <b>Important:</b> 251 <b>Important:</b>
252 Packaged apps <b>must</b> use 252 Packaged apps <b>must</b> use
253 <a href="manifestVersion.html">manifest version 2</a>. 253 <a href="manifestVersion.html">manifest version 2</a>.
254 </p> 254 </p>
255 <h2 id="two">Step 2: Create the background script</h2> 255 <h2 id="two">Step 2: Create the background script</h2>
256 <p> 256 <p>
257 Next create a new file called <code>background.js</code> 257 Next create a new file called <code>background.js</code>
258 with the following content: 258 with the following content:
259 </p> 259 </p>
260 <pre>chrome.experimental.app.onLaunched.addListener(function() { 260 <pre>chrome.experimental.app.onLaunched.addListener(function() {
261 chrome.appWindow.create('window.html', { 261 chrome.app.window.create('window.html', {
262 'width': 400, 262 'width': 400,
263 'height': 500 263 'height': 500
264 }); 264 });
265 }); 265 });
266 </pre> 266 </pre>
267 <p> 267 <p>
268 In the above sample code, 268 In the above sample code,
269 the <a href="app_lifecycle.html#lifecycle">onLaunched event</a> 269 the <a href="app_lifecycle.html#lifecycle">onLaunched event</a>
270 will be fired when the user starts the app. 270 will be fired when the user starts the app.
271 It then immediately opens a window for the app of the specified width and height . 271 It then immediately opens a window for the app of the specified width and height .
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 _uff=0; 373 _uff=0;
374 urchinTracker(); 374 urchinTracker();
375 } 375 }
376 catch(e) {/* urchinTracker not available. */} 376 catch(e) {/* urchinTracker not available. */}
377 </script> 377 </script>
378 <!-- end analytics --> 378 <!-- end analytics -->
379 </div> 379 </div>
380 </div> <!-- /gc-footer --> 380 </div> <!-- /gc-footer -->
381 </div> <!-- /gc-container --> 381 </div> <!-- /gc-container -->
382 </body></html> 382 </body></html>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/apps/fileSystem.html ('k') | chrome/common/extensions/docs/extensions/appWindow.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698