| Index: ash/system/ime/ime_util.h
|
| diff --git a/ash/system/ime/ime_util.h b/ash/system/ime/ime_util.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..75463ae7bad8b0f8327f9a2897f363649b5a21b7
|
| --- /dev/null
|
| +++ b/ash/system/ime/ime_util.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef ASH_SYSTEM_IME_IME_UTIL_H_
|
| +#define ASH_SYSTEM_IME_IME_UTIL_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "ash/ash_export.h"
|
| +#include "base/macros.h"
|
| +
|
| +namespace ash {
|
| +
|
| +struct IMEInfo;
|
| +struct IMEPropertyInfo;
|
| +
|
| +namespace ime_util {
|
| +
|
| +// Returns the currently selected IME.
|
| +IMEInfo GetCurrentIME();
|
| +
|
| +// Returns a list of availble IMEs.
|
| +std::vector<IMEInfo> GetAvailableIMEList();
|
| +
|
| +// Returns a list of properties for the currently selected IME.
|
| +std::vector<IMEPropertyInfo> GetCurrentIMEProperties();
|
| +
|
| +// Sets the return value of GetCurrentIME().
|
| +class ASH_EXPORT ScopedCurrentImeForTesting {
|
| + public:
|
| + explicit ScopedCurrentImeForTesting(IMEInfo* info);
|
| + ~ScopedCurrentImeForTesting();
|
| +
|
| + private:
|
| + IMEInfo* const last_info_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScopedCurrentImeForTesting);
|
| +};
|
| +
|
| +// Sets the return value of GetAvailableIMEList().
|
| +class ASH_EXPORT ScopedAvailableImeListForTesting {
|
| + public:
|
| + explicit ScopedAvailableImeListForTesting(std::vector<IMEInfo>* list);
|
| + ~ScopedAvailableImeListForTesting();
|
| +
|
| + private:
|
| + std::vector<IMEInfo>* const last_list_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScopedAvailableImeListForTesting);
|
| +};
|
| +
|
| +} // namespace ime_util
|
| +} // namespace ash
|
| +
|
| +#endif // ASH_SYSTEM_IME_IME_UTIL_H_
|
|
|