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

Side by Side Diff: extensions/docs/extension_and_app_types.md

Issue 2699553002: Document extension and app types (Closed)
Patch Set: minor reword Created 3 years, 10 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
« no previous file with comments | « extensions/README.md ('k') | extensions/docs/extension_types.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Extension and App Types
2
3 Generally, browser extensions cut across websites and web apps, while apps
4 provide more isolated functionality.
5
6 [TOC]
7
8 ![Summary of extension types showing browser extensions, packaged/platform apps,
9 and hosted/bookmark apps](extension_types.png)
10
11 ## Browser extensions
12
13 Browser extensions often provide an interactive toolbar icon, but can also run
14 without any UI. They may interact with the browser or tab contents, and can
15 request more extensive permissions than apps.
16
17 ## Apps
18
19 ### Platform app
20
21 Platform apps (*v2 packaged apps*) are standalone applications that mostly run
22 independently of the browser. Their windows look and feel like native
23 applications but simply host the app's pages.
24
25 Most apps, like Calculator and the Files app, create their window(s) and
26 initialize a UI in response to Chrome's `chrome.app.runtime.onLaunched` event.
27 Some apps don't show a window but work in the background instead. Platform apps
28 can connect to more device types than browser extensions have access to.
29
30 Platform apps are deprecated on non-Chrome OS platforms.
31
32 ### Packaged app (legacy)
33
34 [Legacy (v1) packaged apps](https://developer.chrome.com/extensions/apps)
35 combined the appearance of a [hosted app](#Hosted-app) -- a windowed wrapper
36 around a website -- with the power of extension APIs. With the launch of
37 platform apps and the app-specific APIs, legacy packaged apps are deprecated.
38
39 ### Hosted app
40
41 A [hosted app](https://developer.chrome.com/webstore/hosted_apps) is mostly
42 metadata: a web URL to launch, a list of associated URLs, and a list of HTML5
43 permissions. Chrome ask for these permissions during the app's installation,
44 allowing the associated URL to bypass the normal Chrome permission prompts for
45 HTML5 features.
46
47 ### Bookmark app
48
49 A bookmark app is a simplified hosted app that Chrome creates on demand. When
50 the user taps "Add to desktop" (or "Add to shelf" on Chrome OS) in the Chrome
51 menu, Chrome creates a barebones app whose manifest specifies the current tab's
52 URL. A shortcut to this URL appears in chrome://apps using the site's favicon.
53
54 Chrome then creates a desktop shortcut that will open a browser window with
55 flags that specify the app and profile. Activating the icon launches the
56 "bookmarked" URL in a tab or a window.
57
58 ## Manifest
59
60 A particular manifest key in an extension's `manifest.json` file determines what
61 kind of extension it is:
62
63 * Platform app: `app.background.page` and/or `app.background.scripts`
64 * Legacy packaged app: `app.launch.local_path`
65 * Hosted app: `app.launch.web_url`
66 * Browser extension: none of the above
67
68 ## Notes
69
70 `Extension` is the class type for all extensions and apps, so technically
71 speaking, an app *is-an* `Extension`. The word "extension" usually refers only
72 to non-app extensions, a.k.a. *browser extensions*.
73
74 ## See also
75
76 * [`Manifest::Type` declaration](https://cs.chromium.org/chromium/src/extensions /common/manifest.h?gs=cpp%253Aextensions%253A%253Aclass-Manifest%253A%253Aenum-T ype%2540chromium%252F..%252F..%252Fextensions%252Fcommon%252Fmanifest.h%257Cdef& gsn=Type&ct=xref_usages)
77 * Extensions (3rd-party developer documentation)
78 * [Extension APIs](https://developer.chrome.com/extensions/api_index)
79 * [Extension manifest file format](
80 https://developer.chrome.com/extensions/manifest)
81 * Apps (3rd-party developer documentation)
82 * [Platform app APIs](https://developer.chrome.com/apps/api_index)
83 * [Platform app manifest file format](
84 https://developer.chrome.com/apps/manifest)
85 * [Choosing an app type](https://developer.chrome.com/webstore/choosing)
86 * Ancient article introducing the [motivation for apps (outdated)](
87 https://developer.chrome.com/webstore/apps_vs_extensions)
OLDNEW
« no previous file with comments | « extensions/README.md ('k') | extensions/docs/extension_types.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698