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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 clear_unminimizing_workspace_factory_(this), | 116 clear_unminimizing_workspace_factory_(this), |
117 unminimizing_workspace_(NULL), | 117 unminimizing_workspace_(NULL), |
118 app_terminating_(false), | 118 app_terminating_(false), |
119 creating_fade_(false), | 119 creating_fade_(false) { |
120 workspace_cycler_(NULL) { | |
121 // Clobber any existing event filter. | 120 // Clobber any existing event filter. |
122 contents_window->SetEventFilter(NULL); | 121 contents_window->SetEventFilter(NULL); |
123 // |contents_window| takes ownership of LayoutManagerImpl. | 122 // |contents_window| takes ownership of LayoutManagerImpl. |
124 contents_window->SetLayoutManager(new LayoutManagerImpl(this)); | 123 contents_window->SetLayoutManager(new LayoutManagerImpl(this)); |
125 active_workspace_ = CreateWorkspace(false); | 124 active_workspace_ = CreateWorkspace(false); |
126 workspaces_.push_back(active_workspace_); | 125 workspaces_.push_back(active_workspace_); |
127 active_workspace_->window()->Show(); | 126 active_workspace_->window()->Show(); |
128 Shell::GetInstance()->AddShellObserver(this); | 127 Shell::GetInstance()->AddShellObserver(this); |
129 | 128 |
130 if (ash::WorkspaceCyclerConfiguration::IsCyclerEnabled()) | 129 if (ash::WorkspaceCyclerConfiguration::IsCyclerEnabled()) |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 new_workspace->window()->Show(); | 833 new_workspace->window()->Show(); |
835 ReparentWindow(window, new_workspace->window(), NULL); | 834 ReparentWindow(window, new_workspace->window(), NULL); |
836 if (is_active) { | 835 if (is_active) { |
837 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED, | 836 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED, |
838 base::TimeDelta()); | 837 base::TimeDelta()); |
839 } | 838 } |
840 } | 839 } |
841 | 840 |
842 } // namespace internal | 841 } // namespace internal |
843 } // namespace ash | 842 } // namespace ash |
OLD | NEW |