| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/maximize_mode/maximize_mode_window_manager.h" | 5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/ash_switches.h" | 8 #include "ash/common/ash_switches.h" |
| 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" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 // The height of the area in which a touch operation leads to exiting the | 32 // The height of the area in which a touch operation leads to exiting the |
| 33 // full screen mode. | 33 // full screen mode. |
| 34 const int kLeaveFullScreenAreaHeightInPixel = 2; | 34 const int kLeaveFullScreenAreaHeightInPixel = 2; |
| 35 | 35 |
| 36 // Exits overview mode if it is currently active. | 36 // Exits overview mode if it is currently active. |
| 37 void CancelOverview() { | 37 void CancelOverview() { |
| 38 WindowSelectorController* controller = | 38 WindowSelectorController* controller = |
| 39 Shell::GetInstance()->window_selector_controller(); | 39 WmShell::Get()->window_selector_controller(); |
| 40 if (controller && controller->IsSelecting()) | 40 if (controller->IsSelecting()) |
| 41 controller->OnSelectionEnded(); | 41 controller->OnSelectionEnded(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 } // namespace | 44 } // namespace |
| 45 | 45 |
| 46 MaximizeModeWindowManager::~MaximizeModeWindowManager() { | 46 MaximizeModeWindowManager::~MaximizeModeWindowManager() { |
| 47 // Overview mode needs to be ended before exiting maximize mode to prevent | 47 // Overview mode needs to be ended before exiting maximize mode to prevent |
| 48 // transforming windows which are currently in | 48 // transforming windows which are currently in |
| 49 // overview: http://crbug.com/366605 | 49 // overview: http://crbug.com/366605 |
| 50 CancelOverview(); | 50 CancelOverview(); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 RootWindowController* controller = *iter; | 343 RootWindowController* controller = *iter; |
| 344 aura::Window* container = Shell::GetContainer( | 344 aura::Window* container = Shell::GetContainer( |
| 345 controller->GetRootWindow(), kShellWindowId_DefaultContainer); | 345 controller->GetRootWindow(), kShellWindowId_DefaultContainer); |
| 346 controller->workspace_controller()->SetMaximizeBackdropDelegate( | 346 controller->workspace_controller()->SetMaximizeBackdropDelegate( |
| 347 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate>( | 347 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate>( |
| 348 enable ? new WorkspaceBackdropDelegate(container) : NULL)); | 348 enable ? new WorkspaceBackdropDelegate(container) : NULL)); |
| 349 } | 349 } |
| 350 } | 350 } |
| 351 | 351 |
| 352 } // namespace ash | 352 } // namespace ash |
| OLD | NEW |