| 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_controller.h" | 5 #include "ash/wm/workspace_controller.h" |
| 6 | 6 |
| 7 #include "ash/wm/window_util.h" | 7 #include "ash/wm/window_util.h" |
| 8 #include "ash/wm/workspace/workspace_manager.h" | 8 #include "ash/wm/workspace/workspace_manager.h" |
| 9 #include "ui/aura/client/activation_client.h" | 9 #include "ui/aura/client/activation_client.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 void WorkspaceController::SetActiveWorkspaceByWindow(aura::Window* window) { | 37 void WorkspaceController::SetActiveWorkspaceByWindow(aura::Window* window) { |
| 38 return workspace_manager_->SetActiveWorkspaceByWindow(window); | 38 return workspace_manager_->SetActiveWorkspaceByWindow(window); |
| 39 } | 39 } |
| 40 | 40 |
| 41 aura::Window* WorkspaceController::GetActiveWorkspaceWindow() { | 41 aura::Window* WorkspaceController::GetActiveWorkspaceWindow() { |
| 42 return workspace_manager_->GetActiveWorkspaceWindow(); | 42 return workspace_manager_->GetActiveWorkspaceWindow(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 WorkspaceEventHandler* WorkspaceController::GetEventHandlerForWindow( |
| 46 aura::Window* window) { |
| 47 return workspace_manager_->GetEventHandlerForWindow(window); |
| 48 } |
| 49 |
| 45 aura::Window* WorkspaceController::GetParentForNewWindow(aura::Window* window) { | 50 aura::Window* WorkspaceController::GetParentForNewWindow(aura::Window* window) { |
| 46 return workspace_manager_->GetParentForNewWindow(window); | 51 return workspace_manager_->GetParentForNewWindow(window); |
| 47 } | 52 } |
| 48 | 53 |
| 49 void WorkspaceController::DoInitialAnimation() { | 54 void WorkspaceController::DoInitialAnimation() { |
| 50 workspace_manager_->DoInitialAnimation(); | 55 workspace_manager_->DoInitialAnimation(); |
| 51 } | 56 } |
| 52 | 57 |
| 53 void WorkspaceController::OnWindowActivated(aura::Window* gained_active, | 58 void WorkspaceController::OnWindowActivated(aura::Window* gained_active, |
| 54 aura::Window* lost_active) { | 59 aura::Window* lost_active) { |
| 55 if (!gained_active || | 60 if (!gained_active || |
| 56 gained_active->GetRootWindow() == viewport_->GetRootWindow()) { | 61 gained_active->GetRootWindow() == viewport_->GetRootWindow()) { |
| 57 workspace_manager_->SetActiveWorkspaceByWindow(gained_active); | 62 workspace_manager_->SetActiveWorkspaceByWindow(gained_active); |
| 58 } | 63 } |
| 59 } | 64 } |
| 60 | 65 |
| 61 } // namespace internal | 66 } // namespace internal |
| 62 } // namespace ash | 67 } // namespace ash |
| OLD | NEW |