Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / base / ime / remote_input_method_delegate_win.h
blobb65d8c354c2279cbc6745c483987765e33f421e4
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 UI_BASE_IME_REMOTE_INPUT_METHOD_DELEGATE_WIN_H_
6 #define UI_BASE_IME_REMOTE_INPUT_METHOD_DELEGATE_WIN_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "ui/base/ime/ui_base_ime_export.h"
12 #include "ui/gfx/geometry/rect.h"
14 namespace ui {
15 namespace internal {
17 // An interface implemented by the object to forward events that should be
18 // handled by the IME which is running in the remote metro_driver process.
19 class UI_BASE_IME_EXPORT RemoteInputMethodDelegateWin {
20 public:
21 virtual ~RemoteInputMethodDelegateWin() {}
23 // Notifies that composition should be canceled (if any).
24 virtual void CancelComposition() = 0;
26 // Notifies that properties of the focused TextInputClient is changed.
27 // Note that an empty |input_scopes| represents that TextInputType is
28 // TEXT_INPUT_TYPE_NONE.
29 // Caveats: |input_scopes| is defined as std::vector<int32> rather than
30 // std::vector<InputScope> because the wire format of IPC message
31 // MetroViewerHostMsg_ImeTextInputClientUpdated uses std::vector<int32> to
32 // avoid dependency on <InputScope.h> header.
33 virtual void OnTextInputClientUpdated(
34 const std::vector<int32>& input_scopes,
35 const std::vector<gfx::Rect>& composition_character_bounds) = 0;
38 } // namespace internal
39 } // namespace ui
41 #endif // UI_BASE_IME_REMOTE_INPUT_METHOD_DELEGATE_WIN_H_