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