| 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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/ref_counted.h" | |
| 12 | |
| 13 namespace base { | |
| 14 class SequencedTaskRunner; | |
| 15 } // namespace base | |
| 16 | 11 |
| 17 namespace chromeos { | 12 namespace chromeos { |
| 18 namespace input_method { | 13 namespace input_method { |
| 19 | 14 |
| 20 // Provides access to read/persist Input Method-related properties. | 15 // Provides access to read/persist Input Method-related properties. |
| 21 class InputMethodDelegate { | 16 class InputMethodDelegate { |
| 22 public: | 17 public: |
| 23 InputMethodDelegate() {} | 18 InputMethodDelegate() {} |
| 24 virtual ~InputMethodDelegate() {} | 19 virtual ~InputMethodDelegate() {} |
| 25 | 20 |
| 26 // Retrieves the hardware keyboard layout ID. May return an empty string if | 21 // Retrieves the hardware keyboard layout ID. May return an empty string if |
| 27 // the ID is unknown. | 22 // the ID is unknown. |
| 28 virtual std::string GetHardwareKeyboardLayout() const = 0; | 23 virtual std::string GetHardwareKeyboardLayout() const = 0; |
| 29 // Retrieves the currently active UI locale. | 24 // Retrieves the currently active UI locale. |
| 30 virtual std::string GetActiveLocale() const = 0; | 25 virtual std::string GetActiveLocale() const = 0; |
| 31 // Retrieves the default task runner. The public input_method API should only | |
| 32 // be accessed in the context of this task runner. | |
| 33 virtual scoped_refptr<base::SequencedTaskRunner> | |
| 34 GetDefaultTaskRunner() const = 0; | |
| 35 // Retrieves a task runner that may be used for possibly blocking tasks such | |
| 36 // as file IO. | |
| 37 virtual scoped_refptr<base::SequencedTaskRunner> | |
| 38 GetWorkerTaskRunner() const = 0; | |
| 39 | 26 |
| 40 private: | 27 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(InputMethodDelegate); | 28 DISALLOW_COPY_AND_ASSIGN(InputMethodDelegate); |
| 42 }; | 29 }; |
| 43 | 30 |
| 44 } // namespace input_method | 31 } // namespace input_method |
| 45 } // namespace chromeos | 32 } // namespace chromeos |
| 46 | 33 |
| 47 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_DELEGATE_H_ | 34 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_DELEGATE_H_ |
| OLD | NEW |