diff options
author | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 13:39:32 +0000 |
---|---|---|
committer | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 13:39:32 +0000 |
commit | b53a66fc26c6a767a97c09788b372eb833ab88e5 (patch) | |
tree | d53a51016732676d869c0d4e1d6a7e571e09f75d /chromeos/ime/extension_ime_util.h | |
parent | 5e9573126be354491cf82218db72a6ed48508bd8 (diff) | |
download | chromium_src-b53a66fc26c6a767a97c09788b372eb833ab88e5.zip chromium_src-b53a66fc26c6a767a97c09788b372eb833ab88e5.tar.gz chromium_src-b53a66fc26c6a767a97c09788b372eb833ab88e5.tar.bz2 |
Use ExtensionTabUtil::OpenOptionsPage to open IME option page.
window.open() was used to open the option page of IME extensions.
But this method can open more than one tab of the option page.
This cl change to use ExtensionTabUtil::OpenOptionsPage() to open the option
page.
In this change, ComponentExtensionIMEManager::IsComponentExtensionIMEId is moved
to extension_ime_util::IsComponentExtensionIME.
BUG=238968
TEST=ran unit_tests and chromeos_unittests and manually checked on alex
Review URL: https://codereview.chromium.org/70973004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/ime/extension_ime_util.h')
-rw-r--r-- | chromeos/ime/extension_ime_util.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/chromeos/ime/extension_ime_util.h b/chromeos/ime/extension_ime_util.h index f439ec4..446e59e 100644 --- a/chromeos/ime/extension_ime_util.h +++ b/chromeos/ime/extension_ime_util.h @@ -14,19 +14,41 @@ namespace chromeos { // Extension IME related utilities. namespace extension_ime_util { -// Returns InputMethodID for |engine_id| in |extension_id|. +// Returns InputMethodID for |engine_id| in |extension_id| of extension IME. +// This function does not check |extension_id| is installed extension IME nor +// |engine_id| is really a member of |extension_id|. std::string CHROMEOS_EXPORT GetInputMethodID(const std::string& extension_id, const std::string& engine_id); -// Returns true if the |input_method_id| is extension ime. +// Returns InputMethodID for |engine_id| in |extension_id| of component +// extension IME, This function does not check |extension_id| is component one +// nor |engine_id| is really a member of |extension_id|. +std::string CHROMEOS_EXPORT GetComponentInputMethodID( + const std::string& extension_id, + const std::string& engine_id); + +// Returns extension ID if |input_method_id| is extension IME ID or component +// extension IME ID. Otherwise returns an empty string (""). +std::string CHROMEOS_EXPORT GetExtensionIDFromInputMethodID( + const std::string& input_method_id); + +// Returns true if |input_method_id| is extension IME ID. This function does not +// check |input_method_id| is installed extension IME. bool CHROMEOS_EXPORT IsExtensionIME(const std::string& input_method_id); -// Returns true if the |input_method| is member of |extension_id|, otherwise -// return false. +// Returns true if |input_method_id| is component extension IME ID. This +// function does not check |input_method_id| is really whitelisted one or not. +// If you want to check |input_method_id| is whitelisted component extension +// IME, please use ComponentExtensionIMEManager::IsWhitelisted instead. +bool CHROMEOS_EXPORT IsComponentExtensionIME( + const std::string& input_method_id); + +// Returns true if the |input_method| is a member of |extension_id| of extension +// IME, otherwise returns false. bool CHROMEOS_EXPORT IsMemberOfExtension(const std::string& input_method_id, const std::string& extension_id); -} // extension_ime_util +} // namespace extension_ime_util } // namespace chromeos |