summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 19:54:41 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 19:54:41 +0000
commitcb0ce1e02b7d16ab9024da9335ab7c70c493aa4e (patch)
tree1665a8f8d944aa85938154cbf2fefa5797c226aa /chrome/browser/resources
parent17496bbed312152a6a0c2251c88ccefd70849540 (diff)
downloadchromium_src-cb0ce1e02b7d16ab9024da9335ab7c70c493aa4e.zip
chromium_src-cb0ce1e02b7d16ab9024da9335ab7c70c493aa4e.tar.gz
chromium_src-cb0ce1e02b7d16ab9024da9335ab7c70c493aa4e.tar.bz2
Bookmark manager: Open in incognito window.
Make IsIncognitoEnabled take an Extension* as an argument as well and use that where possible. BUG=4890 TEST=Select one more bookmarks and right click/tools and select "Open in incognito". The bookmarks should open in an incognito window. Review URL: http://codereview.chromium.org/750001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/bookmark_manager/main.html18
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome/browser/resources/bookmark_manager/main.html b/chrome/browser/resources/bookmark_manager/main.html
index b36b6c03..46d3251 100644
--- a/chrome/browser/resources/bookmark_manager/main.html
+++ b/chrome/browser/resources/bookmark_manager/main.html
@@ -1339,13 +1339,19 @@ function openUrls(urls, kind) {
return url[0] == '#' ? base + url : url;
});
- // Incognito mode is not yet supported by the extensions APIs.
- // http://code.google.com/p/chromium/issues/detail?id=12658
- if (kind == 'window') {
- chrome.windows.create({url: urls[0]}, function(window) {
+ var incognito = kind == 'incognito';
+ if (kind == 'window' || incognito) {
+ chrome.windows.create({
+ url: urls[0],
+ incognito: incognito
+ }, function(window) {
urls.forEach(function(url, i) {
if (i > 0)
- chrome.tabs.create({url: url, windowId: window.id, selected: false});
+ chrome.tabs.create({
+ url: url,
+ windowId: window.id,
+ selected: false
+ });
});
});
} else if (kind == 'tab') {
@@ -1497,7 +1503,7 @@ function handleCommand(e) {
case 'open-in-new-window-command':
openBookmarks('window');
break;
- case 'open-in-new-incognito-command':
+ case 'open-incognito-window-command':
openBookmarks('incognito');
break;
case 'delete-command':