| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_controller.h" | 5 #include "ash/wm/workspace_controller.h" | 
| 6 | 6 | 
| 7 #include <map> | 7 #include <map> | 
| 8 | 8 | 
| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 132     manager->Relayout(); | 132     manager->Relayout(); | 
| 133     return window; | 133     return window; | 
| 134   } | 134   } | 
| 135 | 135 | 
| 136   aura::Window* GetDesktop() { | 136   aura::Window* GetDesktop() { | 
| 137     return Shell::GetContainer(Shell::GetPrimaryRootWindow(), | 137     return Shell::GetContainer(Shell::GetPrimaryRootWindow(), | 
| 138                                kShellWindowId_DefaultContainer); | 138                                kShellWindowId_DefaultContainer); | 
| 139   } | 139   } | 
| 140 | 140 | 
| 141   gfx::Rect GetFullscreenBounds(aura::Window* window) { | 141   gfx::Rect GetFullscreenBounds(aura::Window* window) { | 
| 142     return Shell::GetScreen()->GetDisplayNearestWindow(window).bounds(); | 142     return gfx::Screen::GetScreen()->GetDisplayNearestWindow(window).bounds(); | 
| 143   } | 143   } | 
| 144 | 144 | 
| 145   ShelfWidget* shelf_widget() { | 145   ShelfWidget* shelf_widget() { | 
| 146     return Shell::GetPrimaryRootWindowController()->shelf(); | 146     return Shell::GetPrimaryRootWindowController()->shelf(); | 
| 147   } | 147   } | 
| 148 | 148 | 
| 149   ShelfLayoutManager* shelf_layout_manager() { | 149   ShelfLayoutManager* shelf_layout_manager() { | 
| 150     return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); | 150     return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); | 
| 151   } | 151   } | 
| 152 | 152 | 
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 619   // Create another window and maximize it. | 619   // Create another window and maximize it. | 
| 620   scoped_ptr<Window> w2(CreateTestWindow()); | 620   scoped_ptr<Window> w2(CreateTestWindow()); | 
| 621   w2->SetBounds(gfx::Rect(10, 11, 250, 251)); | 621   w2->SetBounds(gfx::Rect(10, 11, 250, 251)); | 
| 622   w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); | 622   w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); | 
| 623   w2->Show(); | 623   w2->Show(); | 
| 624   wm::ActivateWindow(w2.get()); | 624   wm::ActivateWindow(w2.get()); | 
| 625 | 625 | 
| 626   // Increase the size of the WorkAreaInsets. This would make |w1| fall | 626   // Increase the size of the WorkAreaInsets. This would make |w1| fall | 
| 627   // completely out of the display work area. | 627   // completely out of the display work area. | 
| 628   gfx::Insets insets = | 628   gfx::Insets insets = | 
| 629       Shell::GetScreen()->GetPrimaryDisplay().GetWorkAreaInsets(); | 629       gfx::Screen::GetScreen()->GetPrimaryDisplay().GetWorkAreaInsets(); | 
| 630   insets.Set(0, 0, insets.bottom() + 30, 0); | 630   insets.Set(0, 0, insets.bottom() + 30, 0); | 
| 631   Shell::GetInstance()->SetDisplayWorkAreaInsets(w1.get(), insets); | 631   Shell::GetInstance()->SetDisplayWorkAreaInsets(w1.get(), insets); | 
| 632 | 632 | 
| 633   // Switch to w1. The window should have moved. | 633   // Switch to w1. The window should have moved. | 
| 634   wm::ActivateWindow(w1.get()); | 634   wm::ActivateWindow(w1.get()); | 
| 635   EXPECT_NE(w1_bounds.ToString(), w1->bounds().ToString()); | 635   EXPECT_NE(w1_bounds.ToString(), w1->bounds().ToString()); | 
| 636 } | 636 } | 
| 637 | 637 | 
| 638 namespace { | 638 namespace { | 
| 639 | 639 | 
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1608                          ui::EventTimeForNow()); | 1608                          ui::EventTimeForNow()); | 
| 1609     target = targeter->FindTargetForEvent(root, &touch); | 1609     target = targeter->FindTargetForEvent(root, &touch); | 
| 1610     if (points[i].is_target_hit) | 1610     if (points[i].is_target_hit) | 
| 1611       EXPECT_EQ(window.get(), target); | 1611       EXPECT_EQ(window.get(), target); | 
| 1612     else | 1612     else | 
| 1613       EXPECT_NE(window.get(), target); | 1613       EXPECT_NE(window.get(), target); | 
| 1614   } | 1614   } | 
| 1615 } | 1615 } | 
| 1616 | 1616 | 
| 1617 }  // namespace ash | 1617 }  // namespace ash | 
| OLD | NEW | 
|---|