summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 22:10:50 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 22:10:50 +0000
commitdb7331aecb1f0c01aecf4cd4627d08a8d5b08bc2 (patch)
tree5a33fc21cb1628462f9e365add27aeaf058d60fc /chrome/common
parentf56abff188b90b7f2d67a094930d7d9407df507d (diff)
downloadchromium_src-db7331aecb1f0c01aecf4cd4627d08a8d5b08bc2.zip
chromium_src-db7331aecb1f0c01aecf4cd4627d08a8d5b08bc2.tar.gz
chromium_src-db7331aecb1f0c01aecf4cd4627d08a8d5b08bc2.tar.bz2
Allow users to enable extensions in incognito. Requires
--enable-experimental-extension-apis . The UI needs work. Tab and window events are hooked up so that they work with incognito tabs/windows when enabled. BUG=32365 BUG=36292 Review URL: http://codereview.chromium.org/657041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rwxr-xr-xchrome/common/extensions/api/extension_api.json14
-rw-r--r--chrome/common/notification_type.h4
-rw-r--r--chrome/common/render_messages_internal.h6
3 files changed, 22 insertions, 2 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index a347888..58894e4 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -424,7 +424,8 @@
"left": {"type": "integer", "description": "The offset of the window from the left edge of the screen in pixels."},
"width": {"type": "integer", "description": "The width of the window in pixels."},
"height": {"type": "integer", "description": "The height of the window in pixels."},
- "tabs": {"type": "array", "items": { "$ref": "Tab" }, "optional": true, "description": "Array of <a href='tabs.html#type-Tab'>Tab</a> objects representing the current tabs in the window."}
+ "tabs": {"type": "array", "items": { "$ref": "Tab" }, "optional": true, "description": "Array of <a href='tabs.html#type-Tab'>Tab</a> objects representing the current tabs in the window."},
+ "incognito": {"type": "boolean", "description": "Whether the window is incognito."}
}
}
],
@@ -615,7 +616,8 @@
"url": {"type": "string", "description": "The URL the tab is displaying."},
"title": {"type": "string", "optional": true, "description": "The title of the tab. This may not be available if the tab is loading."},
"favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This may not be available if the tab is loading."},
- "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."}
+ "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."},
+ "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}
}
}
],
@@ -2287,6 +2289,14 @@
"parameters": [
{"type": "string", "name": "message"}
]
+ },
+ {
+ "name": "createIncognitoTab",
+ "type": "function",
+ "description": "Creates an incognito tab during internal testing. Succeeds even if the extension is not enabled in incognito mode.",
+ "parameters": [
+ {"type": "string", "name": "url"}
+ ]
}
],
"events": []
diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h
index ef3c0f9..2abe637 100644
--- a/chrome/common/notification_type.h
+++ b/chrome/common/notification_type.h
@@ -677,6 +677,10 @@ class NotificationType {
// details are an Extension*, and the source is a Profile*.
EXTENSION_UPDATE_DISABLED,
+ // Sent when an extension has been enabled/disabled in incognito. The
+ // details are std::pair<Extension*, bool>, and the source is a Profile.
+ EXTENSION_INCOGNITO_CHANGED,
+
// Sent when an extension is about to be installed so we can (in the case of
// themes) alert the user with a loading dialog. The source is the download
// manager and the details are the download url.
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 608716c..be83c9a8 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -722,6 +722,12 @@ IPC_BEGIN_MESSAGES(View)
GURL /* source extension's origin */,
std::vector<URLPattern> /* URLPatterns the extension can access */)
+ // Tell the renderer process that the given extension is enabled or disabled
+ // for incognito mode.
+ IPC_MESSAGE_CONTROL2(ViewMsg_Extension_ExtensionSetIncognitoEnabled,
+ std::string /* extension_id */,
+ bool /* enabled */)
+
// Tell the renderer process all known page action ids for a particular
// extension.
IPC_MESSAGE_CONTROL2(ViewMsg_Extension_UpdatePageActions,