| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_ | |
| 6 #define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/strings/string16.h" | |
| 13 | |
| 14 namespace metro_viewer { | |
| 15 struct UnderlineInfo; | |
| 16 } | |
| 17 | |
| 18 namespace metro_driver { | |
| 19 | |
| 20 // A delegate which works together with virtual text service. | |
| 21 // Objects that implement this delegate will receive notifications from a | |
| 22 // virtual text service whenever an IME updates the composition or commits text. | |
| 23 class TextServiceDelegate { | |
| 24 public: | |
| 25 virtual ~TextServiceDelegate() {} | |
| 26 | |
| 27 // Called when on-going composition is updated. An empty |text| represents | |
| 28 // that the composition is canceled. | |
| 29 virtual void OnCompositionChanged( | |
| 30 const base::string16& text, | |
| 31 int32_t selection_start, | |
| 32 int32_t selection_end, | |
| 33 const std::vector<metro_viewer::UnderlineInfo>& underlines) = 0; | |
| 34 | |
| 35 // Called when |text| is committed. | |
| 36 virtual void OnTextCommitted(const base::string16& text) = 0; | |
| 37 }; | |
| 38 | |
| 39 } // namespace metro_driver | |
| 40 | |
| 41 #endif // WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_ | |
| OLD | NEW |