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 UI_BASE_IME_DUMMY_TEXT_INPUT_CLIENT_H_ 6 #define UI_BASE_IME_DUMMY_TEXT_INPUT_CLIENT_H_ 7 8 #include "ui/base/ime/text_input_client.h" 9 10 namespace ui { 11 12 // Dummy implementation of TextInputClient. All functions do nothing. 13 class DummyTextInputClient : public TextInputClient { 14 public: 15 DummyTextInputClient(); 16 virtual ~DummyTextInputClient(); 17 18 // Overriden from TextInputClient. 19 virtual void SetCompositionText( 20 const ui::CompositionText& composition) OVERRIDE; 21 virtual void ConfirmCompositionText() OVERRIDE; 22 virtual void ClearCompositionText() OVERRIDE; 23 virtual void InsertText(const string16& text) OVERRIDE; 24 virtual void InsertChar(char16 ch, int flags) OVERRIDE; 25 virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; 26 virtual ui::TextInputType GetTextInputType() const OVERRIDE; 27 virtual ui::TextInputMode GetTextInputMode() const OVERRIDE; 28 virtual bool CanComposeInline() const OVERRIDE; 29 virtual gfx::Rect GetCaretBounds() const OVERRIDE; 30 virtual bool GetCompositionCharacterBounds(uint32 index, 31 gfx::Rect* rect) const OVERRIDE; 32 virtual bool HasCompositionText() const OVERRIDE; 33 virtual bool GetTextRange(gfx::Range* range) const OVERRIDE; 34 virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE; 35 virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE; 36 virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE; 37 virtual bool DeleteRange(const gfx::Range& range) OVERRIDE; 38 virtual bool GetTextFromRange(const gfx::Range& range, 39 string16* text) const OVERRIDE; 40 virtual void OnInputMethodChanged() OVERRIDE; 41 virtual bool ChangeTextDirectionAndLayoutAlignment( 42 base::i18n::TextDirection direction) OVERRIDE; 43 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; 44 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE; 45 virtual void OnCandidateWindowShown() OVERRIDE; 46 virtual void OnCandidateWindowUpdated() OVERRIDE; 47 virtual void OnCandidateWindowHidden() OVERRIDE; 48 }; 49 50 } // namespace ui 51 52 #endif // UI_BASE_IME_DUMMY_TEXT_INPUT_CLIENT_H_ 53