| OLD | NEW |
| 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 #include "ui/base/accelerators/accelerator.h" | 5 #include "ui/base/accelerators/accelerator.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | |
| 8 #include <windows.h> | |
| 9 #endif | |
| 10 | |
| 11 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 12 #include "base/logging.h" | 8 #include "base/logging.h" |
| 13 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 15 | 11 |
| 16 #if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_MACOSX)) | 12 #if defined(USE_AURA) |
| 17 #include "ui/events/keycodes/keyboard_code_conversion.h" | 13 #include "ui/events/keycodes/keyboard_code_conversion.h" |
| 18 #endif | 14 #endif |
| 19 | 15 |
| 20 namespace ui { | 16 namespace ui { |
| 21 | 17 |
| 22 Accelerator::Accelerator() | 18 Accelerator::Accelerator() |
| 23 : key_code_(ui::VKEY_UNKNOWN), | 19 : key_code_(ui::VKEY_UNKNOWN), |
| 24 type_(ui::ET_KEY_PRESSED), | 20 type_(ui::ET_KEY_PRESSED), |
| 25 modifiers_(0), | 21 modifiers_(0), |
| 26 is_repeat_(false) { | 22 is_repeat_(false) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 93 |
| 98 bool Accelerator::IsCmdDown() const { | 94 bool Accelerator::IsCmdDown() const { |
| 99 return (modifiers_ & EF_COMMAND_DOWN) != 0; | 95 return (modifiers_ & EF_COMMAND_DOWN) != 0; |
| 100 } | 96 } |
| 101 | 97 |
| 102 bool Accelerator::IsRepeat() const { | 98 bool Accelerator::IsRepeat() const { |
| 103 return is_repeat_; | 99 return is_repeat_; |
| 104 } | 100 } |
| 105 | 101 |
| 106 } // namespace ui | 102 } // namespace ui |
| OLD | NEW |