| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/input_method/input_method_engine_ibus.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_engine_ibus.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 return true; | 214 return true; |
| 215 } | 215 } |
| 216 | 216 |
| 217 void InputMethodEngineIBus::SetCandidateWindowCursorVisible(bool visible) { | 217 void InputMethodEngineIBus::SetCandidateWindowCursorVisible(bool visible) { |
| 218 table_->set_is_cursor_visible(visible); | 218 table_->set_is_cursor_visible(visible); |
| 219 if (active_) | 219 if (active_) |
| 220 GetCurrentService()->UpdateLookupTable(*table_.get(), window_visible_); | 220 GetCurrentService()->UpdateLookupTable(*table_.get(), window_visible_); |
| 221 } | 221 } |
| 222 | 222 |
| 223 void InputMethodEngineIBus::SetCandidateWindowVertical(bool vertical) { | 223 void InputMethodEngineIBus::SetCandidateWindowVertical(bool vertical) { |
| 224 table_->set_orientation( | 224 table_->set_orientation(vertical ? ibus::IBusLookupTable::VERTICAL : |
| 225 vertical ? ibus::IBusLookupTable::IBUS_LOOKUP_TABLE_ORIENTATION_VERTICAL : | 225 ibus::IBusLookupTable::HORIZONTAL); |
| 226 ibus::IBusLookupTable::IBUS_LOOKUP_TABLE_ORIENTATION_HORIZONTAL); | |
| 227 if (active_) | 226 if (active_) |
| 228 GetCurrentService()->UpdateLookupTable(*table_.get(), window_visible_); | 227 GetCurrentService()->UpdateLookupTable(*table_.get(), window_visible_); |
| 229 } | 228 } |
| 230 | 229 |
| 231 void InputMethodEngineIBus::SetCandidateWindowPageSize(int size) { | 230 void InputMethodEngineIBus::SetCandidateWindowPageSize(int size) { |
| 232 table_->set_page_size(size); | 231 table_->set_page_size(size); |
| 233 if (active_) | 232 if (active_) |
| 234 GetCurrentService()->UpdateLookupTable(*table_.get(), window_visible_); | 233 GetCurrentService()->UpdateLookupTable(*table_.get(), window_visible_); |
| 235 } | 234 } |
| 236 | 235 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 DBusThreadManager::Get()->RemoveIBusEngineService(object_path_); | 574 DBusThreadManager::Get()->RemoveIBusEngineService(object_path_); |
| 576 | 575 |
| 577 current_object_path_++; | 576 current_object_path_++; |
| 578 object_path_ = dbus::ObjectPath(kObjectPathPrefix + | 577 object_path_ = dbus::ObjectPath(kObjectPathPrefix + |
| 579 base::IntToString(current_object_path_)); | 578 base::IntToString(current_object_path_)); |
| 580 GetCurrentService()->SetEngine(this); | 579 GetCurrentService()->SetEngine(this); |
| 581 sender.Run(object_path_); | 580 sender.Run(object_path_); |
| 582 } | 581 } |
| 583 | 582 |
| 584 } // namespace chromeos | 583 } // namespace chromeos |
| OLD | NEW |