OLD | NEW |
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 CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "cros/chromeos_keyboard.h" | |
10 | |
11 #include <string> | 9 #include <string> |
12 | 10 |
13 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "third_party/cros/chromeos_keyboard.h" |
14 | 13 |
15 namespace chromeos { | 14 namespace chromeos { |
16 | 15 |
17 // This class handles the interaction with the ChromeOS keyboard library APIs. | 16 // This class handles the interaction with the ChromeOS keyboard library APIs. |
18 class KeyboardLibrary { | 17 class KeyboardLibrary { |
19 public: | 18 public: |
20 virtual ~KeyboardLibrary() {} | 19 virtual ~KeyboardLibrary() {} |
21 | 20 |
22 // Returns the hardware layout name like "xkb:us::eng". On error, returns "". | 21 // Returns the hardware layout name like "xkb:us::eng". On error, returns "". |
23 virtual std::string GetHardwareKeyboardLayoutName() const = 0; | 22 virtual std::string GetHardwareKeyboardLayoutName() const = 0; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) = 0; | 57 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) = 0; |
59 | 58 |
60 // Factory function, creates a new instance and returns ownership. | 59 // Factory function, creates a new instance and returns ownership. |
61 // For normal usage, access the singleton via CrosLibrary::Get(). | 60 // For normal usage, access the singleton via CrosLibrary::Get(). |
62 static KeyboardLibrary* GetImpl(bool stub); | 61 static KeyboardLibrary* GetImpl(bool stub); |
63 }; | 62 }; |
64 | 63 |
65 } // namespace chromeos | 64 } // namespace chromeos |
66 | 65 |
67 #endif // CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ | 66 #endif // CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ |
OLD | NEW |