| OLD | NEW |
| (Empty) |
| 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 explicit DummyTextInputClient(TextInputType text_input_type); | |
| 17 ~DummyTextInputClient() override; | |
| 18 | |
| 19 // Overriden from TextInputClient. | |
| 20 void SetCompositionText(const CompositionText& composition) override; | |
| 21 void ConfirmCompositionText() override; | |
| 22 void ClearCompositionText() override; | |
| 23 void InsertText(const base::string16& text) override; | |
| 24 void InsertChar(base::char16 ch, int flags) override; | |
| 25 gfx::NativeWindow GetAttachedWindow() const override; | |
| 26 TextInputType GetTextInputType() const override; | |
| 27 TextInputMode GetTextInputMode() const override; | |
| 28 bool CanComposeInline() const override; | |
| 29 gfx::Rect GetCaretBounds() const override; | |
| 30 bool GetCompositionCharacterBounds(uint32 index, | |
| 31 gfx::Rect* rect) const override; | |
| 32 bool HasCompositionText() const override; | |
| 33 bool GetTextRange(gfx::Range* range) const override; | |
| 34 bool GetCompositionTextRange(gfx::Range* range) const override; | |
| 35 bool GetSelectionRange(gfx::Range* range) const override; | |
| 36 bool SetSelectionRange(const gfx::Range& range) override; | |
| 37 bool DeleteRange(const gfx::Range& range) override; | |
| 38 bool GetTextFromRange(const gfx::Range& range, | |
| 39 base::string16* text) const override; | |
| 40 void OnInputMethodChanged() override; | |
| 41 bool ChangeTextDirectionAndLayoutAlignment( | |
| 42 base::i18n::TextDirection direction) override; | |
| 43 void ExtendSelectionAndDelete(size_t before, size_t after) override; | |
| 44 void EnsureCaretInRect(const gfx::Rect& rect) override; | |
| 45 void OnCandidateWindowShown() override; | |
| 46 void OnCandidateWindowUpdated() override; | |
| 47 void OnCandidateWindowHidden() override; | |
| 48 bool IsEditingCommandEnabled(int command_id) override; | |
| 49 void ExecuteEditingCommand(int command_id) override; | |
| 50 | |
| 51 TextInputType text_input_type_; | |
| 52 | |
| 53 DISALLOW_COPY_AND_ASSIGN(DummyTextInputClient); | |
| 54 }; | |
| 55 | |
| 56 } // namespace ui | |
| 57 | |
| 58 #endif // UI_BASE_IME_DUMMY_TEXT_INPUT_CLIENT_H_ | |
| OLD | NEW |