summaryrefslogtreecommitdiffstats
path: root/chrome/browser/wrench_menu_model.cc
diff options
context:
space:
mode:
authoraltimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-09 19:12:03 +0000
committeraltimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-09 19:12:03 +0000
commit81cacede51c21fef6dddc4bccba0d6baba9c5822 (patch)
treeaf2d56921773545676bcb8eb568b30435fe280cd /chrome/browser/wrench_menu_model.cc
parentea1771720662c3fdcf8a26c4d99fd3ce57fc0415 (diff)
downloadchromium_src-81cacede51c21fef6dddc4bccba0d6baba9c5822.zip
chromium_src-81cacede51c21fef6dddc4bccba0d6baba9c5822.tar.gz
chromium_src-81cacede51c21fef6dddc4bccba0d6baba9c5822.tar.bz2
Disallows opening non-incognito windows in BWSI mode. Also disables 'New window' menu item, but not the shortkey - 'CTRL+N' opens new incognito window.
BUG=chromium-os:6025 TEST=Start BWSI session. Note that only incognito windows could be opened. Review URL: http://codereview.chromium.org/3235011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/wrench_menu_model.cc')
-rw-r--r--chrome/browser/wrench_menu_model.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/wrench_menu_model.cc b/chrome/browser/wrench_menu_model.cc
index abea856..7dd2697 100644
--- a/chrome/browser/wrench_menu_model.cc
+++ b/chrome/browser/wrench_menu_model.cc
@@ -240,6 +240,14 @@ bool WrenchMenuModel::IsCommandIdChecked(int command_id) const {
}
bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const {
+#if defined(OS_CHROMEOS)
+ // Special case because IDC_NEW_WINDOW item should be disabled in BWSI mode,
+ // but accelerator should work.
+ if (command_id == IDC_NEW_WINDOW &&
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kBWSI))
+ return false;
+#endif
+
return browser_->command_updater()->IsCommandEnabled(command_id);
}