Commit c539f091 authored by yusukes@google.com's avatar yusukes@google.com

Deprecate Get/SetKeyboardLayoutPerWindow APIs (Chrome part).

BUG=chromium-os:11101
TEST=ran emerge & try.

Review URL: http://codereview.chromium.org/6243009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71943 0039d316-1c4b-4281-b951-d872f2087c98
parent deb326d2
...@@ -210,14 +210,6 @@ void CrosMock::SetKeyboardLibraryStatusAreaExpectations() { ...@@ -210,14 +210,6 @@ void CrosMock::SetKeyboardLibraryStatusAreaExpectations() {
.Times(AnyNumber()) .Times(AnyNumber())
.WillRepeatedly((Return(true))) .WillRepeatedly((Return(true)))
.RetiresOnSaturation(); .RetiresOnSaturation();
EXPECT_CALL(*mock_keyboard_library_, SetKeyboardLayoutPerWindow(_))
.Times(AnyNumber())
.WillRepeatedly((Return(true)))
.RetiresOnSaturation();
EXPECT_CALL(*mock_keyboard_library_, GetKeyboardLayoutPerWindow(_))
.Times(AnyNumber())
.WillRepeatedly((Return(true)))
.RetiresOnSaturation();
EXPECT_CALL(*mock_keyboard_library_, GetAutoRepeatEnabled(_)) EXPECT_CALL(*mock_keyboard_library_, GetAutoRepeatEnabled(_))
.Times(AnyNumber()) .Times(AnyNumber())
.WillRepeatedly((Return(true))) .WillRepeatedly((Return(true)))
......
...@@ -42,20 +42,6 @@ class KeyboardLibraryImpl : public KeyboardLibrary { ...@@ -42,20 +42,6 @@ class KeyboardLibraryImpl : public KeyboardLibrary {
return false; return false;
} }
bool GetKeyboardLayoutPerWindow(bool* is_per_window) const {
if (CrosLibrary::Get()->EnsureLoaded()) {
return chromeos::GetKeyboardLayoutPerWindow(is_per_window);
}
return false;
}
bool SetKeyboardLayoutPerWindow(bool is_per_window) {
if (CrosLibrary::Get()->EnsureLoaded()) {
return chromeos::SetKeyboardLayoutPerWindow(is_per_window);
}
return false;
}
bool GetAutoRepeatEnabled(bool* enabled) const { bool GetAutoRepeatEnabled(bool* enabled) const {
if (CrosLibrary::Get()->EnsureLoaded()) { if (CrosLibrary::Get()->EnsureLoaded()) {
return chromeos::GetAutoRepeatEnabled(enabled); return chromeos::GetAutoRepeatEnabled(enabled);
...@@ -109,14 +95,6 @@ class KeyboardLibraryStubImpl : public KeyboardLibrary { ...@@ -109,14 +95,6 @@ class KeyboardLibraryStubImpl : public KeyboardLibrary {
return false; return false;
} }
bool GetKeyboardLayoutPerWindow(bool* is_per_window) const {
return false;
}
bool SetKeyboardLayoutPerWindow(bool is_per_window) {
return false;
}
bool GetAutoRepeatEnabled(bool* enabled) const { bool GetAutoRepeatEnabled(bool* enabled) const {
return false; return false;
} }
......
...@@ -32,15 +32,6 @@ class KeyboardLibrary { ...@@ -32,15 +32,6 @@ class KeyboardLibrary {
// Remaps modifier keys. Returns true on success. // Remaps modifier keys. Returns true on success.
virtual bool RemapModifierKeys(const ModifierMap& modifier_map) = 0; virtual bool RemapModifierKeys(const ModifierMap& modifier_map) = 0;
// Gets whehter we have separate keyboard layout per window, or not. The
// result is stored in |is_per_window|. Returns true on success.
virtual bool GetKeyboardLayoutPerWindow(bool* is_per_window) const = 0;
// Sets whether we have separate keyboard layout per window, or not. If false
// is given, the same keyboard layout will be shared for all applications.
// Returns true on success.
virtual bool SetKeyboardLayoutPerWindow(bool is_per_window) = 0;
// Gets the current auto-repeat mode of the keyboard. The result is stored in // Gets the current auto-repeat mode of the keyboard. The result is stored in
// |enabled|. Returns true on success. // |enabled|. Returns true on success.
virtual bool GetAutoRepeatEnabled(bool* enabled) const = 0; virtual bool GetAutoRepeatEnabled(bool* enabled) const = 0;
......
...@@ -22,8 +22,6 @@ class MockKeyboardLibrary : public KeyboardLibrary { ...@@ -22,8 +22,6 @@ class MockKeyboardLibrary : public KeyboardLibrary {
MOCK_CONST_METHOD0(GetCurrentKeyboardLayoutName, std::string(void)); MOCK_CONST_METHOD0(GetCurrentKeyboardLayoutName, std::string(void));
MOCK_METHOD1(SetCurrentKeyboardLayoutByName, bool(const std::string&)); MOCK_METHOD1(SetCurrentKeyboardLayoutByName, bool(const std::string&));
MOCK_METHOD1(RemapModifierKeys, bool(const ModifierMap&)); MOCK_METHOD1(RemapModifierKeys, bool(const ModifierMap&));
MOCK_CONST_METHOD1(GetKeyboardLayoutPerWindow, bool(bool*));
MOCK_METHOD1(SetKeyboardLayoutPerWindow, bool(bool));
MOCK_CONST_METHOD1(GetAutoRepeatEnabled, bool(bool*)); MOCK_CONST_METHOD1(GetAutoRepeatEnabled, bool(bool*));
MOCK_METHOD1(SetAutoRepeatEnabled, bool(bool)); MOCK_METHOD1(SetAutoRepeatEnabled, bool(bool));
MOCK_CONST_METHOD1(GetAutoRepeatRate, bool(AutoRepeatRate*)); MOCK_CONST_METHOD1(GetAutoRepeatRate, bool(AutoRepeatRate*));
......
...@@ -136,9 +136,6 @@ InputMethodMenu::InputMethodMenu(PrefService* pref_service, ...@@ -136,9 +136,6 @@ InputMethodMenu::InputMethodMenu(PrefService* pref_service,
DCHECK(input_method_descriptors_.get() && DCHECK(input_method_descriptors_.get() &&
!input_method_descriptors_->empty()); !input_method_descriptors_->empty());
// Use the same keyboard layout on all windows.
CrosLibrary::Get()->GetKeyboardLibrary()->SetKeyboardLayoutPerWindow(false);
// Sync current and previous input methods on Chrome prefs with ibus-daemon. // Sync current and previous input methods on Chrome prefs with ibus-daemon.
// InputMethodChanged() will be called soon and the indicator will be updated. // InputMethodChanged() will be called soon and the indicator will be updated.
InputMethodLibrary* library = CrosLibrary::Get()->GetInputMethodLibrary(); InputMethodLibrary* library = CrosLibrary::Get()->GetInputMethodLibrary();
......
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