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 #include "ui/base/ime/dummy_text_input_client.h" 6 #include "ui/gfx/rect.h" 7 8 namespace ui { 9 DummyTextInputClient()10DummyTextInputClient::DummyTextInputClient() 11 : text_input_type_(TEXT_INPUT_TYPE_NONE) {} 12 DummyTextInputClient(TextInputType text_input_type)13DummyTextInputClient::DummyTextInputClient(TextInputType text_input_type) 14 : text_input_type_(text_input_type) {} 15 ~DummyTextInputClient()16DummyTextInputClient::~DummyTextInputClient() { 17 } 18 SetCompositionText(const CompositionText & composition)19void DummyTextInputClient::SetCompositionText( 20 const CompositionText& composition) { 21 } 22 ConfirmCompositionText()23void DummyTextInputClient::ConfirmCompositionText() { 24 } 25 ClearCompositionText()26void DummyTextInputClient::ClearCompositionText() { 27 } 28 InsertText(const base::string16 & text)29void DummyTextInputClient::InsertText(const base::string16& text) { 30 } 31 InsertChar(base::char16 ch,int flags)32void DummyTextInputClient::InsertChar(base::char16 ch, int flags) { 33 } 34 GetAttachedWindow() const35gfx::NativeWindow DummyTextInputClient::GetAttachedWindow() const { 36 return NULL; 37 } 38 GetTextInputType() const39TextInputType DummyTextInputClient::GetTextInputType() const { 40 return text_input_type_; 41 } 42 GetTextInputMode() const43TextInputMode DummyTextInputClient::GetTextInputMode() const { 44 return TEXT_INPUT_MODE_DEFAULT; 45 } 46 CanComposeInline() const47bool DummyTextInputClient::CanComposeInline() const { 48 return false; 49 } 50 GetCaretBounds() const51gfx::Rect DummyTextInputClient::GetCaretBounds() const { 52 return gfx::Rect(); 53 } 54 GetCompositionCharacterBounds(uint32 index,gfx::Rect * rect) const55bool DummyTextInputClient::GetCompositionCharacterBounds( 56 uint32 index, 57 gfx::Rect* rect) const { 58 return false; 59 } 60 HasCompositionText() const61bool DummyTextInputClient::HasCompositionText() const { 62 return false; 63 } 64 GetTextRange(gfx::Range * range) const65bool DummyTextInputClient::GetTextRange(gfx::Range* range) const { 66 return false; 67 } 68 GetCompositionTextRange(gfx::Range * range) const69bool DummyTextInputClient::GetCompositionTextRange(gfx::Range* range) const { 70 return false; 71 } 72 GetSelectionRange(gfx::Range * range) const73bool DummyTextInputClient::GetSelectionRange(gfx::Range* range) const { 74 return false; 75 } 76 SetSelectionRange(const gfx::Range & range)77bool DummyTextInputClient::SetSelectionRange(const gfx::Range& range) { 78 return false; 79 } 80 DeleteRange(const gfx::Range & range)81bool DummyTextInputClient::DeleteRange(const gfx::Range& range) { 82 return false; 83 } 84 GetTextFromRange(const gfx::Range & range,base::string16 * text) const85bool DummyTextInputClient::GetTextFromRange(const gfx::Range& range, 86 base::string16* text) const { 87 return false; 88 } 89 OnInputMethodChanged()90void DummyTextInputClient::OnInputMethodChanged() { 91 } 92 ChangeTextDirectionAndLayoutAlignment(base::i18n::TextDirection direction)93bool DummyTextInputClient::ChangeTextDirectionAndLayoutAlignment( 94 base::i18n::TextDirection direction) { 95 return false; 96 } 97 ExtendSelectionAndDelete(size_t before,size_t after)98void DummyTextInputClient::ExtendSelectionAndDelete(size_t before, 99 size_t after) { 100 } 101 EnsureCaretInRect(const gfx::Rect & rect)102void DummyTextInputClient::EnsureCaretInRect(const gfx::Rect& rect) { 103 } 104 OnCandidateWindowShown()105void DummyTextInputClient::OnCandidateWindowShown() { 106 } 107 OnCandidateWindowUpdated()108void DummyTextInputClient::OnCandidateWindowUpdated() { 109 } 110 OnCandidateWindowHidden()111void DummyTextInputClient::OnCandidateWindowHidden() { 112 } 113 IsEditingCommandEnabled(int command_id)114bool DummyTextInputClient::IsEditingCommandEnabled(int command_id) { 115 return false; 116 } 117 ExecuteEditingCommand(int command_id)118void DummyTextInputClient::ExecuteEditingCommand(int command_id) { 119 } 120 121 } // namespace ui 122