| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 ASH_TEST_TEST_KEYBOARD_UI_H_ | 5 #ifndef ASH_TEST_TEST_KEYBOARD_UI_H_ |
| 6 #define ASH_TEST_TEST_KEYBOARD_UI_H_ | 6 #define ASH_TEST_TEST_KEYBOARD_UI_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "ui/aura/test/test_window_delegate.h" | 11 #include "ui/aura/test/test_window_delegate.h" |
| 11 #include "ui/keyboard/keyboard_ui.h" | 12 #include "ui/keyboard/keyboard_ui.h" |
| 12 | 13 |
| 13 namespace aura { | 14 namespace aura { |
| 14 class Window; | 15 class Window; |
| 15 } // namespace aura | 16 } // namespace aura |
| 16 | 17 |
| 17 namespace ash { | 18 namespace ash { |
| 18 | 19 |
| 19 // Stub implementation of keyboard::KeyboardUI | 20 // Stub implementation of keyboard::KeyboardUI |
| 20 class TestKeyboardUI : public keyboard::KeyboardUI { | 21 class TestKeyboardUI : public keyboard::KeyboardUI { |
| 21 public: | 22 public: |
| 22 TestKeyboardUI(); | 23 TestKeyboardUI(); |
| 23 ~TestKeyboardUI() override; | 24 ~TestKeyboardUI() override; |
| 24 | 25 |
| 25 bool HasKeyboardWindow() const override; | 26 bool HasKeyboardWindow() const override; |
| 26 bool ShouldWindowOverscroll(aura::Window* window) const override; | 27 bool ShouldWindowOverscroll(aura::Window* window) const override; |
| 27 aura::Window* GetKeyboardWindow() override; | 28 aura::Window* GetKeyboardWindow() override; |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 // Overridden from keyboard::KeyboardUI: | 31 // Overridden from keyboard::KeyboardUI: |
| 31 ui::InputMethod* GetInputMethod() override; | 32 ui::InputMethod* GetInputMethod() override; |
| 32 void SetUpdateInputType(ui::TextInputType type) override; | 33 void SetUpdateInputType(ui::TextInputType type) override; |
| 33 void ReloadKeyboardIfNeeded() override; | 34 void ReloadKeyboardIfNeeded() override; |
| 34 void InitInsets(const gfx::Rect& keyboard_bounds) override; | 35 void InitInsets(const gfx::Rect& keyboard_bounds) override; |
| 35 void ResetInsets() override; | 36 void ResetInsets() override; |
| 36 | 37 |
| 37 aura::test::TestWindowDelegate delegate_; | 38 aura::test::TestWindowDelegate delegate_; |
| 38 scoped_ptr<aura::Window> keyboard_; | 39 std::unique_ptr<aura::Window> keyboard_; |
| 39 DISALLOW_COPY_AND_ASSIGN(TestKeyboardUI); | 40 DISALLOW_COPY_AND_ASSIGN(TestKeyboardUI); |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 } // namespace ash | 43 } // namespace ash |
| 43 | 44 |
| 44 #endif // ASH_TEST_TEST_KEYBOARD_UI_H_ | 45 #endif // ASH_TEST_TEST_KEYBOARD_UI_H_ |
| OLD | NEW |