summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 14:23:07 +0000
committermarkusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 14:23:07 +0000
commitd2169c618ea09a65c6044064972a87bd4cd9d04b (patch)
tree75520aaeb5f23b8cc6487d4a69371d6ea63deec9
parent5668b097b89d73b1ca01c6c305588b35740e7b69 (diff)
downloadchromium_src-d2169c618ea09a65c6044064972a87bd4cd9d04b.zip
chromium_src-d2169c618ea09a65c6044064972a87bd4cd9d04b.tar.gz
chromium_src-d2169c618ea09a65c6044064972a87bd4cd9d04b.tar.bz2
Disable right-click print-menu by policy.
CL contributed by sfeuz. BUG=79849 TEST=Manually set the policy. Review URL: http://codereview.chromium.org/6883043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82102 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index e78a35e..dcf613e 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -1033,8 +1033,13 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
return !params_.misspelled_word.empty();
case IDC_PRINT:
+ if (g_browser_process->local_state() &&
+ !g_browser_process->local_state()->GetBoolean(
+ prefs::kPrintingEnabled)) {
+ return false;
+ }
return params_.media_type == WebContextMenuData::MediaTypeNone ||
- params_.media_flags & WebContextMenuData::MediaCanPrint;
+ params_.media_flags & WebContextMenuData::MediaCanPrint;
case IDC_CONTENT_CONTEXT_SEARCHWEBFOR:
case IDC_CONTENT_CONTEXT_GOTOURL: