1d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
2d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// found in the LICENSE file.
4d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
5d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#ifndef UI_BASE_IME_DUMMY_TEXT_INPUT_CLIENT_H_
6d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#define UI_BASE_IME_DUMMY_TEXT_INPUT_CLIENT_H_
7d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
8d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#include "ui/base/ime/text_input_client.h"
9d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
10d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)namespace ui {
11d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
12d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// Dummy implementation of TextInputClient. All functions do nothing.
13d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)class DummyTextInputClient : public TextInputClient {
14d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles) public:
15d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  DummyTextInputClient();
16effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  explicit DummyTextInputClient(TextInputType text_input_type);
17d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual ~DummyTextInputClient();
18d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
19d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // Overriden from TextInputClient.
20effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  virtual void SetCompositionText(const CompositionText& composition) OVERRIDE;
21d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual void ConfirmCompositionText() OVERRIDE;
22d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual void ClearCompositionText() OVERRIDE;
235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual void InsertText(const base::string16& text) OVERRIDE;
245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual void InsertChar(base::char16 ch, int flags) OVERRIDE;
25d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE;
26effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  virtual TextInputType GetTextInputType() const OVERRIDE;
27effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  virtual TextInputMode GetTextInputMode() const OVERRIDE;
28d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual bool CanComposeInline() const OVERRIDE;
298bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  virtual gfx::Rect GetCaretBounds() const OVERRIDE;
30d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual bool GetCompositionCharacterBounds(uint32 index,
318bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)                                             gfx::Rect* rect) const OVERRIDE;
328bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  virtual bool HasCompositionText() const OVERRIDE;
338bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  virtual bool GetTextRange(gfx::Range* range) const OVERRIDE;
348bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE;
358bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE;
36d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE;
37d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual bool DeleteRange(const gfx::Range& range) OVERRIDE;
38d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual bool GetTextFromRange(const gfx::Range& range,
395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                                base::string16* text) const OVERRIDE;
40d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual void OnInputMethodChanged() OVERRIDE;
41d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual bool ChangeTextDirectionAndLayoutAlignment(
42d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      base::i18n::TextDirection direction) OVERRIDE;
43d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE;
44d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE;
45f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual void OnCandidateWindowShown() OVERRIDE;
46f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual void OnCandidateWindowUpdated() OVERRIDE;
47f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual void OnCandidateWindowHidden() OVERRIDE;
4846d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)  virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE;
4946d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)  virtual void ExecuteEditingCommand(int command_id) OVERRIDE;
50effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
51effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  TextInputType text_input_type_;
52effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
53effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  DISALLOW_COPY_AND_ASSIGN(DummyTextInputClient);
54d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)};
55d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
56d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)}  // namespace ui
57d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
58d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#endif  // UI_BASE_IME_DUMMY_TEXT_INPUT_CLIENT_H_
59