summaryrefslogtreecommitdiffstats
path: root/chrome/views/chrome_menu.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-22 22:23:43 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-22 22:23:43 +0000
commit20ea3526d1b851a5594d7d05a472e83757df034d (patch)
tree4a22d472d541abccbd27242b4c94d45de1fdc366 /chrome/views/chrome_menu.h
parent393c02e5a411707d7a5e15432ce7328386292f5a (diff)
downloadchromium_src-20ea3526d1b851a5594d7d05a472e83757df034d.zip
chromium_src-20ea3526d1b851a5594d7d05a472e83757df034d.tar.gz
chromium_src-20ea3526d1b851a5594d7d05a472e83757df034d.tar.bz2
I'm going to try and land this again. This is exactly the same change as you reviewed earlier.
Fixes mnemonic bug in chrome menus. After this change you can indicate whether menus have mnemonics. Mnemonics are shown if the menus have mnemonics, and the OS says we should show them. BUG=1355952 TEST=add a bookmark and change the title to &foo. Move the bookmark to a folder, click on the folder and make sure the title shows the &. Review URL: http://codereview.chromium.org/4021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/chrome_menu.h')
-rw-r--r--chrome/views/chrome_menu.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/views/chrome_menu.h b/chrome/views/chrome_menu.h
index 05cce11..b192c9c 100644
--- a/chrome/views/chrome_menu.h
+++ b/chrome/views/chrome_menu.h
@@ -238,11 +238,13 @@ class MenuItemView : public View {
virtual ~MenuItemView();
// Run methods. See description above class for details. Both Run methods take
- // a rectangle, which is used to position the menu.
+ // a rectangle, which is used to position the menu. |has_mnemonics| indicates
+ // whether the items have mnemonics. Mnemonics are identified by way of the
+ // character following the '&'.
void RunMenuAt(HWND parent,
const gfx::Rect& bounds,
AnchorPosition anchor,
- bool show_mnemonics);
+ bool has_mnemonics);
void RunMenuForDropAt(HWND parent,
const gfx::Rect& bounds,
AnchorPosition anchor);
@@ -397,7 +399,7 @@ class MenuItemView : public View {
// The RunXXX methods call into this to set up the necessary state before
// running.
- void PrepareForRun(bool show_mnemonics);
+ void PrepareForRun(bool has_mnemonics);
// Returns the flags passed to DrawStringInt.
int GetDrawStringFlags();
@@ -459,8 +461,8 @@ class MenuItemView : public View {
// Icon.
SkBitmap icon_;
- // Whether mnemonics should be shown.
- bool show_mnemonics_;
+ // Does the title have a mnemonic?
+ bool has_mnemonics_;
DISALLOW_EVIL_CONSTRUCTORS(MenuItemView);
};