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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager.cc

Issue 9264004: Make almost all public functions in XKeyboard pure virtual (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
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_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/xkeyboard.h » ('j') | chrome/browser/chromeos/input_method/xkeyboard.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698