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

Unified Diff: chrome/common/extensions/docs/static/experimental.managedMode.html

Issue 9566007: Initial Managed Mode extension API, supporting querying the setting and a stub for enabling the mod… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Updated checkout again Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/static/experimental.managedMode.html
===================================================================
--- chrome/common/extensions/docs/static/experimental.managedMode.html (revision 0)
+++ chrome/common/extensions/docs/static/experimental.managedMode.html (revision 0)
@@ -0,0 +1,81 @@
+<div id="pageData-name" class="pageData">Managed Mode API</div>
+
+<!-- BEGIN AUTHORED CONTENT -->
+<p id="classSummary">
+ The <code>chrome.experimental.managedMode</code> module allows extensions to
+ request that the browser enter managed mode, as well as to query whether it
+ is currently in managed mode.
+</p>
+
+<p class="note">
+ <b>Note: </b>Extensions cannot request that the browser leave managed mode.
+ This must be done by the user from within the browser itself.
+</p>
+
+<h2 id="manifest">Manifest</h2>
+<p>
+ You must declare the "managedMode" and "experimental" permissions in your
+ extension's <a href="manifest.html">manifest</a> to use the API. For example:
+</p>
+
+<pre>{
+ "name": "My extension",
+ ...
+ <b>"permissions": [
+ "experimental",
+ "managedMode"
+ ]</b>,
+ ...
+}</pre>
+
+<h2 id="about">About Managed Mode</h2>
+
+<p>
+ Managed mode allows one person to manage the Chrome experience for another
+ person by pre-configuring and then locking a managed User profile.
+
+ <span class="todo">For more information about Chrome's managed mode, see
+ <b>[TBD]</b>.</span>
+</p>
+
+<h2 id="usage">Usage</h2>
+
+<p>
+ Querying managed mode is straightforward. Simply call <code>get()</code>,
+ providing a callback function to receive the result. For example:
+</p>
+
+<pre>chrome.experimental.managedMode.get(function(details) {
+ if (details.value)
+ console.log('Managed mode is on.');
+ else
+ console.log('Managed mode is off.');
+});</pre>
+
+<p>
+ Entering managed mode is a little bit more complex, because if the browser is
+ already in managed mode, trying to enter it again will have no effect. To
+ avoid confusing users, it's advisable to check whether your extension can
+ enter managed mode (i.e., if it is not already in effect), and visually
+ disable the functionality in your extension if not. You can optionally
+ provide a callback function to <code>enter()</code> to receive the result.
+ For example:
+</p>
+
+<pre>chrome.experimental.managedMode.get(function(details) {
+ if (details.value) {
+ console.log("Managed mode is already in effect.");
+ } else {
+ chrome.experimental.managedMode.enter(function(result) {
+ if (chrome.extension.lastError === undefined) {
+ if (result.success)
+ console.log("Hooray, it worked!");
+ else
+ console.log("Oops, the user changed her mind.");
+ } else {
+ console.log("Aw, snap!", chrome.extension.lastError);
+ }
+ });
+ }
+});</pre>
+<!-- END AUTHORED CONTENT -->
Property changes on: chrome\common\extensions\docs\static\experimental.managedMode.html
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/common/extensions/docs/js/api_page_generator.js ('k') | chrome/common/extensions/extension_permission_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698