| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "ui/aura/client/focus_client.h" | 9 #include "ui/aura/client/focus_client.h" |
| 10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return ui::TEXT_INPUT_MODE_DEFAULT; | 128 return ui::TEXT_INPUT_MODE_DEFAULT; |
| 129 } | 129 } |
| 130 virtual bool CanComposeInline() const OVERRIDE { return false; } | 130 virtual bool CanComposeInline() const OVERRIDE { return false; } |
| 131 virtual gfx::Rect GetCaretBounds() OVERRIDE { return gfx::Rect(); } | 131 virtual gfx::Rect GetCaretBounds() OVERRIDE { return gfx::Rect(); } |
| 132 | 132 |
| 133 virtual bool GetCompositionCharacterBounds(uint32 index, | 133 virtual bool GetCompositionCharacterBounds(uint32 index, |
| 134 gfx::Rect* rect) OVERRIDE { | 134 gfx::Rect* rect) OVERRIDE { |
| 135 return false; | 135 return false; |
| 136 } | 136 } |
| 137 virtual bool HasCompositionText() OVERRIDE { return false; } | 137 virtual bool HasCompositionText() OVERRIDE { return false; } |
| 138 virtual bool GetTextRange(ui::Range* range) OVERRIDE { return false; } | 138 virtual bool GetTextRange(gfx::Range* range) OVERRIDE { return false; } |
| 139 virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE { | 139 virtual bool GetCompositionTextRange(gfx::Range* range) OVERRIDE { |
| 140 return false; | 140 return false; |
| 141 } | 141 } |
| 142 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE { return false; } | 142 virtual bool GetSelectionRange(gfx::Range* range) OVERRIDE { return false; } |
| 143 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE { | 143 virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE { |
| 144 return false; | 144 return false; |
| 145 } | 145 } |
| 146 virtual bool DeleteRange(const ui::Range& range) OVERRIDE { return false; } | 146 virtual bool DeleteRange(const gfx::Range& range) OVERRIDE { return false; } |
| 147 virtual bool GetTextFromRange(const ui::Range& range, | 147 virtual bool GetTextFromRange(const gfx::Range& range, |
| 148 base::string16* text) OVERRIDE { | 148 base::string16* text) OVERRIDE { |
| 149 return false; | 149 return false; |
| 150 } | 150 } |
| 151 virtual void OnInputMethodChanged() OVERRIDE {} | 151 virtual void OnInputMethodChanged() OVERRIDE {} |
| 152 virtual bool ChangeTextDirectionAndLayoutAlignment( | 152 virtual bool ChangeTextDirectionAndLayoutAlignment( |
| 153 base::i18n::TextDirection direction) OVERRIDE { return false; } | 153 base::i18n::TextDirection direction) OVERRIDE { return false; } |
| 154 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE {} | 154 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE {} |
| 155 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE {} | 155 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE {} |
| 156 | 156 |
| 157 ui::TextInputType type_; | 157 ui::TextInputType type_; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 input_method->SetFocusedTextInputClient(&no_input_client_1); | 322 input_method->SetFocusedTextInputClient(&no_input_client_1); |
| 323 EXPECT_TRUE(WillHideKeyboard()); | 323 EXPECT_TRUE(WillHideKeyboard()); |
| 324 // Cancel keyboard hide. | 324 // Cancel keyboard hide. |
| 325 input_method->SetFocusedTextInputClient(&input_client_2); | 325 input_method->SetFocusedTextInputClient(&input_client_2); |
| 326 | 326 |
| 327 EXPECT_FALSE(WillHideKeyboard()); | 327 EXPECT_FALSE(WillHideKeyboard()); |
| 328 EXPECT_TRUE(keyboard_container->IsVisible()); | 328 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 329 } | 329 } |
| 330 | 330 |
| 331 } // namespace keyboard | 331 } // namespace keyboard |
| OLD | NEW |