| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
| 6 | 6 |
| 7 #undef FocusIn | 7 #undef FocusIn |
| 8 #undef FocusOut | 8 #undef FocusOut |
| 9 #undef RootWindow | 9 #undef RootWindow |
| 10 #include <map> | 10 #include <map> |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 ash::ime::InputMethodMenuManager::GetInstance()-> | 463 ash::ime::InputMethodMenuManager::GetInstance()-> |
| 464 SetCurrentInputMethodMenuItemList( | 464 SetCurrentInputMethodMenuItemList( |
| 465 menu_item_list); | 465 menu_item_list); |
| 466 return true; | 466 return true; |
| 467 } | 467 } |
| 468 | 468 |
| 469 bool InputMethodEngine::IsActive() const { | 469 bool InputMethodEngine::IsActive() const { |
| 470 return active_; | 470 return active_; |
| 471 } | 471 } |
| 472 | 472 |
| 473 void InputMethodEngine::KeyEventDone(input_method::KeyEventHandle* key_data, | |
| 474 bool handled) { | |
| 475 KeyEventDoneCallback* callback = | |
| 476 reinterpret_cast<KeyEventDoneCallback*>(key_data); | |
| 477 callback->Run(handled); | |
| 478 delete callback; | |
| 479 } | |
| 480 | |
| 481 bool InputMethodEngine::DeleteSurroundingText(int context_id, | 473 bool InputMethodEngine::DeleteSurroundingText(int context_id, |
| 482 int offset, | 474 int offset, |
| 483 size_t number_of_chars, | 475 size_t number_of_chars, |
| 484 std::string* error) { | 476 std::string* error) { |
| 485 if (!active_) { | 477 if (!active_) { |
| 486 *error = kErrorNotActive; | 478 *error = kErrorNotActive; |
| 487 return false; | 479 return false; |
| 488 } | 480 } |
| 489 if (context_id != context_id_ || context_id_ == -1) { | 481 if (context_id != context_id_ || context_id_ == -1) { |
| 490 *error = kErrorWrongContext; | 482 *error = kErrorWrongContext; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 // TODO(nona): Implement it. | 671 // TODO(nona): Implement it. |
| 680 break; | 672 break; |
| 681 } | 673 } |
| 682 } | 674 } |
| 683 } | 675 } |
| 684 | 676 |
| 685 // TODO(nona): Support item.children. | 677 // TODO(nona): Support item.children. |
| 686 } | 678 } |
| 687 | 679 |
| 688 } // namespace chromeos | 680 } // namespace chromeos |
| OLD | NEW |