summaryrefslogtreecommitdiffstats
path: root/app/menus
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-17 15:22:11 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-17 15:22:11 +0000
commit312b5121aadac921a3039111d1350d0594369fb1 (patch)
treeff82f92acfcac900ed3a3c48ad6dcf6e686b9573 /app/menus
parent3e2bca105c2254e5d387103ad940eb7a3ac56b27 (diff)
downloadchromium_src-312b5121aadac921a3039111d1350d0594369fb1.zip
chromium_src-312b5121aadac921a3039111d1350d0594369fb1.tar.gz
chromium_src-312b5121aadac921a3039111d1350d0594369fb1.tar.bz2
Tweaks for the merged menu:
. makes the menu show the same fonts regardless of whether the item has children. . adds text color to MenuConfig. I'm going to use this for the buttons added to the menu. . Changes TextButton to update text_size_ when the font changes. . Changes TextButton to allow you to specify how accelerators are shown. . Nukes TextButton::OnMousePressed as it's not needed (super implementation does the right thing and updates state the TextButton::OnMousePressed wasn't). . Changes accelerator to have constructor taking keycode and modifiers. BUG=45734 TEST=none Review URL: http://codereview.chromium.org/2833013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/menus')
-rw-r--r--app/menus/accelerator.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/app/menus/accelerator.h b/app/menus/accelerator.h
index 1d659a4..0cb6279 100644
--- a/app/menus/accelerator.h
+++ b/app/menus/accelerator.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -14,13 +14,19 @@ namespace menus {
class Accelerator {
public:
- Accelerator() : key_code_(base::VKEY_UNKNOWN), modifiers_(0) { }
- virtual ~Accelerator() { }
+ Accelerator() : key_code_(base::VKEY_UNKNOWN), modifiers_(0) {}
+
+ Accelerator(base::KeyboardCode keycode, int modifiers)
+ : key_code_(keycode),
+ modifiers_(modifiers) {}
+
Accelerator(const Accelerator& accelerator) {
key_code_ = accelerator.key_code_;
modifiers_ = accelerator.modifiers_;
}
+ virtual ~Accelerator() {}
+
Accelerator& operator=(const Accelerator& accelerator) {
if (this != &accelerator) {
key_code_ = accelerator.key_code_;
@@ -54,7 +60,7 @@ class Accelerator {
}
protected:
- // The window keycode (VK_...).
+ // The keycode (VK_...).
base::KeyboardCode key_code_;
// The state of the Shift/Ctrl/Alt keys (platform-dependent).