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

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: rebase 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/xkeyboard.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e11e861196f140488fd02cead0795c2f9ad01b2d 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager.cc
@@ -11,6 +11,7 @@
#include "unicode/uloc.h"
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/message_loop.h"
#include "base/process_util.h"
@@ -147,7 +148,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 +523,7 @@ class InputMethodManagerImpl
}
virtual XKeyboard* GetXKeyboard() {
- return &xkeyboard_;
+ return xkeyboard_.get();
}
virtual HotkeyManager* GetHotkeyManager() {
@@ -950,7 +951,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 +1416,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698