| 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 "ash/display/display_layout.h" | 7 #include "ash/display/display_layout.h" |
| 8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // before the parent set. This mimics what BrowserFrameAsh does. | 331 // before the parent set. This mimics what BrowserFrameAsh does. |
| 332 window->AddObserver(&window_observer); | 332 window->AddObserver(&window_observer); |
| 333 ParentWindowInPrimaryRootWindow(window.get()); | 333 ParentWindowInPrimaryRootWindow(window.get()); |
| 334 window->Show(); | 334 window->Show(); |
| 335 | 335 |
| 336 wm::WindowState* window_state = wm::GetWindowState(window.get()); | 336 wm::WindowState* window_state = wm::GetWindowState(window.get()); |
| 337 window_state->Activate(); | 337 window_state->Activate(); |
| 338 | 338 |
| 339 scoped_ptr<aura::Window> window2( | 339 scoped_ptr<aura::Window> window2( |
| 340 CreateTestWindowInShellWithBounds(gfx::Rect(12, 20, 30, 40))); | 340 CreateTestWindowInShellWithBounds(gfx::Rect(12, 20, 30, 40))); |
| 341 views::corewm::AddTransientChild(window.get(), window2.get()); | 341 ::wm::AddTransientChild(window.get(), window2.get()); |
| 342 window2->Show(); | 342 window2->Show(); |
| 343 | 343 |
| 344 window_observer.set_window(window2.get()); | 344 window_observer.set_window(window2.get()); |
| 345 window_state->Maximize(); | 345 window_state->Maximize(); |
| 346 EXPECT_EQ("10,20 30x40", | 346 EXPECT_EQ("10,20 30x40", |
| 347 window_state->GetRestoreBoundsInScreen().ToString()); | 347 window_state->GetRestoreBoundsInScreen().ToString()); |
| 348 window->RemoveObserver(&window_observer); | 348 window->RemoveObserver(&window_observer); |
| 349 } | 349 } |
| 350 | 350 |
| 351 // Verifies when a window is maximized all descendant windows have a size. | 351 // Verifies when a window is maximized all descendant windows have a size. |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 EXPECT_EQ("b,x", | 940 EXPECT_EQ("b,x", |
| 941 GetWindowOrderAsString(backdrop, window1.get(), window2.get(), | 941 GetWindowOrderAsString(backdrop, window1.get(), window2.get(), |
| 942 window3.get())); | 942 window3.get())); |
| 943 ShowTopWindowBackdrop(false); | 943 ShowTopWindowBackdrop(false); |
| 944 EXPECT_EQ("b", | 944 EXPECT_EQ("b", |
| 945 GetWindowOrderAsString(NULL, window1.get(), window2.get(), | 945 GetWindowOrderAsString(NULL, window1.get(), window2.get(), |
| 946 window3.get())); | 946 window3.get())); |
| 947 } | 947 } |
| 948 | 948 |
| 949 } // namespace ash | 949 } // namespace ash |
| OLD | NEW |