Chromium Code Reviews| 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| 11 #include "ash/common/system/tray/system_tray_delegate.h" | 11 #include "ash/common/system/tray/system_tray_delegate.h" |
| 12 #include "ash/common/wm/window_state.h" | 12 #include "ash/common/wm/window_state.h" |
| 13 #include "ash/display/display_manager.h" | 13 #include "ash/display/display_manager.h" |
| 14 #include "ash/session/session_state_delegate.h" | |
| 15 #include "ash/shelf/shelf_layout_manager.h" | |
|
tdanderson
2016/06/10 22:54:42
are these needed?
yiyix
2016/06/13 18:43:54
sorry, these are from other patches.
| |
| 14 #include "ash/shell.h" | 16 #include "ash/shell.h" |
| 15 #include "ash/test/ash_test_base.h" | 17 #include "ash/test/ash_test_base.h" |
| 16 #include "ash/test/display_manager_test_api.h" | 18 #include "ash/test/display_manager_test_api.h" |
| 17 #include "ash/wm/system_modal_container_layout_manager.h" | 19 #include "ash/wm/system_modal_container_layout_manager.h" |
| 18 #include "ash/wm/window_properties.h" | 20 #include "ash/wm/window_properties.h" |
| 19 #include "ash/wm/window_state_aura.h" | 21 #include "ash/wm/window_state_aura.h" |
| 20 #include "ash/wm/window_util.h" | 22 #include "ash/wm/window_util.h" |
| 21 #include "base/command_line.h" | 23 #include "base/command_line.h" |
| 22 #include "ui/aura/client/focus_change_observer.h" | 24 #include "ui/aura/client/focus_change_observer.h" |
| 23 #include "ui/aura/client/focus_client.h" | 25 #include "ui/aura/client/focus_client.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 UpdateDisplay("600x600"); | 194 UpdateDisplay("600x600"); |
| 193 | 195 |
| 194 // d2 must have been deleted. | 196 // d2 must have been deleted. |
| 195 EXPECT_FALSE(tracker.Contains(d2)); | 197 EXPECT_FALSE(tracker.Contains(d2)); |
| 196 | 198 |
| 197 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); | 199 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); |
| 198 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString()); | 200 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString()); |
| 199 EXPECT_EQ("100,20 100x100", | 201 EXPECT_EQ("100,20 100x100", |
| 200 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); | 202 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); |
| 201 | 203 |
| 202 // Maximized area on primary display has 47px (ash::kShelfSize) inset at the | 204 // Maximized area on primary display has 48px (ash::SHELF_SIZE) inset at the |
|
tdanderson
2016/06/10 22:54:42
nit: please include the old comment since we haven
yiyix
2016/06/13 18:43:54
Done.
| |
| 203 // bottom. | 205 // bottom. |
| 204 | 206 |
| 205 // First clear fullscreen status, since both fullscreen and maximized windows | 207 // First clear fullscreen status, since both fullscreen and maximized windows |
| 206 // share the same desktop workspace, which cancels the shelf status. | 208 // share the same desktop workspace, which cancels the shelf status. |
| 207 fullscreen->SetFullscreen(false); | 209 fullscreen->SetFullscreen(false); |
| 208 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); | 210 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); |
| 209 EXPECT_EQ("0,0 600x553", maximized->GetWindowBoundsInScreen().ToString()); | 211 EXPECT_EQ("0,0 600x553", maximized->GetWindowBoundsInScreen().ToString()); |
| 210 EXPECT_EQ("0,0 600x553", | 212 EXPECT_EQ("0,0 600x553", |
| 211 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); | 213 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); |
| 212 | 214 |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1043 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( | 1045 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( |
| 1044 gfx::Rect(0, 400, 800, 200)); | 1046 gfx::Rect(0, 400, 800, 200)); |
| 1045 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); | 1047 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); |
| 1046 | 1048 |
| 1047 UpdateDisplay("600x800"); | 1049 UpdateDisplay("600x800"); |
| 1048 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); | 1050 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); |
| 1049 } | 1051 } |
| 1050 | 1052 |
| 1051 } // namespace test | 1053 } // namespace test |
| 1052 } // namespace ash | 1054 } // namespace ash |
| OLD | NEW |