| 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_manager.h" | 5 #include "ash/wm/workspace/workspace_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 DISALLOW_COPY_AND_ASSIGN(LayoutManagerImpl); | 106 DISALLOW_COPY_AND_ASSIGN(LayoutManagerImpl); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 // WorkspaceManager ----------------------------------------------------------- | 109 // WorkspaceManager ----------------------------------------------------------- |
| 110 | 110 |
| 111 WorkspaceManager::WorkspaceManager(Window* contents_window) | 111 WorkspaceManager::WorkspaceManager(Window* contents_window) |
| 112 : contents_window_(contents_window), | 112 : contents_window_(contents_window), |
| 113 active_workspace_(NULL), | 113 active_workspace_(NULL), |
| 114 shelf_(NULL), | 114 shelf_(NULL), |
| 115 in_move_(false), | 115 in_move_(false), |
| 116 ALLOW_THIS_IN_INITIALIZER_LIST( | 116 clear_unminimizing_workspace_factory_(this), |
| 117 clear_unminimizing_workspace_factory_(this)), | |
| 118 unminimizing_workspace_(NULL), | 117 unminimizing_workspace_(NULL), |
| 119 app_terminating_(false), | 118 app_terminating_(false), |
| 120 creating_fade_(false), | 119 creating_fade_(false), |
| 121 workspace_cycler_(NULL) { | 120 workspace_cycler_(NULL) { |
| 122 // Clobber any existing event filter. | 121 // Clobber any existing event filter. |
| 123 contents_window->SetEventFilter(NULL); | 122 contents_window->SetEventFilter(NULL); |
| 124 // |contents_window| takes ownership of LayoutManagerImpl. | 123 // |contents_window| takes ownership of LayoutManagerImpl. |
| 125 contents_window->SetLayoutManager(new LayoutManagerImpl(this)); | 124 contents_window->SetLayoutManager(new LayoutManagerImpl(this)); |
| 126 active_workspace_ = CreateWorkspace(false); | 125 active_workspace_ = CreateWorkspace(false); |
| 127 workspaces_.push_back(active_workspace_); | 126 workspaces_.push_back(active_workspace_); |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 new_workspace->window()->Show(); | 823 new_workspace->window()->Show(); |
| 825 ReparentWindow(window, new_workspace->window(), NULL); | 824 ReparentWindow(window, new_workspace->window(), NULL); |
| 826 if (is_active) { | 825 if (is_active) { |
| 827 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED, | 826 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED, |
| 828 base::TimeDelta()); | 827 base::TimeDelta()); |
| 829 } | 828 } |
| 830 } | 829 } |
| 831 | 830 |
| 832 } // namespace internal | 831 } // namespace internal |
| 833 } // namespace ash | 832 } // namespace ash |
| OLD | NEW |