Index: chrome/browser/chromeos/input_method/input_method_manager.cc |
diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc |
index a54d195bcc68fc14ae0d871ee8951c2e0c767296..36a1d078ac7e0bc1abcfccfa1bb8e2f6ed642691 100644 |
--- a/chrome/browser/chromeos/input_method/input_method_manager.cc |
+++ b/chrome/browser/chromeos/input_method/input_method_manager.cc |
@@ -147,7 +147,7 @@ class InputMethodManagerImpl |
shutting_down_(false), |
ibus_daemon_process_handle_(base::kNullProcessHandle), |
util_(ibus_controller_->GetSupportedInputMethods()), |
- xkeyboard_(util_) { |
+ xkeyboard_(XKeyboard::Create(util_)) { |
// Observe APP_TERMINATING to stop input method daemon gracefully. |
// We should not use APP_EXITING here since logout might be canceled by |
// JavaScript after APP_EXITING is sent (crosbug.com/11055). |
@@ -522,7 +522,7 @@ class InputMethodManagerImpl |
} |
virtual XKeyboard* GetXKeyboard() { |
- return &xkeyboard_; |
+ return xkeyboard_.get(); |
} |
virtual HotkeyManager* GetHotkeyManager() { |
@@ -950,7 +950,7 @@ class InputMethodManagerImpl |
current_input_method_ = new_input_method; |
// Change the keyboard layout to a preferred layout for the input method. |
- if (!xkeyboard_.SetCurrentKeyboardLayoutByName( |
+ if (!xkeyboard_->SetCurrentKeyboardLayoutByName( |
current_input_method_.keyboard_layout())) { |
LOG(ERROR) << "Failed to change keyboard layout to " |
<< current_input_method_.keyboard_layout(); |
@@ -1415,7 +1415,7 @@ class InputMethodManagerImpl |
// An object for switching XKB layouts and keyboard status like caps lock and |
// auto-repeat interval. |
- XKeyboard xkeyboard_; |
+ scoped_ptr<XKeyboard> xkeyboard_; |
// An object which detects Control+space and Shift+Alt key presses. |
HotkeyManager hotkey_manager_; |