ben | 974286a | 2015-10-10 00:45:12 | [diff] [blame] | 1 | // Copyright 2015 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 ASH_TEST_TEST_KEYBOARD_UI_H_ |
| 6 | #define ASH_TEST_TEST_KEYBOARD_UI_H_ |
| 7 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 8 | #include <memory> |
| 9 | |
avi | db567a8a | 2015-12-20 17:07:24 | [diff] [blame] | 10 | #include "base/macros.h" |
ben | 974286a | 2015-10-10 00:45:12 | [diff] [blame] | 11 | #include "ui/aura/test/test_window_delegate.h" |
| 12 | #include "ui/keyboard/keyboard_ui.h" |
| 13 | |
| 14 | namespace aura { |
| 15 | class Window; |
| 16 | } // namespace aura |
| 17 | |
| 18 | namespace ash { |
| 19 | |
| 20 | // Stub implementation of keyboard::KeyboardUI |
| 21 | class TestKeyboardUI : public keyboard::KeyboardUI { |
| 22 | public: |
| 23 | TestKeyboardUI(); |
| 24 | ~TestKeyboardUI() override; |
| 25 | |
| 26 | bool HasKeyboardWindow() const override; |
bshe | c50df99 | 2015-10-14 17:37:03 | [diff] [blame] | 27 | bool ShouldWindowOverscroll(aura::Window* window) const override; |
ben | 974286a | 2015-10-10 00:45:12 | [diff] [blame] | 28 | aura::Window* GetKeyboardWindow() override; |
| 29 | |
| 30 | private: |
| 31 | // Overridden from keyboard::KeyboardUI: |
| 32 | ui::InputMethod* GetInputMethod() override; |
| 33 | void SetUpdateInputType(ui::TextInputType type) override; |
| 34 | void ReloadKeyboardIfNeeded() override; |
| 35 | void InitInsets(const gfx::Rect& keyboard_bounds) override; |
| 36 | void ResetInsets() override; |
| 37 | |
| 38 | aura::test::TestWindowDelegate delegate_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 39 | std::unique_ptr<aura::Window> keyboard_; |
ben | 974286a | 2015-10-10 00:45:12 | [diff] [blame] | 40 | DISALLOW_COPY_AND_ASSIGN(TestKeyboardUI); |
| 41 | }; |
| 42 | |
| 43 | } // namespace ash |
| 44 | |
| 45 | #endif // ASH_TEST_TEST_KEYBOARD_UI_H_ |