| 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/common/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/common/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/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 | 876 |
| 877 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { | 877 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { |
| 878 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); | 878 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); |
| 879 return window; | 879 return window; |
| 880 } | 880 } |
| 881 | 881 |
| 882 // Turn the top window back drop on / off. | 882 // Turn the top window back drop on / off. |
| 883 void ShowTopWindowBackdrop(bool show) { | 883 void ShowTopWindowBackdrop(bool show) { |
| 884 std::unique_ptr<ash::WorkspaceLayoutManagerBackdropDelegate> backdrop; | 884 std::unique_ptr<ash::WorkspaceLayoutManagerBackdropDelegate> backdrop; |
| 885 if (show) { | 885 if (show) { |
| 886 backdrop.reset(new ash::WorkspaceBackdropDelegate(default_container_)); | 886 backdrop.reset(new ash::WorkspaceBackdropDelegate( |
| 887 WmWindowAura::Get(default_container_))); |
| 887 } | 888 } |
| 888 GetWorkspaceLayoutManager(default_container_) | 889 GetWorkspaceLayoutManager(default_container_) |
| 889 ->SetMaximizeBackdropDelegate(std::move(backdrop)); | 890 ->SetMaximizeBackdropDelegate(std::move(backdrop)); |
| 890 // Closing and / or opening can be a delayed operation. | 891 // Closing and / or opening can be a delayed operation. |
| 891 base::RunLoop().RunUntilIdle(); | 892 base::RunLoop().RunUntilIdle(); |
| 892 } | 893 } |
| 893 | 894 |
| 894 // Return the default container. | 895 // Return the default container. |
| 895 aura::Window* default_container() { return default_container_; } | 896 aura::Window* default_container() { return default_container_; } |
| 896 | 897 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 EXPECT_EQ( | 1174 EXPECT_EQ( |
| 1174 gfx::Rect(50, keyboard_bounds.y() - keyboard_bounds.height() / 2, | 1175 gfx::Rect(50, keyboard_bounds.y() - keyboard_bounds.height() / 2, |
| 1175 occluded_window_bounds.width(), occluded_window_bounds.height()) | 1176 occluded_window_bounds.width(), occluded_window_bounds.height()) |
| 1176 .ToString(), | 1177 .ToString(), |
| 1177 window->bounds().ToString()); | 1178 window->bounds().ToString()); |
| 1178 HideKeyboard(); | 1179 HideKeyboard(); |
| 1179 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString()); | 1180 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString()); |
| 1180 } | 1181 } |
| 1181 | 1182 |
| 1182 } // namespace ash | 1183 } // namespace ash |
| OLD | NEW |