1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// found in the LICENSE file.
4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#ifndef UI_BASE_IME_REMOTE_INPUT_METHOD_DELEGATE_WIN_H_
6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#define UI_BASE_IME_REMOTE_INPUT_METHOD_DELEGATE_WIN_H_
7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include <vector>
9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/basictypes.h"
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "ui/base/ui_base_export.h"
12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "ui/gfx/rect.h"
13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace ui {
15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace internal {
16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// An interface implemented by the object to forward events that should be
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// handled by the IME which is running in the remote metro_driver process.
195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class UI_BASE_EXPORT RemoteInputMethodDelegateWin {
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) public:
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual ~RemoteInputMethodDelegateWin() {}
22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // Notifies that composition should be canceled (if any).
24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual void CancelComposition() = 0;
25f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // Notifies that properties of the focused TextInputClient is changed.
27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // Note that an empty |input_scopes| represents that TextInputType is
28f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // TEXT_INPUT_TYPE_NONE.
29f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // Caveats: |input_scopes| is defined as std::vector<int32> rather than
30f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // std::vector<InputScope> because the wire format of IPC message
31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // MetroViewerHostMsg_ImeTextInputClientUpdated uses std::vector<int32> to
32f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // avoid dependency on <InputScope.h> header.
33f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual void OnTextInputClientUpdated(
34f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)      const std::vector<int32>& input_scopes,
35f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)      const std::vector<gfx::Rect>& composition_character_bounds) = 0;
36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)};
37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}  // namespace internal
39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}  // namespace ui
40f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#endif  // UI_BASE_IME_REMOTE_INPUT_METHOD_DELEGATE_WIN_H_
42