diff options
author | ericdingle@chromium.org <ericdingle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-08 20:41:30 +0000 |
---|---|---|
committer | ericdingle@chromium.org <ericdingle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-08 20:41:30 +0000 |
commit | a45e222bbda8c1da5517868e119821522618f5e3 (patch) | |
tree | d66d5abe96bf96d4021fbf30b44b73272104807e /chrome_frame | |
parent | e1fe3dafdb3fd61b6fbcff576cb625dcef2a71c2 (diff) | |
download | chromium_src-a45e222bbda8c1da5517868e119821522618f5e3.zip chromium_src-a45e222bbda8c1da5517868e119821522618f5e3.tar.gz chromium_src-a45e222bbda8c1da5517868e119821522618f5e3.tar.bz2 |
Disable the 'About Chrome Frame' option in the context menu for the NPAPI plugin.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3614014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_frame_npapi.cc | 10 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_npapi.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_npapi.cc b/chrome_frame/chrome_frame_npapi.cc index 3524335..a4079ca 100644 --- a/chrome_frame/chrome_frame_npapi.cc +++ b/chrome_frame/chrome_frame_npapi.cc @@ -1440,6 +1440,16 @@ bool ChromeFrameNPAPI::GetBrowserIncognitoMode() { return incognito_mode; } +bool ChromeFrameNPAPI::PreProcessContextMenu(HMENU menu) { + // TODO: Remove this overridden method once HandleContextMenuCommand + // implements "About Chrome Frame" handling. + if (!is_privileged_) { + // Call base class (adds 'About' item). + return ChromeFramePlugin::PreProcessContextMenu(menu); + } + return true; +} + bool ChromeFrameNPAPI::HandleContextMenuCommand(UINT cmd, const IPC::ContextMenuParams& params) { if (cmd == IDC_ABOUT_CHROME_FRAME) { diff --git a/chrome_frame/chrome_frame_npapi.h b/chrome_frame/chrome_frame_npapi.h index 994b178..45ee1b9 100644 --- a/chrome_frame/chrome_frame_npapi.h +++ b/chrome_frame/chrome_frame_npapi.h @@ -126,6 +126,7 @@ END_MSG_MAP() // Initialize string->identifier mapping, public to allow unittesting. static void InitializeIdentifiers(); + bool PreProcessContextMenu(HMENU menu); bool HandleContextMenuCommand(UINT cmd, const IPC::ContextMenuParams& params); protected: // Handler for accelerator messages passed on from the hosted chrome |