OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/wm/always_on_top_controller.h" | 5 #include "ash/wm/always_on_top_controller.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 private: | 32 private: |
33 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardAlwaysOnTopControllerTest); | 33 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardAlwaysOnTopControllerTest); |
34 }; | 34 }; |
35 | 35 |
36 class TestLayoutManager : public WorkspaceLayoutManager { | 36 class TestLayoutManager : public WorkspaceLayoutManager { |
37 public: | 37 public: |
38 explicit TestLayoutManager(aura::Window* window) | 38 explicit TestLayoutManager(aura::Window* window) |
39 : WorkspaceLayoutManager(window), keyboard_bounds_changed_(false) {} | 39 : WorkspaceLayoutManager(window), keyboard_bounds_changed_(false) {} |
40 | 40 |
41 ~TestLayoutManager() {} | 41 ~TestLayoutManager() override {} |
42 | 42 |
43 virtual void OnKeyboardBoundsChanging(const gfx::Rect& bounds) override { | 43 void OnKeyboardBoundsChanging(const gfx::Rect& bounds) override { |
44 keyboard_bounds_changed_ = true; | 44 keyboard_bounds_changed_ = true; |
45 WorkspaceLayoutManager::OnKeyboardBoundsChanging(bounds); | 45 WorkspaceLayoutManager::OnKeyboardBoundsChanging(bounds); |
46 } | 46 } |
47 | 47 |
48 bool keyboard_bounds_changed() const { return keyboard_bounds_changed_; } | 48 bool keyboard_bounds_changed() const { return keyboard_bounds_changed_; } |
49 | 49 |
50 private: | 50 private: |
51 bool keyboard_bounds_changed_; | 51 bool keyboard_bounds_changed_; |
52 DISALLOW_COPY_AND_ASSIGN(TestLayoutManager); | 52 DISALLOW_COPY_AND_ASSIGN(TestLayoutManager); |
53 }; | 53 }; |
(...skipping 29 matching lines...) Expand all Loading... |
83 keyboard_container->bounds(), kKeyboardHeight); | 83 keyboard_container->bounds(), kKeyboardHeight); |
84 keyboard_window->SetBounds(keyboard_bounds); | 84 keyboard_window->SetBounds(keyboard_bounds); |
85 keyboard_window->Show(); | 85 keyboard_window->Show(); |
86 keyboard_controller->NotifyKeyboardBoundsChanging(keyboard_bounds); | 86 keyboard_controller->NotifyKeyboardBoundsChanging(keyboard_bounds); |
87 // Verify that test manager was notified of bounds change. | 87 // Verify that test manager was notified of bounds change. |
88 ASSERT_TRUE(manager->keyboard_bounds_changed()); | 88 ASSERT_TRUE(manager->keyboard_bounds_changed()); |
89 } | 89 } |
90 | 90 |
91 } // namespace test | 91 } // namespace test |
92 } // namespace ash | 92 } // namespace ash |
OLD | NEW |