Skip to content

Commit

Permalink
Disable the 'About Chrome Frame' option in the context menu for the N…
Browse files Browse the repository at this point in the history
…PAPI 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
  • Loading branch information
ericdingle@chromium.org committed Oct 8, 2010
1 parent e1fe3da commit a45e222
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chrome_frame/chrome_frame_npapi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions chrome_frame/chrome_frame_npapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a45e222

Please sign in to comment.