OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "ui/base/models/accelerator_cocoa.h" | 5 #include "ui/base/accelerators/accelerator_cocoa.h" |
6 | 6 |
7 namespace ui { | 7 namespace ui { |
8 | 8 |
9 AcceleratorCocoa::AcceleratorCocoa() : Accelerator() {} | 9 AcceleratorCocoa::AcceleratorCocoa() : Accelerator() {} |
10 | 10 |
11 AcceleratorCocoa::AcceleratorCocoa(NSString* key_code, NSUInteger mask) | 11 AcceleratorCocoa::AcceleratorCocoa(NSString* key_code, NSUInteger mask) |
12 : Accelerator(ui::VKEY_UNKNOWN, mask), | 12 : Accelerator(ui::VKEY_UNKNOWN, mask), |
13 characters_([key_code copy]) { | 13 characters_([key_code copy]) { |
14 } | 14 } |
15 | 15 |
(...skipping 16 matching lines...) Expand all Loading... |
32 bool AcceleratorCocoa::operator==(const AcceleratorCocoa& rhs) const { | 32 bool AcceleratorCocoa::operator==(const AcceleratorCocoa& rhs) const { |
33 return [characters_ isEqualToString:rhs.characters_.get()] && | 33 return [characters_ isEqualToString:rhs.characters_.get()] && |
34 (modifiers_ == rhs.modifiers_); | 34 (modifiers_ == rhs.modifiers_); |
35 } | 35 } |
36 | 36 |
37 bool AcceleratorCocoa::operator!=(const AcceleratorCocoa& rhs) const { | 37 bool AcceleratorCocoa::operator!=(const AcceleratorCocoa& rhs) const { |
38 return !(*this == rhs); | 38 return !(*this == rhs); |
39 } | 39 } |
40 | 40 |
41 } // namespace ui | 41 } // namespace ui |
OLD | NEW |