Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / win8 / metro_driver / ime / text_service_delegate.h
blob9b22a8238ec628880b1ea1c969263845e469ebb4
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.
5 #ifndef WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_
6 #define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "base/strings/string16.h"
13 namespace metro_viewer {
14 struct UnderlineInfo;
17 namespace metro_driver {
19 // A delegate which works together with virtual text service.
20 // Objects that implement this delegate will receive notifications from a
21 // virtual text service whenever an IME updates the composition or commits text.
22 class TextServiceDelegate {
23 public:
24 virtual ~TextServiceDelegate() {}
26 // Called when on-going composition is updated. An empty |text| represents
27 // that the composition is canceled.
28 virtual void OnCompositionChanged(
29 const base::string16& text,
30 int32 selection_start,
31 int32 selection_end,
32 const std::vector<metro_viewer::UnderlineInfo>& underlines) = 0;
34 // Called when |text| is committed.
35 virtual void OnTextCommitted(const base::string16& text) = 0;
38 } // namespace metro_driver
40 #endif // WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_