Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: app/menus/accelerator.h

Issue 2833013: Tweaks for the merged menu: (Closed)
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/accelerator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/menus/accelerator.h
diff --git a/app/menus/accelerator.h b/app/menus/accelerator.h
index 1d659a40848cad963a7c0086265f6ad11265d365..0cb62793970aad79d3dbe1ffd4d9fd30bedb8228 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).
« no previous file with comments | « no previous file | views/accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698