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

Side by Side Diff: chrome/common/extensions/api/extension_api.json

Issue 7029031: Content settings extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 9 years, 6 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 [ 1 [
2 { 2 {
3 "namespace": "extension", 3 "namespace": "extension",
4 "unprivileged": true, 4 "unprivileged": true,
5 "types": [ 5 "types": [
6 { 6 {
7 "id": "MessageSender", 7 "id": "MessageSender",
8 "type": "object", 8 "type": "object",
9 "description": "An object containing information about the script contex t that sent a message or request.", 9 "description": "An object containing information about the script contex t that sent a message or request.",
10 "properties": { 10 "properties": {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 "lastError": { 46 "lastError": {
47 "type": "object", 47 "type": "object",
48 "optional": true, 48 "optional": true,
49 "unprivileged": true, 49 "unprivileged": true,
50 "description": "Set for the lifetime of a callback if an ansychronous ex tension api has resulted in an error. If no error has occured lastError will be <var>undefined</var>.", 50 "description": "Set for the lifetime of a callback if an ansychronous ex tension api has resulted in an error. If no error has occured lastError will be <var>undefined</var>.",
51 "properties": { 51 "properties": {
52 "message": { "type": "string", "description": "Description of the erro r that has taken place." } 52 "message": { "type": "string", "description": "Description of the erro r that has taken place." }
53 } 53 }
54 }, 54 },
55 "inIncognitoContext": { 55 "inIncognitoContext": {
56 "type": "object", 56 "type": "boolean",
57 "optional": true, 57 "optional": true,
58 "unprivileged": true, 58 "unprivileged": true,
59 "description": "True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only app lies to extensions with 'split' incognito_behavior.", 59 "description": "True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only app lies to extensions with 'split' incognito_behavior."
60 "properties": {
61 "message": { "type": "boolean", "description": "True if the page or sc ript is in an incongito process." }
62 }
63 } 60 }
64 }, 61 },
65 "functions": [ 62 "functions": [
66 { 63 {
67 "name": "connect", 64 "name": "connect",
68 "type": "function", 65 "type": "function",
69 "unprivileged": true, 66 "unprivileged": true,
70 "description": "Attempts to connect to other listeners within the extens ion (such as the extension's background page). This is primarily useful for cont ent scripts connecting to their extension processes. Extensions may connect to c ontent scripts embedded in tabs via <a href='tabs.html#method-connect'><code>chr ome.tabs.connect()</code></a>.", 67 "description": "Attempts to connect to other listeners within the extens ion (such as the extension's background page). This is primarily useful for cont ent scripts connecting to their extension processes. Extensions may connect to c ontent scripts embedded in tabs via <a href='tabs.html#method-connect'><code>chr ome.tabs.connect()</code></a>.",
71 "parameters": [ 68 "parameters": [
72 {"type": "string", "name": "extensionId", "optional": true, "descripti on": "The extension ID of the extension you want to connect to. If omitted, defa ult is your own extension."}, 69 {"type": "string", "name": "extensionId", "optional": true, "descripti on": "The extension ID of the extension you want to connect to. If omitted, defa ult is your own extension."},
(...skipping 5592 matching lines...) Expand 10 before | Expand all | Expand 10 after
5665 } 5662 }
5666 } 5663 }
5667 } 5664 }
5668 ] 5665 ]
5669 } 5666 }
5670 ] 5667 ]
5671 } 5668 }
5672 ] 5669 ]
5673 }, 5670 },
5674 { 5671 {
5675 "namespace": "experimental.contentSettings.global", 5672 "namespace": "experimental.contentSettings",
5673 "types": [
5674 {
5675 "id": "ResourceIdentifier",
5676 "type": "object",
5677 "properties": {
5678 "id": {
5679 "type": "string",
5680 "description": "The resource identifier for the given content type."
5681 },
5682 "description": {
5683 "type": "string",
5684 "description": "A human readable description of the resource."
5685 }
5686 },
5687 "description": "Currently, no content types use resource identifiers."
5688 },
5689 {
5690 "id": "Pattern",
5691 "type": "object",
5692 "properties": {
5693 "pattern": {
5694 "type": "string",
5695 "description": "The pattern string. The pattern should never be cons tructed directly, but should always be derived from an URL using the methods in the <var>contentSettings.patterns</var> module."
5696 }
5697 }
5698 },
5699 {
5700 "id": "ContentSettingRule",
5701 "type": "object",
5702 "properties": {
5703 "topLevelPattern": {
5704 "$ref": "Pattern",
5705 "description": "The pattern for the top-level frame URL."
5706 },
5707 "embeddedPattern": {
5708 "$ref": "Pattern",
5709 "description": "The pattern for the frame or object URL."
5710 },
5711 "resourceIdentifier": {
5712 "$ref": "ResourceIdentifier",
5713 "optional": true,
5714 "description": "The resource identifier for the content type."
5715 },
5716 "setting": {
5717 "type": "any",
5718 "description": "The setting applied by this rule. See the descriptio n of the individual ContentSetting objects for the possible values."
5719 }
5720 }
5721 },
5722 {
5723 "id": "ContentSetting",
5724 "type": "object",
5725 "functions": [
5726 {
5727 "name": "clear",
5728 "type": "function",
5729 "description": "Clear all content setting rules set by this extensio n.",
5730 "parameters": [
5731 {
5732 "name": "details",
5733 "type": "object",
5734 "properties": {
5735 "scope": {
5736 "type": "string",
5737 "enum": ["regular", "incognito_session_only"],
5738 "optional": true,
5739 "description": "Where to set the setting (default: regular). One of<br><var>regular</var>: setting for regular profile (which is inherited b y the incognito profile if not overridden elsewhere),<br><var>incognito_session_ only</var>: setting for incognito profile that can only be set during an incogni to session and is deleted when the incognito session ends (overrides regular set tings)."
5740 }
5741 }
5742 },
5743 {
5744 "type": "function",
5745 "name": "callback",
5746 "optional": true,
5747 "parameters": []
5748 }
5749 ]
5750 },
5751 {
5752 "name": "get",
5753 "type": "function",
5754 "description": "Get the current content setting for a given pair of URLs.",
5755 "parameters": [
5756 {
5757 "name": "details",
5758 "type": "object",
5759 "properties": {
5760 "embeddedUrl": {
5761 "type": "string",
5762 "description": "The URL of the frame or object for which the content settings should be retrieved."
5763 },
5764 "topLevelUrl": {
5765 "type": "string",
5766 "description": "The URL of the top-level frame."
5767 },
5768 "resourceIdentifier": {
5769 "$ref": "ResourceIdentifier",
5770 "optional": true,
5771 "description": "A more specific identifier of the type of co ntent for which the settings should be retrieved."
5772 },
5773 "incognito": {
5774 "type": "boolean",
5775 "optional": true,
5776 "description": "Whether to check the content settings for an incognito session. (default false)"
5777 }
5778 }
5779 },
5780 {
5781 "type": "function",
5782 "name": "callback",
5783 "parameters": [
5784 {
5785 "name": "details",
5786 "type": "object",
5787 "properties": {
5788 "setting": {
5789 "type": "any",
5790 "description": "The content setting. See the description of the individual ContentSetting objects for the possible values."
5791 }
5792 }
5793 }
5794 ]
5795 }
5796 ]
5797 },
5798 {
5799 "name": "set",
5800 "type": "function",
5801 "description": "Apply a new content setting rule.",
5802 "parameters": [
5803 {
5804 "name": "details",
5805 "type": "object",
5806 "properties": {
5807 "topLevelPattern": {
5808 "$ref": "Pattern",
5809 "description": "The pattern for the top-level frame URL."
5810 },
5811 "embeddedPattern": {
5812 "$ref": "Pattern",
5813 "description": "The pattern for the frame or object URL."
5814 },
5815 "resourceIdentifier": {
5816 "$ref": "ResourceIdentifier",
5817 "optional": true,
5818 "description": "The resource identifier for the content type ."
5819 },
5820 "setting": {
5821 "type": "any",
5822 "description": "The setting applied by this rule. See the de scription of the individual ContentSetting objects for the possible values."
5823 },
5824 "scope": {
5825 "type": "string",
5826 "enum": ["regular", "incognito_session_only"],
5827 "optional": true,
5828 "description": "Where to clear the setting (default: regular ). One of<br><var>regular</var>: setting for regular profile (which is inherited by the incognito profile if not overridden elsewhere),<br><var>incognito_sessio n_only</var>: setting for incognito profile that can only be set during an incog nito session and is deleted when the incognito session ends (overrides regular s ettings)."
5829 }
5830 }
5831 },
5832 {
5833 "type": "function",
5834 "name": "callback",
5835 "optional": true,
5836 "parameters": []
5837 }
5838 ]
5839 }
5840 ]
5841 }
5842 ],
5676 "properties": { 5843 "properties": {
5677 "thirdPartyCookiesAllowed": { 5844 "global": {
Matt Perry 2011/06/08 19:30:18 Grouping these settings this way feels weird to me
Bernhard Bauer 2011/06/09 13:57:49 I think that having them at the top level would be
Matt Perry 2011/06/09 20:57:54 I'm not convinced that having a different interfac
5678 "$ref": "ChromeSetting", 5845 "type": "object",
5679 "value": ["thirdPartyCookiesAllowed", {"type": "boolean"}], 5846 "value": {},
5680 "description": "Whether third party cookies should be allowed. The value of this preference is of type boolean, and the default value is true." 5847 "properties": {
5681 }, 5848 "thirdPartyCookiesAllowed": {
5682 "referrersEnabled": { 5849 "$ref": "ChromeSetting",
5683 "$ref": "ChromeSetting", 5850 "value": ["thirdPartyCookiesAllowed", {"type": "boolean"}],
5684 "value": ["referrersEnabled", {"type":"boolean"}], 5851 "description": "Whether third party cookies should be allowed. The v alue of this preference is of type boolean, and the default value is true."
5685 "description": "Whether referrers should be enabled. The value of this p reference is of type boolean, and the default value is true." 5852 },
5686 }, 5853 "referrersEnabled": {
5687 "hyperlinkAuditingEnabled": { 5854 "$ref": "ChromeSetting",
5688 "$ref": "ChromeSetting", 5855 "value": ["referrersEnabled", {"type":"boolean"}],
5689 "value": ["hyperlinkAuditingEnabled", {"type":"boolean"}], 5856 "description": "Whether referrers should be enabled. The value of th is preference is of type boolean, and the default value is true."
5690 "description": "Whether to enable hyperlink auditing (\"&lt;a ping&gt;\" ). The value of this preference is of type boolean, and the default value is tru e." 5857 },
5858 "hyperlinkAuditingEnabled": {
5859 "$ref": "ChromeSetting",
5860 "value": ["hyperlinkAuditingEnabled", {"type":"boolean"}],
5861 "description": "Whether to enable hyperlink auditing (\"&lt;a ping&g t;\"). The value of this preference is of type boolean, and the default value is true."
5862 }
5863 }
5864 },
5865 "cookies": {
5866 "$ref": "ContentSetting",
5867 "description": "Whether to allow cookies and other local data to be set by websites. One of<br><var>allow</var>: Accept cookies,<br><var>block</var>: Bl ock cookies,<br><var>session_only</var>: Accept cookies only for the current ses sion. Default is <var>allow</var>.",
5868 "value": [
5869 "cookies",
5870 {"type":"string", "enum": ["allow", "block", "session_only"]}
5871 ]
5872 },
5873 "images": {
5874 "$ref": "ContentSetting",
5875 "description": "Whether to show images. One of<br><var>allow</var>: Show images,<br><var>block</var>: Don't show images. Default is <var>allow</var>.",
5876 "value": [
5877 "images",
5878 {"type":"string", "enum": ["allow", "block"]}
5879 ]
5880 },
5881 "javascript": {
5882 "$ref": "ContentSetting",
5883 "description": "Whether to run Javascript. One of<br><var>allow</var>: R un Javascript,<br><var>block</var>: Don't run Javascript. Default is <var>allow< /var>.",
5884 "value": [
5885 "javascript",
5886 {"type":"string", "enum": ["allow", "block"]}
5887 ]
5888 },
5889 "plugins": {
5890 "$ref": "ContentSetting",
5891 "description": "Whether to run plug-ins. One of<br><var>allow</var>: Run plug-ins automatically,<br><var>block</var>: Don't run plug-ins automatically. Default is <var>allow</var>.",
5892 "value": [
5893 "plugins",
5894 {"type":"string", "enum": ["allow", "block"]}
5895 ]
5896 },
5897 "popups": {
5898 "$ref": "ContentSetting",
5899 "description": "Whether to allow sites to show pop-ups. One of<br><var>a llow</var>: Allow sites to show pop-ups,<br><var>block</var>: Don't allow sites to show pop-ups. Default is <var>block</var>.",
5900 "value": [
5901 "popups",
5902 {"type":"string", "enum": ["allow", "block"]}
5903 ]
5904 },
5905 "notifications": {
5906 "$ref": "ContentSetting",
5907 "description": "Whether to allow sites to show desktop notifications. On e of<br><var>allow</var>: Allow sites to show desktop notifications,<br><var>blo ck</var>: Don't allow sites to show desktop notifications,<br><var>ask</var>: As k when a site wants to show desktop notifications. Default is <var>ask</var>.",
5908 "value": [
5909 "notifications",
5910 {"type":"string", "enum": ["allow", "block", "ask"]}
5911 ]
5691 } 5912 }
5692 } 5913 }
5693 }, 5914 },
5694 { 5915 {
5695 "namespace": "experimental.debugger", 5916 "namespace": "experimental.debugger",
5696 "functions": [ 5917 "functions": [
5697 { 5918 {
5698 "name": "attach", 5919 "name": "attach",
5699 "type": "function", 5920 "type": "function",
5700 "description": "Attaches debugger to the tab with given id.", 5921 "description": "Attaches debugger to the tab with given id.",
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
5808 { 6029 {
5809 "type": "integer", 6030 "type": "integer",
5810 "name": "tabId", 6031 "name": "tabId",
5811 "description": "The id of the tab that was detached." 6032 "description": "The id of the tab that was detached."
5812 } 6033 }
5813 ] 6034 ]
5814 } 6035 }
5815 ] 6036 ]
5816 } 6037 }
5817 ] 6038 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698