| 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 "ui/keyboard/keyboard_controller.h" | 5 #include "ui/keyboard/keyboard_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 aura::Window* GetKeyboardWindow() override { | 133 aura::Window* GetKeyboardWindow() override { |
| 134 if (!window_) { | 134 if (!window_) { |
| 135 window_.reset(new aura::Window(&delegate_)); | 135 window_.reset(new aura::Window(&delegate_)); |
| 136 window_->Init(ui::LAYER_NOT_DRAWN); | 136 window_->Init(ui::LAYER_NOT_DRAWN); |
| 137 window_->set_owned_by_parent(false); | 137 window_->set_owned_by_parent(false); |
| 138 } | 138 } |
| 139 return window_.get(); | 139 return window_.get(); |
| 140 } | 140 } |
| 141 ui::InputMethod* GetInputMethod() override { return input_method_; } | 141 ui::InputMethod* GetInputMethod() override { return input_method_; } |
| 142 void SetUpdateInputType(ui::TextInputType type) override {} | 142 void SetUpdateInputType(ui::TextInputType type) override {} |
| 143 void ReloadKeyboardIfNeeded() override {}; | 143 void ReloadKeyboardIfNeeded() override {} |
| 144 void InitInsets(const gfx::Rect& keyboard_bounds) override {} | 144 void InitInsets(const gfx::Rect& keyboard_bounds) override {} |
| 145 void ResetInsets() override {} | 145 void ResetInsets() override {} |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 std::unique_ptr<aura::Window> window_; | 148 std::unique_ptr<aura::Window> window_; |
| 149 aura::test::TestWindowDelegate delegate_; | 149 aura::test::TestWindowDelegate delegate_; |
| 150 ui::InputMethod* input_method_; | 150 ui::InputMethod* input_method_; |
| 151 | 151 |
| 152 DISALLOW_COPY_AND_ASSIGN(TestKeyboardUI); | 152 DISALLOW_COPY_AND_ASSIGN(TestKeyboardUI); |
| 153 }; | 153 }; |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 gfx::Rect new_bounds(0, 0, 1280, 800); | 781 gfx::Rect new_bounds(0, 0, 1280, 800); |
| 782 ASSERT_NE(new_bounds, root_window()->bounds()); | 782 ASSERT_NE(new_bounds, root_window()->bounds()); |
| 783 EXPECT_EQ(1, number_of_calls()); | 783 EXPECT_EQ(1, number_of_calls()); |
| 784 root_window()->SetBounds(new_bounds); | 784 root_window()->SetBounds(new_bounds); |
| 785 EXPECT_EQ(2, number_of_calls()); | 785 EXPECT_EQ(2, number_of_calls()); |
| 786 MockRotateScreen(); | 786 MockRotateScreen(); |
| 787 EXPECT_EQ(3, number_of_calls()); | 787 EXPECT_EQ(3, number_of_calls()); |
| 788 } | 788 } |
| 789 | 789 |
| 790 } // namespace keyboard | 790 } // namespace keyboard |
| OLD | NEW |