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

Unified Diff: chrome/common/extensions/api/types_private.json

Issue 18341016: Add types.private.ChromeDirectSetting and Connect it to preferencesPrivate.googleGeolocationAccessE… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to Latest Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/preferences_private.json ('k') | chrome/common/extensions_api_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/types_private.json
diff --git a/chrome/common/extensions/api/types_private.json b/chrome/common/extensions/api/types_private.json
new file mode 100644
index 0000000000000000000000000000000000000000..5e16f38cc2f909da643dac9bbd69a1d41250124b
--- /dev/null
+++ b/chrome/common/extensions/api/types_private.json
@@ -0,0 +1,143 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[
+ {
+ "namespace": "types.private",
+ "description": "The <code>chrome.types.private</code> API contains private type declarations for Chrome.",
+ "types": [
+ {
+ "id": "ChromeDirectSetting",
+ "type": "object",
+ "js_module": "ChromeDirectSetting",
+ "customBindings": "ChromeDirectSetting",
+ "description": "An interface that allows component extensions direct access to a Chrome browser setting.",
+ "functions": [
+ {
+ "name": "get",
+ "type": "function",
+ "description": "Gets the value of a setting.",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "Which setting to consider.",
+ "properties": {
+ "incognito": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether to return the value that applies to the incognito session (default false)."
+ }
+ }
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "Details of the currently effective value.",
+ "properties": {
+ "value": {
+ "description": "The value of the setting.",
+ "type": "any"
+ },
+ "incognitoSpecific": {
+ "description": "Whether the effective value is specific to the incognito session.<br/>This property will <em>only</em> be present if the <var>incognito</var> property in the <var>details</var> parameter of <code>get()</code> was true.",
+ "type": "boolean",
+ "optional": true
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "set",
+ "type": "function",
+ "description": "Sets the value of a setting.",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "Which setting to change.",
+ "properties": {
+ "value": {
+ "description": "The value of the setting. <br/>Note that every setting has a specific value type, which is described together with the setting. An extension should <em>not</em> set a value of a different type.",
+ "type": "any"
+ },
+ "scope": {
+ "type": "string",
+ "enum": ["regular", "regular_only", "incognito_persistent", "incognito_session_only"],
+ "optional": true,
+ "description": "Where to set the setting (default: regular). One of<ul><li><var>regular</var>: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),</li><li><var>regular_only</var>: setting for the regular profile only (not inherited by the incognito profile),</li><li><var>incognito_persistent</var>: setting for the incognito profile that survives browser restarts (overrides regular preferences),</li><li><var>incognito_session_only</var>: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).</li></ul>"
+ }
+ }
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Called at the completion of the set operation.",
+ "optional": true,
+ "parameters": []
+ }
+ ]
+ },
+ {
+ "name": "clear",
+ "type": "function",
+ "description": "Clears the setting, restoring any default value.",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "Which setting to clear.",
+ "properties": {
+ "scope": {
+ "type": "string",
+ "enum": ["regular", "regular_only", "incognito_persistent", "incognito_session_only"],
+ "optional": true,
+ "description": "Where to clear the setting (default: regular). One of<ul><li><var>regular</var>: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),</li><li><var>regular_only</var>: setting for the regular profile only (not inherited by the incognito profile),</li><li><var>incognito_persistent</var>: setting for the incognito profile that survives browser restarts (overrides regular preferences),</li><li><var>incognito_session_only</var>: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).</li></ul>"
+ }
+ }
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Called at the completion of the clear operation.",
+ "optional": true,
+ "parameters": []
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "onChange",
+ "description": "Fired after the setting changes.",
+ "parameters": [
+ {
+ "type": "object",
+ "name": "details",
+ "properties": {
+ "value": {
+ "description": "The value of the setting after the change.",
+ "type": "any"
+ },
+ "incognitoSpecific": {
+ "description": "Whether the value that has changed is specific to the incognito session.<br/>This property will <em>only</em> be present if the user has enabled the extension in incognito mode.",
+ "type": "boolean",
+ "optional": true
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+]
« no previous file with comments | « chrome/common/extensions/api/preferences_private.json ('k') | chrome/common/extensions_api_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698