| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/workspace/workspace_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 kShellWindowId_DefaultContainer); | 835 kShellWindowId_DefaultContainer); |
| 836 } | 836 } |
| 837 | 837 |
| 838 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { | 838 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { |
| 839 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); | 839 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); |
| 840 return window; | 840 return window; |
| 841 } | 841 } |
| 842 | 842 |
| 843 // Turn the top window back drop on / off. | 843 // Turn the top window back drop on / off. |
| 844 void ShowTopWindowBackdrop(bool show) { | 844 void ShowTopWindowBackdrop(bool show) { |
| 845 std::unique_ptr<ash::WorkspaceLayoutManagerDelegate> backdrop; | 845 std::unique_ptr<ash::WorkspaceLayoutManagerBackdropDelegate> backdrop; |
| 846 if (show) { | 846 if (show) { |
| 847 backdrop.reset(new ash::WorkspaceBackdropDelegate(default_container_)); | 847 backdrop.reset(new ash::WorkspaceBackdropDelegate(default_container_)); |
| 848 } | 848 } |
| 849 (static_cast<WorkspaceLayoutManager*>(default_container_->layout_manager())) | 849 (static_cast<WorkspaceLayoutManager*>(default_container_->layout_manager())) |
| 850 ->SetMaximizeBackdropDelegate(std::move(backdrop)); | 850 ->SetMaximizeBackdropDelegate(std::move(backdrop)); |
| 851 // Closing and / or opening can be a delayed operation. | 851 // Closing and / or opening can be a delayed operation. |
| 852 base::MessageLoop::current()->RunUntilIdle(); | 852 base::MessageLoop::current()->RunUntilIdle(); |
| 853 } | 853 } |
| 854 | 854 |
| 855 // Return the default container. | 855 // Return the default container. |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 EXPECT_EQ(gfx::Rect(50, | 1146 EXPECT_EQ(gfx::Rect(50, |
| 1147 keyboard_bounds.y() - keyboard_bounds.height()/2, | 1147 keyboard_bounds.y() - keyboard_bounds.height()/2, |
| 1148 occluded_window_bounds.width(), | 1148 occluded_window_bounds.width(), |
| 1149 occluded_window_bounds.height()).ToString(), | 1149 occluded_window_bounds.height()).ToString(), |
| 1150 window->bounds().ToString()); | 1150 window->bounds().ToString()); |
| 1151 HideKeyboard(); | 1151 HideKeyboard(); |
| 1152 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString()); | 1152 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString()); |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 } // namespace ash | 1155 } // namespace ash |
| OLD | NEW |