blob: a377c636d8538f171a818dd4e41e1944b52cd4f4 [file] [log] [blame]
ben974286a2015-10-10 00:45:121// 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
dchenga94547472016-04-08 08:41:118#include <memory>
9
avidb567a8a2015-12-20 17:07:2410#include "base/macros.h"
ben974286a2015-10-10 00:45:1211#include "ui/aura/test/test_window_delegate.h"
12#include "ui/keyboard/keyboard_ui.h"
13
14namespace aura {
15class Window;
16} // namespace aura
17
18namespace ash {
19
20// Stub implementation of keyboard::KeyboardUI
21class TestKeyboardUI : public keyboard::KeyboardUI {
22 public:
23 TestKeyboardUI();
24 ~TestKeyboardUI() override;
25
26 bool HasKeyboardWindow() const override;
bshec50df992015-10-14 17:37:0327 bool ShouldWindowOverscroll(aura::Window* window) const override;
ben974286a2015-10-10 00:45:1228 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_;
dchenga94547472016-04-08 08:41:1139 std::unique_ptr<aura::Window> keyboard_;
ben974286a2015-10-10 00:45:1240 DISALLOW_COPY_AND_ASSIGN(TestKeyboardUI);
41};
42
43} // namespace ash
44
45#endif // ASH_TEST_TEST_KEYBOARD_UI_H_