diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-12 22:42:32 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-12 22:42:32 +0000 |
commit | 166e304a282a07b8262f63fe53eee8da76a45a48 (patch) | |
tree | 7866b3e701c4740786efe721815fe4406228887e /chrome/browser/wrench_menu_model.cc | |
parent | b332f93fc5d50a96a57200a3fde009d23fbd3e30 (diff) | |
download | chromium_src-166e304a282a07b8262f63fe53eee8da76a45a48.zip chromium_src-166e304a282a07b8262f63fe53eee8da76a45a48.tar.gz chromium_src-166e304a282a07b8262f63fe53eee8da76a45a48.tar.bz2 |
Add a private pepper API for the pdf plugin to disable copy/print etc. This is needed because pdf documents might disallow copying/printing and it's confusing to have an enabled menu item which does nothing.
BUG=47364
Review URL: http://codereview.chromium.org/3692007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62345 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/wrench_menu_model.cc')
-rw-r--r-- | chrome/browser/wrench_menu_model.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/wrench_menu_model.cc b/chrome/browser/wrench_menu_model.cc index 61045a5..8a6b5ae 100644 --- a/chrome/browser/wrench_menu_model.cc +++ b/chrome/browser/wrench_menu_model.cc @@ -246,6 +246,10 @@ bool WrenchMenuModel::IsCommandIdChecked(int command_id) const { } bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const { + TabContents* selected_tab = browser_->GetSelectedTabContents(); + if (selected_tab && selected_tab->IsCommandDisabled(command_id)) + return false; + #if defined(OS_CHROMEOS) // Special case because IDC_NEW_WINDOW item should be disabled in BWSI mode, // but accelerator should work. |