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

Unified Diff: chrome/browser/resources/bookmark_manager/js/main.js

Issue 10544021: Disable the new window context menu option in the bookmarks extension for Windows 8 metro mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/bookmark_manager/js/main.js
===================================================================
--- chrome/browser/resources/bookmark_manager/js/main.js (revision 140583)
+++ chrome/browser/resources/bookmark_manager/js/main.js (working copy)
@@ -852,6 +852,14 @@
});
/**
+ * New Windows are not allowed in Windows 8 metro mode.
+ */
+var canOpenNewWindows = true;
+chrome.experimental.bookmarkManager.canOpenNewWindows(function (result) {
Aaron Boodman 2012/06/06 01:46:26 nit: remove space after 'n'.
ananta 2012/06/06 01:52:22 Done.
+ canOpenNewWindows = result;
+});
+
+/**
* Helper function that updates the canExecute and labels for the open-like
* commands.
* @param {!cr.ui.CanExecuteEvent} e The event fired by the command system.
@@ -891,7 +899,8 @@
command.label = loadTimeData.getString(multiple ?
'open_all_new_window' : 'open_in_new_window');
// Disabled when incognito is forced.
- commandDisabled = incognitoModeAvailability == 'forced';
+ commandDisabled = incognitoModeAvailability == 'forced' ||
+ !canOpenNewWindows;
break;
case 'open-incognito-window-command':
command.label = loadTimeData.getString(multiple ?

Powered by Google App Engine
This is Rietveld 408576698