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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_engine.cc

Issue 821233003: Revert of Add support for deleting non preceeding surrounding text in chrome.input.ime.deleteSurroundingText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/base/ime/input_method_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 std::string* error) { 491 std::string* error) {
492 if (!IsActive()) { 492 if (!IsActive()) {
493 *error = kErrorNotActive; 493 *error = kErrorNotActive;
494 return false; 494 return false;
495 } 495 }
496 if (context_id != context_id_ || context_id_ == -1) { 496 if (context_id != context_id_ || context_id_ == -1) {
497 *error = kErrorWrongContext; 497 *error = kErrorWrongContext;
498 return false; 498 return false;
499 } 499 }
500 500
501 if (offset < 0 && static_cast<size_t>(-1 * offset) != size_t(number_of_chars))
502 return false; // Currently we can only support preceding text.
503
501 // TODO(nona): Return false if there is ongoing composition. 504 // TODO(nona): Return false if there is ongoing composition.
502 505
503 IMEInputContextHandlerInterface* input_context = 506 IMEInputContextHandlerInterface* input_context =
504 IMEBridge::Get()->GetInputContextHandler(); 507 IMEBridge::Get()->GetInputContextHandler();
505 if (input_context) 508 if (input_context)
506 input_context->DeleteSurroundingText(offset, number_of_chars); 509 input_context->DeleteSurroundingText(offset, number_of_chars);
507 510
508 return true; 511 return true;
509 } 512 }
510 513
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 // TODO(nona): Implement it. 703 // TODO(nona): Implement it.
701 break; 704 break;
702 } 705 }
703 } 706 }
704 } 707 }
705 708
706 // TODO(nona): Support item.children. 709 // TODO(nona): Support item.children.
707 } 710 }
708 711
709 } // namespace chromeos 712 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | ui/base/ime/input_method_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698