Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: ash/system/ime/ime_util.h

Issue 2917683003: chromeos: Remove the last IME methods from ash::SystemTrayDelegate (Closed)
Patch Set: cleanup Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/BUILD.gn ('k') | ash/system/ime/ime_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ash/BUILD.gn ('k') | ash/system/ime/ime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698