OLD | NEW |
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> |
11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> | 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> |
13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> | 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> |
14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> | 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> |
15 </script> | 15 </script> |
16 <script type="text/javascript" src="js/api_page_generator.js"></script> | 16 <script type="text/javascript" src="js/api_page_generator.js"></script> |
17 <script type="text/javascript" src="js/bootstrap.js"></script> | 17 <script type="text/javascript" src="js/bootstrap.js"></script> |
18 <script type="text/javascript" src="js/sidebar.js"></script> | 18 <script type="text/javascript" src="js/sidebar.js"></script> |
19 <title>chrome.preferences - Google Chrome Extensions - Google Code</title></he
ad> | 19 <title>Preferences - Google Chrome Extensions - Google Code</title></head> |
20 <body> <div id="gc-container" class="labs"> | 20 <body> <div id="gc-container" class="labs"> |
21 <div id="devModeWarning"> | 21 <div id="devModeWarning"> |
22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. | 22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. |
23 </div> | 23 </div> |
24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> | 24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> |
25 <!-- In particular, sub-templates that recurse, must be used by allowing | 25 <!-- In particular, sub-templates that recurse, must be used by allowing |
26 jstemplate to make a copy of the template in this section which | 26 jstemplate to make a copy of the template in this section which |
27 are not operated on by way of the jsskip="true" --> | 27 are not operated on by way of the jsskip="true" --> |
28 <div style="display:none"> | 28 <div style="display:none"> |
29 | 29 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 </ul> | 244 </ul> |
245 </li> | 245 </li> |
246 </ul> | 246 </ul> |
247 </div> | 247 </div> |
248 <script> | 248 <script> |
249 initToggles(); | 249 initToggles(); |
250 </script> | 250 </script> |
251 | 251 |
252 <div class="g-unit" id="gc-pagecontent"> | 252 <div class="g-unit" id="gc-pagecontent"> |
253 <div id="pageTitle"> | 253 <div id="pageTitle"> |
254 <h1 class="page_title">chrome.preferences</h1> | 254 <h1 class="page_title">Preferences</h1> |
255 </div> | 255 </div> |
256 <!-- TABLE OF CONTENTS --> | 256 <!-- TABLE OF CONTENTS --> |
257 <div id="toc"> | 257 <div id="toc"> |
258 <h2>Contents</h2> | 258 <h2>Contents</h2> |
259 <ol> | 259 <ol> |
260 <li style="display: none; "> | 260 <li> |
261 <a>h2Name</a> | 261 <a href="#description">Overview</a> |
262 <ol> | 262 <ol> |
263 <li> | 263 <li style="display: none; "> |
264 <a>h3Name</a> | 264 <a>h3Name</a> |
265 </li> | 265 </li> |
266 </ol> | 266 </ol> |
| 267 </li><li> |
| 268 <a href="#precedence">Precedence</a> |
| 269 <ol> |
| 270 <li style="display: none; "> |
| 271 <a>h3Name</a> |
| 272 </li> |
| 273 </ol> |
267 </li> | 274 </li> |
268 <li> | 275 <li> |
269 <a href="#apiReference">API reference: chrome.preferences</a> | 276 <a href="#apiReference">API reference: chrome.preferences</a> |
270 <ol> | 277 <ol> |
271 <li style="display: none; "> | 278 <li style="display: none; "> |
272 <a href="#properties">Properties</a> | 279 <a href="#properties">Properties</a> |
273 <ol> | 280 <ol> |
274 <li> | 281 <li> |
275 <a href="#property-anchor">propertyName</a> | 282 <a href="#property-anchor">propertyName</a> |
276 </li> | 283 </li> |
(...skipping 28 matching lines...) Expand all Loading... |
305 </ol> | 312 </ol> |
306 </div> | 313 </div> |
307 <!-- /TABLE OF CONTENTS --> | 314 <!-- /TABLE OF CONTENTS --> |
308 | 315 |
309 <!-- Standard content lead-in for experimental API pages --> | 316 <!-- Standard content lead-in for experimental API pages --> |
310 <p id="classSummary" style="display: none; "> | 317 <p id="classSummary" style="display: none; "> |
311 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. | 318 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. |
312 </p> | 319 </p> |
313 | 320 |
314 <!-- STATIC CONTENT PLACEHOLDER --> | 321 <!-- STATIC CONTENT PLACEHOLDER --> |
315 <div id="static"></div> | 322 <div id="static"><div id="pageData-name" class="pageData">Preferences</d
iv> |
| 323 |
| 324 <!-- BEGIN AUTHORED CONTENT --> |
| 325 <p id="classSummary"> |
| 326 The <code>chrome.preferences</code> module contains a prototype for giving other |
| 327 modules access to manage preferences stored by Chrome. This prototype is used |
| 328 for example for <a href="proxy.html#property-settings"><code>chrome.proxy.settin
gs</code></a>. |
| 329 </p> |
| 330 |
| 331 <h2 id="description">Overview</h2> |
| 332 |
| 333 <p> |
| 334 The preferences API provides a common set of functions |
| 335 (<code>getEffective()</code>, <code>set()</code>, and <code>clear()</code>) as |
| 336 well as an event publisher (<code>onChangeEffective</code>) for various |
| 337 preferences in Chrome. The <a href="proxy.html#overview-examples">proxy settings |
| 338 examples</a> demonstrate how these functions are intended to be used. |
| 339 </p> |
| 340 |
| 341 <!-- |
| 342 <h2 id="lifecycle">Life cycle of preferences</h2> |
| 343 |
| 344 <p> |
| 345 The life cycle of preferences depends on whether they are set for regular or |
| 346 incognito profiles. </p> |
| 347 --> |
| 348 |
| 349 <p> |
| 350 Currently, preferences can only be set for regular profiles. Once set, they |
| 351 remain in place until they are cleared by the governing extension, or the |
| 352 governing extension is disabled or uninstalled. |
| 353 </p> |
| 354 |
| 355 <h2 id="precedence">Precedence</h2> |
| 356 |
| 357 <p> |
| 358 Chrome manages preferences on different layers. The following list describes the |
| 359 layers that may influence the effective preferences, in increasing order of |
| 360 precedence. |
| 361 </p><ol> |
| 362 <li>System preferences provided by the operating system</li> |
| 363 <li>Command-line parameters</li> |
| 364 <li>Preferences set by extensions</li> |
| 365 <li>Policies</li> |
| 366 </ol> |
| 367 <p></p> |
| 368 |
| 369 <p> |
| 370 As the list implies, policies might overrule any changes that you specify with |
| 371 your extension. |
| 372 </p> |
| 373 |
| 374 <!-- |
| 375 <p> |
| 376 As discussed above, Chrome allows using different preferences for regular |
| 377 windows and incognito windows. The following example illustrates the behavior. |
| 378 Assume that no policy overrides the preferences and that an extension can set |
| 379 preferences for regular windows <b>(R)</b> and preferences for incognito windows |
| 380 <b>(I)</b>. |
| 381 </p> |
| 382 |
| 383 <p> |
| 384 <ul> |
| 385 <li>If only <b>(R)</b> is set, these preferences are effective for both |
| 386 regular and incognito windows.</li> |
| 387 <li>If only <b>(I)</b> is set, these preferences are effective for only |
| 388 incognito windows. Regular windows use the preferences determined by the lower |
| 389 layers (command-line options and system settings).</li> |
| 390 <li>If both <b>(R)</b> and <b>(I)</b> are set, the respective preferences are |
| 391 used for regular and incognito windows.</li> |
| 392 </ul> |
| 393 </p> |
| 394 --> |
| 395 |
| 396 <p> |
| 397 If two or more extensions want to set the same preference to different values, |
| 398 the extension installed most recently takes precedence over the other |
| 399 extensions. |
| 400 <!-- If the |
| 401 extension installed last sets only <b>(I)</b>, the preference of regular windows |
| 402 can be defined by previously installed extensions. --> |
| 403 </p> |
| 404 |
| 405 <p> |
| 406 The <em>effective</em> preference value is the setting that results from |
| 407 considering the preference rules. It is used by Chrome. |
| 408 </p><p> |
| 409 |
| 410 <!-- END AUTHORED CONTENT --> |
| 411 </p></div> |
316 | 412 |
317 <!-- API PAGE --> | 413 <!-- API PAGE --> |
318 <div class="apiPage"> | 414 <div class="apiPage"> |
319 <a name="apiReference"></a> | 415 <a name="apiReference"></a> |
320 <h2>API reference: chrome.preferences</h2> | 416 <h2>API reference: chrome.preferences</h2> |
321 | 417 |
322 <!-- PROPERTIES --> | 418 <!-- PROPERTIES --> |
323 <div class="apiGroup" style="display: none; "> | 419 <div class="apiGroup" style="display: none; "> |
324 <a name="properties"></a> | 420 <a name="properties"></a> |
325 <h3 id="properties">Properties</h3> | 421 <h3 id="properties">Properties</h3> |
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2036 _uff=0; | 2132 _uff=0; |
2037 urchinTracker(); | 2133 urchinTracker(); |
2038 } | 2134 } |
2039 catch(e) {/* urchinTracker not available. */} | 2135 catch(e) {/* urchinTracker not available. */} |
2040 </script> | 2136 </script> |
2041 <!-- end analytics --> | 2137 <!-- end analytics --> |
2042 </div> | 2138 </div> |
2043 </div> <!-- /gc-footer --> | 2139 </div> <!-- /gc-footer --> |
2044 </div> <!-- /gc-container --> | 2140 </div> <!-- /gc-container --> |
2045 </body></html> | 2141 </body></html> |
OLD | NEW |