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

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: feedback 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
« no previous file with comments | « ash/wm/maximize_mode/workspace_backdrop_delegate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/workspace_backdrop_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698