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

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

Issue 50243005: ChromeOS: Remove unused IBus classes from chromeos/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « chrome/browser/chromeos/input_method/input_method_engine_ibus.h ('k') | chromeos/chromeos.gyp » ('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_engine_ibus.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc b/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
index bd7d4f21c7c47d50cb2f9d545a1eb0953f173546..1804a100856ad55f9b34ac244a6d56cf83cc54d6 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
@@ -54,6 +54,7 @@ InputMethodEngineIBus::InputMethodEngineIBus()
candidate_window_(new input_method::CandidateWindow()),
window_visible_(false),
weak_ptr_factory_(this) {
+ ibus_engine_factory_service_.reset(IBusEngineFactoryService::Create());
satorux1 2013/11/05 03:37:55 do this in the initializer list? ibus_engine_f
pneubeck (no reviews) 2013/11/06 09:07:56 Done.
}
InputMethodEngineIBus::~InputMethodEngineIBus() {
@@ -65,7 +66,7 @@ InputMethodEngineIBus::~InputMethodEngineIBus() {
// InputMethodManager once ibus-daemon is gone. (crbug.com/158273)
if (!object_path_.value().empty()) {
GetCurrentService()->UnsetEngine(this);
- DBusThreadManager::Get()->RemoveIBusEngineService(object_path_);
+ ibus_engine_service_.reset();
}
}
@@ -527,7 +528,9 @@ void InputMethodEngineIBus::SetSurroundingText(const std::string& text,
}
IBusEngineService* InputMethodEngineIBus::GetCurrentService() {
- return DBusThreadManager::Get()->GetIBusEngineService(object_path_);
+ if (!ibus_engine_service_)
+ ibus_engine_service_.reset(IBusEngineService::Create());
+ return ibus_engine_service_.get();
}
void InputMethodEngineIBus::MenuItemToProperty(
@@ -593,11 +596,10 @@ void InputMethodEngineIBus::RegisterComponent() {
}
void InputMethodEngineIBus::OnComponentRegistered() {
- DBusThreadManager::Get()->GetIBusEngineFactoryService()->
- SetCreateEngineHandler(ibus_id_,
- base::Bind(
- &InputMethodEngineIBus::CreateEngineHandler,
- weak_ptr_factory_.GetWeakPtr()));
+ ibus_engine_factory_service_->SetCreateEngineHandler(
+ ibus_id_,
+ base::Bind(&InputMethodEngineIBus::CreateEngineHandler,
+ weak_ptr_factory_.GetWeakPtr()));
}
void InputMethodEngineIBus::OnComponentRegistrationFailed() {
@@ -608,10 +610,8 @@ void InputMethodEngineIBus::OnComponentRegistrationFailed() {
void InputMethodEngineIBus::CreateEngineHandler(
const IBusEngineFactoryService::CreateEngineResponseSender& sender) {
GetCurrentService()->UnsetEngine(this);
- DBusThreadManager::Get()->RemoveIBusEngineService(object_path_);
-
- object_path_ = DBusThreadManager::Get()->GetIBusEngineFactoryService()->
- GenerateUniqueObjectPath();
+ ibus_engine_service_.reset();
+ object_path_ = ibus_engine_factory_service_->GenerateUniqueObjectPath();
GetCurrentService()->SetEngine(this);
sender.Run(object_path_);
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_engine_ibus.h ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698