Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: ash/wm/workspace/workspace_layout_manager_unittest.cc

Issue 2091263004: Moves a couple of the maximize mode classes to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deps Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 885
886 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { 886 aura::Window* CreateTestWindow(const gfx::Rect& bounds) {
887 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); 887 aura::Window* window = CreateTestWindowInShellWithBounds(bounds);
888 return window; 888 return window;
889 } 889 }
890 890
891 // Turn the top window back drop on / off. 891 // Turn the top window back drop on / off.
892 void ShowTopWindowBackdrop(bool show) { 892 void ShowTopWindowBackdrop(bool show) {
893 std::unique_ptr<ash::WorkspaceLayoutManagerBackdropDelegate> backdrop; 893 std::unique_ptr<ash::WorkspaceLayoutManagerBackdropDelegate> backdrop;
894 if (show) { 894 if (show) {
895 backdrop.reset(new ash::WorkspaceBackdropDelegate(default_container_)); 895 backdrop.reset(new ash::WorkspaceBackdropDelegate(
896 WmWindowAura::Get(default_container_)));
896 } 897 }
897 GetWorkspaceLayoutManager(default_container_) 898 GetWorkspaceLayoutManager(default_container_)
898 ->SetMaximizeBackdropDelegate(std::move(backdrop)); 899 ->SetMaximizeBackdropDelegate(std::move(backdrop));
899 // Closing and / or opening can be a delayed operation. 900 // Closing and / or opening can be a delayed operation.
900 base::RunLoop().RunUntilIdle(); 901 base::RunLoop().RunUntilIdle();
901 } 902 }
902 903
903 // Return the default container. 904 // Return the default container.
904 aura::Window* default_container() { return default_container_; } 905 aura::Window* default_container() { return default_container_; }
905 906
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 EXPECT_EQ(gfx::Rect(50, 1194 EXPECT_EQ(gfx::Rect(50,
1194 keyboard_bounds.y() - keyboard_bounds.height()/2, 1195 keyboard_bounds.y() - keyboard_bounds.height()/2,
1195 occluded_window_bounds.width(), 1196 occluded_window_bounds.width(),
1196 occluded_window_bounds.height()).ToString(), 1197 occluded_window_bounds.height()).ToString(),
1197 window->bounds().ToString()); 1198 window->bounds().ToString());
1198 HideKeyboard(); 1199 HideKeyboard();
1199 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString()); 1200 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString());
1200 } 1201 }
1201 1202
1202 } // namespace ash 1203 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698