OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_SYSTEM_IME_IME_UTIL_H_ |
| 6 #define ASH_SYSTEM_IME_IME_UTIL_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "ash/ash_export.h" |
| 11 #include "base/macros.h" |
| 12 |
| 13 namespace ash { |
| 14 |
| 15 struct IMEInfo; |
| 16 struct IMEPropertyInfo; |
| 17 |
| 18 namespace ime_util { |
| 19 |
| 20 // Returns the currently selected IME. |
| 21 IMEInfo GetCurrentIME(); |
| 22 |
| 23 // Returns a list of availble IMEs. |
| 24 std::vector<IMEInfo> GetAvailableIMEList(); |
| 25 |
| 26 // Returns a list of properties for the currently selected IME. |
| 27 std::vector<IMEPropertyInfo> GetCurrentIMEProperties(); |
| 28 |
| 29 // Sets the return value of GetCurrentIME(). |
| 30 class ASH_EXPORT ScopedCurrentImeForTesting { |
| 31 public: |
| 32 explicit ScopedCurrentImeForTesting(IMEInfo* info); |
| 33 ~ScopedCurrentImeForTesting(); |
| 34 |
| 35 private: |
| 36 IMEInfo* const last_info_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentImeForTesting); |
| 39 }; |
| 40 |
| 41 // Sets the return value of GetAvailableIMEList(). |
| 42 class ASH_EXPORT ScopedAvailableImeListForTesting { |
| 43 public: |
| 44 explicit ScopedAvailableImeListForTesting(std::vector<IMEInfo>* list); |
| 45 ~ScopedAvailableImeListForTesting(); |
| 46 |
| 47 private: |
| 48 std::vector<IMEInfo>* const last_list_; |
| 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(ScopedAvailableImeListForTesting); |
| 51 }; |
| 52 |
| 53 } // namespace ime_util |
| 54 } // namespace ash |
| 55 |
| 56 #endif // ASH_SYSTEM_IME_IME_UTIL_H_ |
OLD | NEW |