Commit 54c78704 authored by nona@chromium.org's avatar nona@chromium.org

Remove |third_party| from InputMethodDescriptor.

All third party input method is provided as Extension IME, thus we don't need to use additional field, just check with |id|.

BUG=None
TEST=Confirmed still asterisk is shown for extension IME as the indicator of third party IME.

Review URL: https://chromiumcodereview.appspot.com/14070014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195252 0039d316-1c4b-4281-b951-d872f2087c98
parent 7326c8bd
......@@ -394,7 +394,7 @@ void InputMethodManagerImpl::AddInputMethodExtension(
// TODO(nona): Support options page for normal extension ime.
// crbug.com/156283.
extra_input_methods_[id] =
InputMethodDescriptor(id, name, layout, language, "", true);
InputMethodDescriptor(id, name, layout, language, "");
if (!Contains(filtered_extension_imes_, id) &&
!ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) {
if (!Contains(active_input_method_ids_, id)) {
......
......@@ -624,8 +624,7 @@ InputMethodDescriptor InputMethodUtil::GetFallbackInputMethodDescriptor() {
"",
"us",
"en-US",
"", // options page, not available.
false);
""); // options page, not available.
}
void InputMethodUtil::ReloadInternalMaps() {
......
......@@ -56,8 +56,7 @@ class InputMethodUtilTest : public testing::Test {
"",
raw_layout,
language_code,
"", // options page url
false);
""); // options page url
}
static string16 GetDisplayLanguageName(const std::string& language_code) {
......
......@@ -118,8 +118,7 @@ InputMethodDescriptor MockInputMethodManager::GetCurrentInputMethod() const {
descriptor.name(),
descriptor.keyboard_layout(),
descriptor.language_code(),
"", // options page url.
false);
""); // options page url.
}
return descriptor;
}
......
......@@ -90,6 +90,7 @@
#include "chromeos/dbus/power_manager_client.h"
#include "chromeos/dbus/session_manager_client.h"
#include "chromeos/dbus/system_clock_client.h"
#include "chromeos/ime/extension_ime_util.h"
#include "chromeos/ime/xkeyboard.h"
#include "chromeos/login/login_state.h"
#include "content/public/browser/browser_thread.h"
......@@ -141,7 +142,7 @@ void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime,
info->name = util.GetInputMethodLongName(ime);
info->medium_name = util.GetInputMethodMediumName(ime);
info->short_name = util.GetInputMethodShortName(ime);
info->third_party = ime.third_party();
info->third_party = extension_ime_util::IsExtensionIME(ime.id());
}
gfx::NativeWindow GetNativeWindowByStatus(
......
......@@ -47,8 +47,7 @@ class CrosLanguageOptionsHandlerTest : public testing::Test {
"", // name
raw_layout,
language_code,
"", // options page url
false);
""); // options page url
}
};
......
......@@ -145,8 +145,7 @@ input_method::InputMethodDescriptors
component_extension_imes_[i].engines[j].display_name,
component_extension_imes_[i].engines[j].layout,
component_extension_imes_[i].engines[j].language_code,
component_extension_imes_[i].options_page_url,
false));
component_extension_imes_[i].options_page_url));
}
}
return result;
......
......@@ -17,17 +17,15 @@ InputMethodDescriptor::InputMethodDescriptor(
const std::string& name,
const std::string& keyboard_layout,
const std::string& language_code,
const std::string& options_page_url,
bool third_party)
const std::string& options_page_url)
: id_(id),
name_(name),
keyboard_layout_(keyboard_layout),
language_code_(language_code),
options_page_url_(options_page_url),
third_party_(third_party) {
options_page_url_(options_page_url) {
}
InputMethodDescriptor::InputMethodDescriptor() : third_party_(false) {
InputMethodDescriptor::InputMethodDescriptor() {
}
InputMethodDescriptor::~InputMethodDescriptor() {
......
......@@ -24,8 +24,7 @@ class CHROMEOS_EXPORT InputMethodDescriptor {
const std::string& name,
const std::string& keyboard_layout,
const std::string& language_code,
const std::string& options_page_url,
bool third_party);
const std::string& options_page_url);
~InputMethodDescriptor();
bool operator==(const InputMethodDescriptor& other) const;
......@@ -36,7 +35,6 @@ class CHROMEOS_EXPORT InputMethodDescriptor {
const std::string& keyboard_layout() const { return keyboard_layout_; }
const std::string& language_code() const { return language_code_; }
const std::string& options_page_url() const { return options_page_url_; }
bool third_party() const { return third_party_; }
private:
// An ID that identifies an input method engine (e.g., "t:latn-post",
......@@ -55,8 +53,6 @@ class CHROMEOS_EXPORT InputMethodDescriptor {
// We can't use GURL here due to dependency policy. This field is valid only
// for input method extension.
std::string options_page_url_;
// Indicates if this is a third party ime
bool third_party_;
};
typedef std::vector<InputMethodDescriptor> InputMethodDescriptors;
......
......@@ -24,8 +24,7 @@ class InputMethodDescriptorTest : public testing::Test {
"", // name
"us",
"language_code",
"",
false);
"");
}
};
......
......@@ -36,8 +36,8 @@ InputMethodWhitelist::GetSupportedInputMethods() const {
"",
kInputMethods[i].xkb_layout_id,
kInputMethods[i].language_code,
"", // options page url, not available for non-extension input method.
false));
"")); // options page url, not available for non-extension input
// method.
}
return input_methods.Pass();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment