Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Side by Side Diff: ash/wm/workspace/workspace_manager.cc

Issue 12441010: Attach panel while dragging to bring it in front of other panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get workspace event handler from workspace controller. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Clicking on the maximized window in a maximized workspace. Force all 241 // Clicking on the maximized window in a maximized workspace. Force all
242 // other windows to drop to the desktop. 242 // other windows to drop to the desktop.
243 MoveChildrenToDesktop(workspace->window(), NULL); 243 MoveChildrenToDesktop(workspace->window(), NULL);
244 } 244 }
245 } 245 }
246 246
247 Window* WorkspaceManager::GetActiveWorkspaceWindow() { 247 Window* WorkspaceManager::GetActiveWorkspaceWindow() {
248 return active_workspace_->window(); 248 return active_workspace_->window();
249 } 249 }
250 250
251 WorkspaceEventHandler* WorkspaceManager::GetEventHandlerForWindow(
252 aura::Window* window) {
253 return FindBy(window)->event_handler();
254 }
255
251 Window* WorkspaceManager::GetParentForNewWindow(Window* window) { 256 Window* WorkspaceManager::GetParentForNewWindow(Window* window) {
252 // Try to put windows with transient parents in the same workspace as their 257 // Try to put windows with transient parents in the same workspace as their
253 // transient parent. 258 // transient parent.
254 if (window->transient_parent() && !IsMaximized(window)) { 259 if (window->transient_parent() && !IsMaximized(window)) {
255 Workspace* workspace = FindBy(window->transient_parent()); 260 Workspace* workspace = FindBy(window->transient_parent());
256 if (workspace) 261 if (workspace)
257 return workspace->window(); 262 return workspace->window();
258 // Fall through to normal logic. 263 // Fall through to normal logic.
259 } 264 }
260 265
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 new_workspace->window()->Show(); 804 new_workspace->window()->Show();
800 ReparentWindow(window, new_workspace->window(), NULL); 805 ReparentWindow(window, new_workspace->window(), NULL);
801 if (is_active) { 806 if (is_active) {
802 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED, 807 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED,
803 base::TimeDelta()); 808 base::TimeDelta());
804 } 809 }
805 } 810 }
806 811
807 } // namespace internal 812 } // namespace internal
808 } // namespace ash 813 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698