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

Side by Side Diff: ui/base/accelerators/accelerator.h

Issue 2761523002: Remove comparing PlatformAccelerator from operator== for Accelerator (Closed)
Patch Set: done Created 3 years, 9 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
« no previous file with comments | « no previous file | ui/base/accelerators/accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This class describe a keyboard accelerator (or keyboard shortcut). 5 // This class describe a keyboard accelerator (or keyboard shortcut).
6 // Keyboard accelerators are registered with the FocusManager. 6 // Keyboard accelerators are registered with the FocusManager.
7 // It has a copy constructor and assignment operator so that it can be copied. 7 // It has a copy constructor and assignment operator so that it can be copied.
8 // It also defines the < operator so that it can be used as a key in a std::map. 8 // It also defines the < operator so that it can be used as a key in a std::map.
9 // 9 //
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 private: 90 private:
91 // The keycode (VK_...). 91 // The keycode (VK_...).
92 KeyboardCode key_code_; 92 KeyboardCode key_code_;
93 93
94 KeyState key_state_; 94 KeyState key_state_;
95 95
96 // The state of the Shift/Ctrl/Alt keys. This corresponds to Event::flags(). 96 // The state of the Shift/Ctrl/Alt keys. This corresponds to Event::flags().
97 int modifiers_; 97 int modifiers_;
98 98
99 // Stores platform specific data. May be NULL. 99 // Stores platform specific data. May be NULL.
100 // TODO: this is only used in Mac code and should be removed from here.
101 // http://crbug.com/702823.
100 std::unique_ptr<PlatformAccelerator> platform_accelerator_; 102 std::unique_ptr<PlatformAccelerator> platform_accelerator_;
101 }; 103 };
102 104
103 // An interface that classes that want to register for keyboard accelerators 105 // An interface that classes that want to register for keyboard accelerators
104 // should implement. 106 // should implement.
105 class UI_BASE_EXPORT AcceleratorTarget { 107 class UI_BASE_EXPORT AcceleratorTarget {
106 public: 108 public:
107 // Should return true if the accelerator was processed. 109 // Should return true if the accelerator was processed.
108 virtual bool AcceleratorPressed(const Accelerator& accelerator) = 0; 110 virtual bool AcceleratorPressed(const Accelerator& accelerator) = 0;
109 111
(...skipping 16 matching lines...) Expand all
126 virtual bool GetAcceleratorForCommandId(int command_id, 128 virtual bool GetAcceleratorForCommandId(int command_id,
127 Accelerator* accelerator) const = 0; 129 Accelerator* accelerator) const = 0;
128 130
129 protected: 131 protected:
130 virtual ~AcceleratorProvider() {} 132 virtual ~AcceleratorProvider() {}
131 }; 133 };
132 134
133 } // namespace ui 135 } // namespace ui
134 136
135 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_H_ 137 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/accelerators/accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698