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

Side by Side Diff: app/menus/accelerator.h

Issue 3163023: Clean up the WrenchMenuModel so that it uses SimpleMenu::Delegate. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fix stray rb Created 10 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef APP_MENUS_ACCELERATOR_H_ 5 #ifndef APP_MENUS_ACCELERATOR_H_
6 #define APP_MENUS_ACCELERATOR_H_ 6 #define APP_MENUS_ACCELERATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/keyboard_codes.h" 9 #include "base/keyboard_codes.h"
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 protected: 63 protected:
64 // The keycode (VK_...). 64 // The keycode (VK_...).
65 base::KeyboardCode key_code_; 65 base::KeyboardCode key_code_;
66 66
67 // The state of the Shift/Ctrl/Alt keys (platform-dependent). 67 // The state of the Shift/Ctrl/Alt keys (platform-dependent).
68 int modifiers_; 68 int modifiers_;
69 }; 69 };
70 70
71 // Since acclerator code is one of the few things that can't be cross platform
72 // in the chrome UI, separate out just the GetAcceleratorForCommandId() from
73 // the menu delegates.
74 class AcceleratorProvider {
75 public:
76 // Gets the accelerator for the specified command id. Returns true if the
77 // command id has a valid accelerator, false otherwise.
78 virtual bool GetAcceleratorForCommandId(
79 int command_id,
80 menus::Accelerator* accelerator) = 0;
81 };
sky 2010/08/23 21:55:59 virtual protected destructor?
82
71 } 83 }
72 84
73 #endif // APP_MENUS_ACCELERATOR_H_ 85 #endif // APP_MENUS_ACCELERATOR_H_
74 86
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/toolbar_controller.h » ('j') | chrome/browser/cocoa/toolbar_controller.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698